[
  {
    "path": ".codecov.yml",
    "content": "coverage:\n  precision: 2\n  round: down\n  range: 70...100\n  status:\n    project: true\n    patch: true\n    changes: false\n  ignore:\n    - \"libbfio/*\"\n    - \"libcdata/*\"\n    - \"libcerror/*\"\n    - \"libcfile/*\"\n    - \"libclocale/*\"\n    - \"libcnotify/*\"\n    - \"libcpath/*\"\n    - \"libcsplit/*\"\n    - \"libcthreads/*\"\n    - \"libfcache/*\"\n    - \"libfdata/*\"\n    - \"libfdatetime/*\"\n    - \"libfguid/*\"\n    - \"libfusn/*\"\n    - \"libfwnt/*\"\n    - \"libhmac/*\"\n    - \"libuna/*\"\n    - \"tests/*\"\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "# Build from source.\nname: build\non: [push, pull_request]\npermissions: read-all\njobs:\n  build_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x86'\n          compiler: 'clang'\n          configure_options: ''\n        - architecture: 'x64'\n          compiler: 'clang'\n          configure_options: ''\n        - architecture: 'x86'\n          compiler: 'gcc'\n          configure_options: ''\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--with-pthread=no'\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--enable-wide-character-type'\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no'\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        tests/runtests.sh\n  build_dist:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        make distcheck\n  build_fuse_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config libfuse-dev\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        tests/runtests.sh\n  build_fuse3_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config libfuse3-dev\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        tests/runtests.sh\n  build_python_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--enable-python'\n          python_version: ''\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo add-apt-repository universe &&\n        sudo apt-get update &&\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config python3-dev python-dev-is-python3\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      env:\n        PYTHON_VERSION: ${{ matrix.python_version }}\n      run: |\n        tests/runtests.sh\n  build_setup_py_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n          python-version: '3.10'\n    steps:\n    - uses: actions/checkout@v5\n    - name: Set up Python ${{ matrix.python-version }}\n      uses: actions/setup-python@v5\n      with:\n        python-version: ${{ matrix.python-version }}\n    - name: Install build dependencies\n      run: |\n        sudo add-apt-repository universe &&\n        sudo apt-get update &&\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config python3-dev python-dev-is-python3\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Build Python module\n      run: |\n        python setup.py build\n  coverage_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x86'\n          compiler: 'gcc'\n          configure_options: '--enable-wide-character-type'\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--enable-wide-character-type'\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }} --enable-shared=no CFLAGS=\"--coverage -O0\" CPPFLAGS=\"-DOPTIMIZATION_DISABLED\" LDFLAGS=\"--coverage\"\n    - name: Run tests\n      run: |\n        make check CHECK_WITH_STDERR=1 SKIP_TOOLS_END_TO_END_TESTS=1\n    - name: Generate coverage data\n      run: |\n        for DIRECTORY in `find . -maxdepth 1 -type d`; do \\\n          (cd ${DIRECTORY} && find . -maxdepth 1 -name \\*.gcno -type f -exec gcov -pb {} \\;) \\\n        done\n    - name: Upload coverage report to Codecov\n      uses: codecov/codecov-action@v5\n      with:\n        name: linux-${{ matrix.architecture }}-gcc-no-optimization\n        token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/build_freebsd.yml",
    "content": "# Build from source on FreeBSD.\nname: build_freebsd\non: [push]\npermissions: read-all\njobs:\n  build_freebsd:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v5\n    - name: Building from source\n      id: build_freebsd\n      uses: vmactions/freebsd-vm@v1\n      with:\n        usesh: true\n        mem: 4096\n        # Note that the test scripts require bash\n        prepare: |\n          pkg install -y autoconf automake bash fusefs-libs gettext git libtool openssl pkgconf\n        run: |\n          tests/build.sh\n          tests/runtests.sh\n"
  },
  {
    "path": ".github/workflows/build_macos.yml",
    "content": "# Build from source.\nname: build_macos\non: [push, pull_request]\npermissions: read-all\njobs:\n  build_macos:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n        - os: macos-14\n          configure_options: ''\n        - os: macos-15\n          configure_options: ''\n        - os: macos-15-intel\n          configure_options: ''\n        - os: macos-26\n          configure_options: ''\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        brew update -q\n        brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true\n        brew link --force gettext\n        ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        tests/runtests.sh\n"
  },
  {
    "path": ".github/workflows/build_ossfuzz.yml",
    "content": "# Build OSSFuzz fuzz targets from source.\nname: build_ossfuzz\non:\n  push:\n    branches: [main]\npermissions: read-all\njobs:\n  build_ossfuzz:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n    steps:\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install git\n    - uses: actions/checkout@v5\n      with:\n        repository: google/oss-fuzz\n        path: oss-fuzz\n    - name: Build OSSFuzz fuzz targets\n      working-directory: oss-fuzz\n      run: |\n        mkdir -p projects/libfsntfs\n        cp projects/libyal/build.sh projects/libfsntfs/\n        cp projects/libyal/project.yaml projects/libfsntfs/\n        head -n 20 projects/libyal/Dockerfile > projects/libfsntfs/Dockerfile\n        echo \"RUN git clone --depth 1 https://github.com/libyal/libfsntfs.git libfsntfs\" >> projects/libfsntfs/Dockerfile\n        tail -n 3 projects/libyal/Dockerfile >> projects/libfsntfs/Dockerfile\n        python3 infra/helper.py build_image --pull libfsntfs\n        python3 infra/helper.py build_fuzzers --sanitizer address libfsntfs\n        python3 infra/helper.py check_build libfsntfs\n"
  },
  {
    "path": ".github/workflows/build_shared.yml",
    "content": "# Build from source with libyal dependencies as shared libraries.\nname: build_shared\non:\n  push:\n    branches: [main]\npermissions: read-all\njobs:\n  build_shared_ubuntu:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: ''\n        - architecture: 'x64'\n          compiler: 'gcc'\n          configure_options: '--enable-wide-character-type'\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config\n    - name: Download test data\n      run: |\n        if test -x \"synctestdata.sh\"; then ./synctestdata.sh; fi\n    - name: Prepare shared libraries\n      run: |\n        tests/syncsharedlibs.sh --use-head\n    - name: Building from source\n      env:\n        CC: ${{ matrix.compiler }}\n      run: |\n        tests/build.sh ${{ matrix.configure_options }}\n    - name: Run tests\n      run: |\n        tests/runtests.sh\n"
  },
  {
    "path": ".github/workflows/build_wheel.yml",
    "content": "# Build Python wheels from source using cibuildwheel.\nname: build_wheels\non: [push, pull_request]\npermissions: read-all\njobs:\n  build_wheels_linux:\n    name: Build wheels on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n        - os: ubuntu-24.04-arm\n        - os: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config\n    - name: Prepare build\n      run: |\n        ./synclibs.sh\n        ./autogen.sh\n        ./configure\n        make sources >/dev/null\n    - name: Build Python wheels\n      uses: pypa/cibuildwheel@v3.3.0\n      env:\n        CIBW_TEST_COMMAND: python tests/runtests.py\n        CIBW_TEST_SOURCES: tests\n      with:\n        package-dir: .\n        output-dir: dist\n    - uses: actions/upload-artifact@v4\n      with:\n        name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}\n        path: dist/*.whl\n  build_wheels_macos:\n    name: Build wheels on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n        - os: macos-14\n        - os: macos-15-intel\n    steps:\n    - uses: actions/checkout@v5\n    - name: Install build dependencies\n      run: |\n        brew update -q\n        brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true\n        brew link --force gettext\n        ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize\n    - name: Prepare build\n      run: |\n        ./synclibs.sh\n        ./autogen.sh\n        ./configure\n        make sources >/dev/null\n    - name: Build Python wheels\n      uses: pypa/cibuildwheel@v3.3.0\n      env:\n        CIBW_TEST_COMMAND: python tests/runtests.py\n        CIBW_TEST_SOURCES: tests\n      with:\n        package-dir: .\n        output-dir: dist\n    - uses: actions/upload-artifact@v4\n      with:\n        name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}\n        path: dist/*.whl\n  build_wheels_windows:\n    name: Build wheels on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n        - os: windows-11-arm\n        - os: windows-latest\n    steps:\n    - uses: actions/checkout@v5\n    - name: Prepare build\n      run: |\n        .\\synclibs.ps1\n        .\\autogen.ps1\n    - name: Build Python wheels\n      uses: pypa/cibuildwheel@v3.3.0\n      env:\n        CIBW_TEST_COMMAND: python tests/runtests.py\n        CIBW_TEST_SOURCES: tests\n      with:\n        package-dir: .\n        output-dir: dist\n    - uses: actions/upload-artifact@v4\n      with:\n        name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}\n        path: dist/*.whl\n"
  },
  {
    "path": ".gitignore",
    "content": "# Files to ignore by git\n#\n# Version: 20231119\n\n# Generic auto-generated build files\n*~\n*.a\n*.gcda\n*.gcno\n*.gcov\n*.la\n*.lai\n*.lib\n*.lineno\n*.lo\n*.log\n*.loT\n*.o\n*.obj\n*.Plo\n*.Po\n*.so\n*.so.[0-9][0-9]*\n*.so.[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*\n*.swp\n*.Tpo\n*.trs\n*.whl\n/*.egg-info/\n__pycache__\n.deps\n.dirstamp\n.libs\n.tox\nINSTALL\nMakefile\nMakefile.bcc\nMakefile.in\nstamp-h[1-9]\n\n# Specific auto-generated build files\n/ABOUT-NLS\n/aclocal.m4\n/autom4te.cache/\n/build\n/compile\n/confdefs.h\n/config.cache\n/config.guess\n/config.log\n/config.rpath\n/config.status\n/config.sub\n/configure\n/conftest.c\n/depcomp\n/dist\n/install-sh\n/libtool\n/ltmain.sh\n/m4/codeset.m4\n/m4/extern-inline.m4\n/m4/fcntl-o.m4\n/m4/gettext.m4\n/m4/glibc21.m4\n/m4/glibc2.m4\n/m4/host-cpu-c-abi.m4\n/m4/iconv.m4\n/m4/intdiv0.m4\n/m4/intldir.m4\n/m4/intl.m4\n/m4/intlmacosx.m4\n/m4/intmax.m4\n/m4/inttypes_h.m4\n/m4/inttypes-pri.m4\n/m4/lcmessage.m4\n/m4/lib-ld.m4\n/m4/lib-link.m4\n/m4/lib-prefix.m4\n/m4/libtool.m4\n/m4/lock.m4\n/m4/longlong.m4\n/m4/lt~obsolete.m4\n/m4/ltoptions.m4\n/m4/ltsugar.m4\n/m4/ltversion.m4\n/m4/nls.m4\n/m4/pkg.m4\n/m4/po.m4\n/m4/printf-posix.m4\n/m4/progtest.m4\n/m4/size_max.m4\n/m4/stdint_h.m4\n/m4/threadlib.m4\n/m4/uintmax_t.m4\n/m4/visibility.m4\n/m4/wchar_t.m4\n/m4/wint_t.m4\n/m4/xsize.m4\n/MANIFEST\n/missing\n/po/boldquot.sed\n/po/en@boldquot.header\n/po/en@quot.header\n/po/insert-header.sin\n/po/Makefile.in.in\n/po/Makevars\n/po/Makevars.template\n/po/POTFILES\n/po/quot.sed\n/po/remove-potcdate.sed\n/po/remove-potcdate.sin\n/po/Rules-quot\n/test-driver\n/ylwrap\n\n# Project specific files\n/common/config.h\n/common/config.h.in\n/common/types.h\n/dpkg/changelog\n/include/libfsntfs.h\n/include/libfsntfs/definitions.h\n/include/libfsntfs/features.h\n/include/libfsntfs/types.h\n/libfsntfs.pc\n/libfsntfs.spec\n/libfsntfs/libfsntfs.rc\n/libfsntfs/libfsntfs_definitions.h\n/setup.cfg\n/fsntfstools/*.exe\n/fsntfstools/fsntfsinfo\n/fsntfstools/fsntfsmount\n/tests/*.exe\n/tests/fsntfs_test_attribute\n/tests/fsntfs_test_attribute_list_entry\n/tests/fsntfs_test_bitmap_values\n/tests/fsntfs_test_buffer_data_handle\n/tests/fsntfs_test_cluster_block\n/tests/fsntfs_test_cluster_block_data\n/tests/fsntfs_test_cluster_block_stream\n/tests/fsntfs_test_cluster_block_vector\n/tests/fsntfs_test_compressed_block\n/tests/fsntfs_test_compressed_block_data_handle\n/tests/fsntfs_test_compressed_block_vector\n/tests/fsntfs_test_compressed_data_handle\n/tests/fsntfs_test_compression\n/tests/fsntfs_test_compression_unit_data_handle\n/tests/fsntfs_test_compression_unit_descriptor\n/tests/fsntfs_test_data_run\n/tests/fsntfs_test_data_stream\n/tests/fsntfs_test_directory_entries_tree\n/tests/fsntfs_test_directory_entry\n/tests/fsntfs_test_error\n/tests/fsntfs_test_extent\n/tests/fsntfs_test_file_entry\n/tests/fsntfs_test_file_name_attribute\n/tests/fsntfs_test_file_name_values\n/tests/fsntfs_test_file_system\n/tests/fsntfs_test_fixup_values\n/tests/fsntfs_test_index\n/tests/fsntfs_test_index_entry\n/tests/fsntfs_test_index_entry_header\n/tests/fsntfs_test_index_entry_vector\n/tests/fsntfs_test_index_node\n/tests/fsntfs_test_index_node_header\n/tests/fsntfs_test_index_root_header\n/tests/fsntfs_test_index_value\n/tests/fsntfs_test_io_handle\n/tests/fsntfs_test_logged_utility_stream_values\n/tests/fsntfs_test_mft\n/tests/fsntfs_test_mft_attribute\n/tests/fsntfs_test_mft_attribute_list\n/tests/fsntfs_test_mft_attribute_list_entry\n/tests/fsntfs_test_mft_entry\n/tests/fsntfs_test_mft_entry_header\n/tests/fsntfs_test_mft_metadata_file\n/tests/fsntfs_test_name\n/tests/fsntfs_test_notify\n/tests/fsntfs_test_object_identifier_values\n/tests/fsntfs_test_path_hint\n/tests/fsntfs_test_profiler\n/tests/fsntfs_test_reparse_point_attribute\n/tests/fsntfs_test_reparse_point_values\n/tests/fsntfs_test_sds_index_value\n/tests/fsntfs_test_security_descriptor_index\n/tests/fsntfs_test_security_descriptor_index_value\n/tests/fsntfs_test_security_descriptor_values\n/tests/fsntfs_test_standard_information_values\n/tests/fsntfs_test_support\n/tests/fsntfs_test_tools_bodyfile\n/tests/fsntfs_test_tools_digest_hash\n/tests/fsntfs_test_tools_info_handle\n/tests/fsntfs_test_tools_mount_path_string\n/tests/fsntfs_test_tools_output\n/tests/fsntfs_test_tools_path_string\n/tests/fsntfs_test_tools_signal\n/tests/fsntfs_test_txf_data_values\n/tests/fsntfs_test_usn_change_journal\n/tests/fsntfs_test_volume\n/tests/fsntfs_test_volume_header\n/tests/fsntfs_test_volume_information_attribute\n/tests/fsntfs_test_volume_information_values\n/tests/fsntfs_test_volume_name_attribute\n/tests/fsntfs_test_volume_name_values\n/tests/input\n/tests/notify_stream.log\n/tests/tmp*\n\n# Local library dependencies specific files\n/libbfio\n/libcdata\n/libcerror\n/libcfile\n/libclocale\n/libcnotify\n/libcpath\n/libcsplit\n/libcthreads\n/libfcache\n/libfdata\n/libfdatetime\n/libfguid\n/libfusn\n/libfwnt\n/libhmac\n/libuna\n"
  },
  {
    "path": "AUTHORS",
    "content": "Acknowledgements: libfsntfs\n\nCopyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n\n"
  },
  {
    "path": "COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "COPYING.LESSER",
    "content": "                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions.\n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version.\n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n"
  },
  {
    "path": "ChangeLog",
    "content": "TODO\n* pyfsntfs convert lookup path to support additional character range\n\n* libfsntfs and fsntfsmount how to support \\\\ in file name? since \\\\ is separator used by the library\n\n* extent: flag WofCompressedData extent as wof_compressed?\n* extent: rename compressed flag to lznt1_compressed?\n\n* fsntfsinfo: print volume size\n* fsntfsinfo: print extents/data runs of $DATA stream?\n\n* get_file_entry_by_path determine unicode form\n\n* fsntfsmount: cache last 3 recently used directories?\n\n* test if format version 1.2 is supported and updated README\n\n* refactor $I30 index to file entry\n** refactor libfsntfs_mft_entry_has_directory_entries_index\n\n* Ntfs compressed stream add uncompressed size check\n* add raw (no valid size) data stream support\n* check data size of WOF reparse point\n* add has WOF compressed data stream function (for dfVFS)\n\n* complete read/write lock support\n** refactor volume and file entry to use file system\n** file entry\n*** libfsntfs_file_entry_get_name_attribute_index\n*** libfsntfs_file_entry_get_security_descriptor_size\n*** libfsntfs_file_entry_get_security_descriptor\n*** continue with libfsntfs_file_entry_get_sub_file_entry_by_index\n** MFT metadata file\n** specific attribute values functions\n** USN journal\n\n* MFT entry\n** preserve attribute list data MFT entries?\n** libfsntfs_attribute add function to indicate partial attribute (has attribute_list_entry but no mft_attribute)\n\n* bitmap values\n** handle sparse data runs more efficiently\n\n* fsntfsinfo complete bodyfile support\n** fix libfsntfs_file_entry_get_security_descriptor_size: unable to retrieve security descriptor from index for identifier: 0.\n** add support for tsk metadata address calculation? inside MFT attribute?\n\n* fsntfsinfo -F add support for ADS notation\n\n* API changes\n** rename libfsntfs_volume_get_number_of_file_entries to libfsntfs_volume_get_number_of_mft_entries\n\n* change libfsntfs_mft_attribute_get_utf[8,16]_name[_size] to return 0 if not set\n\n* add debug compare of long and short names\n\n* refactor index to better handle get entry by identifier\n** make index value cache a passthrough for index node cache\n** use tree for get entry by filename\n** use tree for get entry by security identifier\n** remove the need for a local cache in libfsntfs_index_read_sub_nodes, use cache value lock instead\n\n* rename libfsntfs_internal_attribute_get_data to libfsntfs_internal_attribute_get_resident_data\n* libfsntfs_attribute add read / seek functions\n* change calls to libfsntfs_mft_entry_get_index_by_utf8_name to utf16 for optimization\n* change calls to libfsntfs_mft_entry_get_data_attribute_by_utf8_name to utf16 for optimization\n* enforce LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY when trying to read data runs\n\n* libfsntfs_volume_get_root_directory return 0 if MFT entry 5 does not exists\n\n* Check if mft_entry should be cloned before passing to\n  libfsntfs_file_entry_initialize in case it is cached out\n  otherwise remove it from file_entry\n\n* tests: pass mft_metadata_file different input files\n* look into handling directories with high number of entries\n* libfsntfs/pyfsntfs attribute\n  - expose raw attribute data?\n* USN change journal\n  - add support for values in $Max\n* resident data\n  - handle valid data size\n* enforce LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY when trying to read data runs\n* fix or remove TODO_CASE_INSENSITIVE\n\n* compressed data\n  - handle decompression errors e.g.\n    compression tuple offset value out of bounds.\n  - have means to map sparse ranges outside compressed blocks\n  - handle valid data size\n* create fsntfsexport tool to export file entry data\n* handle pre 3.1 attribute names?\n* check file entry life times\n* set file entry name, if get by index and number of filenames is 1\n\n* cached indexes?\n* data runs block\n  - add a check to see if data run sizes add up\n* volume\n  - complete libfsntfs_volume_has_bitlocker_drvie_encryption\n  - complete libfsntfs_volume_has_volume_shadow_snapshots\n* file entry\n  - add API get file name by attribute index functions?\n  - add API get parent file_reference name by attribute index functions?\n  - add API function for owner\n  - add API function for security identifier\n  - only retrieve file name from the directory entry?\n    or make clear in function documentation that first\n    non-short filename is the fallback?\n  - add support to retrieve name of the root entry if directory entry is missing\n* pyfsntfs\n  - add attribute type enum\n* pyfsntfs file entry\n  - expose more MFT entry values through API and pyfsntfs\n  - add is empty function\n  - add has_reparse_point function\n  - add has_symbolic_link function\n  - add is_corrupt function?\n  - how to handle file-like object functions for non-data file entry\n* pyfsntfs file entry/data stream\n  - add extents iterator?\n* libfsntfs/pyfsntfs file entry\n  - expose default data stream\n  - add support for short file name\n  - fallback to short file name if no long\n* libfsntfs_mft_entry_read_element_data set MFT only flag using element flags\n* libfsntfs_attribute_read_from_mft handle attribute size out of bounds\n* mft metadata file parsing mark file entry as in complete if data is stored\n  outside the $MFT\n* change MFT entry flags value checks to named definitions\n* attribute data parsing\n  - add SSIZE_MAX check for attribute->data_size before (size_t) cast\n\n* cached approach of reading attributes ?\n\n* fix issue on win2k image\n  - stack overflow infinite loop\n  - determine MFT entry index based on offset\n    do not rely on value in structure\n\n* MFT entry create get data segment function for internal usage\n\n* how to handle named index roots e.g. $ObjId:$O, $Quota:$O\n* fix issue with bounded MFT entry cache\n* support MFT entry 0 consisting of multiple $DATA attributes\n  - add segment support to ntfs attribute data reference\n\n* file_entry: clone directory entry ?\n* what about ADS support ?\n  - todo read from ads\n* change libfsntfs_attribute_reference_append_attribute into insert and sort\n  attribute ranges\n\n* add function to retrieve MFT entry by index\n* check if check_signature function uses the right offset\n* refactor: libfsnt_array_append_entry in index ?\n\n* move get mft entry to file entry initialize ?\n  - clone mft entry in file entry initialize (for now the mft entry cache\n  contains a slot for every entry)\n\n* move volume header from io handle to separate object ?\n\n* $MFT scan\n  - mark ignored attribute list\n  - mark ignored data stream\n  - mark ignored index\n  - handle corrupt MFT entries (e.g. missing FILE signature) (+/-)\n  - allow to read data runs but do not allow to read data\n* $UsnJrnl:$J parsing\n  - move UsnJrnl parsing into library ?\n  - add support for $UsnJrnl:$J file parsing\n\n* API\n  - expose logged utility stream attribute\n\nFormat:\n* index\n  - group equivalent index data values\n* boot block\n  - remove value restriction add sanity check\n* add support for attributes:\n  - logged utillity stream (LOGGED_UTILITY_STREAM) (partial)\n* pre NTFS 3.0 attribute types\n  - volume version\n* filenames\n  - ignoring short filenames for now?\n* ntfs3g indicates volume is hibernated, could this be stored in the volume flags?\n\nTools:\n* fsntfsinfo\n  - print ADS\n  - move UsnJrnl to separate tool?\n  - fix remnant data in buffer and remove work around\n  - sanitize control characters in filenames\n  - add detection of BDE and VSS\n  - add support for $LogFile\n  - print $DATA attribute size\n\nError tolerance:\n* Support partial images/file systems\n\nTests:\n* file with resident data\n* file with non-resident data\n* file with sparse data\n* file with compressed data\n* file with valid data size < data size\n* file with ADS\n* directory with ADS\n\nPerformance:\n* compact attribute union data/file reference (use type to distinguish between them)\n\nDebug:\n* print volume information flags description\n\nDeployment\n* write man pages\n\n20141011\n* see `git log' for more recent change log\n* updated dependencies\n* changes for project site move\n\n20141004\n* removed README.macosx\n\n20140810\n* worked on exposing the attributes\n\n20140809\n* worked on data streams support\n* worked on exposing the attributes\n\n20140808\n* worked on data streams support\n\n20140803\n* bug fix in Python bindings\n\n20140628\n* Worked on format support\n\n20140530\n* Worked on Python bindings\n\n20140529\n* updated dependencies\n* Worked on Python bindings\n\n20140417\n* small changes\n\n20140318\n* worked on non-resident attribute list support\n\n20140207\n* worked on libfdata refactor\n\n20140206\n* worked on libfdata refactor\n\n20140205\n* worked on libfdata refactor\n\n20140204\n* worked on libfdata refactor\n\n20140203\n* worked on libfdata refactor\n\n20140119\n* worked on libfdata refactor\n\n20140118\n* 2014 update\n* updated dependencies\n* worked on libfdata refactor\n\n20131109\n* updated dependencies\n\n20130915\n* code clean up\n\n20130914\n* updated dependencies\n* added libcthreads build support\n\n20130224\n* updated dependencies\n* 2013 update\n\n20120929\n* updated dependencies\n\n20120821\n* improve NTFS version 3.0 support\n\n20120820\n* applied update\n* improved reading MFT attribute lists and data MFT entries\n\n20120526\n* worked on MFT read and seek data functions\n\n20120520\n* 2012 update\n* updated dependencies\n* added libfusn\n* fsntfsinfo:\n  - added info handle\n\n20111125\n* code clean up\n* added support for empty volume name\n\n20111124\n* removed libvshadow\n* updated configure.ac and m4 scripts\n* added include/codepage.h\n* updated common, array type\n* updated libcstring, libsystem, libuna, libfdata, libfdatetime, libfguid,\n  libfwnt\n* added libfcache\n* code clean up\n\n20110510\n* update libvshadow\n\n20110509\n* dist fixes\n\n20110508\n* updated configure.ac\n* updated libcstring, libsystem, libuna, libbfio, libfdata, libfguid\n\n20110309\n* small changes\n\n20110308\n* small changes\n\n20110306\n* worked on support for MFT consisting of multiple data runs\n\n20110305\n* updated configure, common, array type, libcstring, liberror, libnotify,\n  libsystem, libuna, libbfio, libfdata, libfdatetime, libfguid, libfwnt\n* 2011 update\n\n20101216\n* updated Makefile\n\n20101214\n* updated configure/Makefile\n\n20101209\n* added missing MFT entry flags debug output\n* code clean up\n* added initial gettext support\n* updated common, libfdatetime\n\n20101203\n* updated common, array type, liberror, libnotify, libsystem, libuna, libbfio,\n  libfdata\n\n20101129\n* worked on txf data\n\n20101128\n* worked on txf data\n\n20101127\n* updated libfdatetime\n* moved abort to IO handle\n* worked on txf data\n\n20101126\n* worked on support for multiple index allocation attributes\n\n20101125\n* worked on support for multiple index allocation attributes\n* updated libuna, libbfio, libfdata\n\n20101124\n* updated configure, libcstring, liberror, libbfio\n* worked on support for an attribute list\n\n20101113\n* textual changes\n\n20101112\n* renamed library to libfsntfs\n\n20101110\n* worked on winsxs support\n\n20101109\n* worked on logged utility stream\n* updated include/error.h\n* updated libfdata, liberror, libbfio, libnotify, libsystem\n* added support for directory index that only consists of index root attribute\n* fixed bug in fsntinfo\n* added support for directory index that has root and empty allocation index\n  attributes\n\n20100912\n* worked on reading attribute list\n* updated libbfio\n\n20100911\n* improved handling data runs\n\n20100910\n* worked on reading directory entries\n\n20100909\n* worked on reading directory entries\n\n20100908\n* worked on file entry functions\n* worked on reading directory entries\n* added debug print of file name attribute namespace description\n\n20100907\n* worked on reading directory entries\n\n20100906\n* worked on reading indexes\n\n20100905\n* worked on reading indexes\n* worked on data runs\n\n20100904\n* worked on attributes\n* worked on reading indexes\n* worked on fixup values\n\n20100903\n* worked on mft attribute\n* updated libbfio, libfdata\n* worked on file entry API functions\n* added libfguid for $OBJECT_ID attribute\n* worked on attributes\n\n20100828\n* worked on reading a MFT entry and attributes\n\n20100827\n* worked on reading a MFT entry and attributes\n* added debug print of file attribute flag description\n* added debug print of mft attribute type description\n\n20100826\n* worked on reading a MFT entry and attributes\n\n20100825\n* initial version\n\n"
  },
  {
    "path": "Makefile.am",
    "content": "ACLOCAL_AMFLAGS = -I m4\n\nSUBDIRS = \\\n\tinclude \\\n\tcommon \\\n\tlibcerror \\\n\tlibcthreads \\\n\tlibcdata \\\n\tlibclocale \\\n\tlibcnotify \\\n\tlibcsplit \\\n\tlibuna \\\n\tlibcfile \\\n\tlibcpath \\\n\tlibbfio \\\n\tlibfcache \\\n\tlibfdata \\\n\tlibfdatetime \\\n\tlibfguid \\\n\tlibfwnt \\\n\tlibfsntfs \\\n\tlibfusn \\\n\tlibhmac \\\n\tfsntfstools \\\n\tpyfsntfs \\\n\tpo \\\n\tmanuals \\\n\ttests \\\n\tossfuzz \\\n\tmsvscpp\n\nDPKG_FILES = \\\n\tdpkg/changelog \\\n\tdpkg/changelog.in \\\n\tdpkg/compat \\\n\tdpkg/control \\\n\tdpkg/copyright \\\n\tdpkg/rules \\\n\tdpkg/libfsntfs.install \\\n\tdpkg/libfsntfs-dev.install \\\n\tdpkg/libfsntfs-python3.install \\\n\tdpkg/libfsntfs-tools.install \\\n\tdpkg/source/format\n\nGETTEXT_FILES = \\\n\tconfig.rpath \\\n\tpo/Makevars.in\n\nPKGCONFIG_FILES = \\\n\tlibfsntfs.pc.in\n\nSETUP_PY_FILES = \\\n\tpyproject.toml \\\n\tsetup.cfg \\\n\tsetup.cfg.in \\\n\tsetup.py\n\nSPEC_FILES = \\\n\tlibfsntfs.spec \\\n\tlibfsntfs.spec.in\n\nEXTRA_DIST = \\\n\t$(DPKG_FILES) \\\n\t$(GETTEXT_FILES) \\\n\t$(PKGCONFIG_FILES) \\\n\t$(SETUP_PY_FILES) \\\n\t$(SPEC_FILES)\n\nDISTCLEANFILES = \\\n\tconfig.status \\\n\tconfig.cache \\\n\tconfig.log \\\n\tlibfsntfs.pc \\\n\tlibfsntfs.spec \\\n\tMakefile \\\n\tMakefile.in \\\n\tpo/Makevars\n\npkgconfigdir = $(libdir)/pkgconfig\n\npkgconfig_DATA = \\\n\tlibfsntfs.pc\n\nlibtool: @LIBTOOL_DEPS@\n\tcd $(srcdir) && $(SHELL) ./config.status --recheck\n\nlib: library\n\nlibrary:\n\t(cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcdata && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libclocale && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcnotify && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcsplit && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libuna && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcfile && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libcpath && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libbfio && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfdatetime && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfwnt && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/libfsntfs && $(MAKE) $(AM_MAKEFLAGS))\n\t(cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))\n\n"
  },
  {
    "path": "NEWS",
    "content": ""
  },
  {
    "path": "README",
    "content": "libfsntfs is a library to access the New Technology File System (NTFS) format.\n\nProject information:\n\n* Status: experimental\n* Licence: LGPLv3+\n\nRead-only supported NTFS formats:\n\n* NTFS version 3.0\n* NTFS version 3.1\n\nSupported NTFS format features:\n\n* LZNT1 compression\n* Windows Overlay Filter (WOF) compressed data (LZX and LZXPRESS-Huffman)\n* Case sensitive directories\n\nUnsupported NTFS format features:\n\n* NTFS version 1.0\n* NTFS version 1.1\n* NTFS version 1.2\n* Encrypted File System (EFS)\n\nFor more information see:\n\n* Project documentation: https://github.com/libyal/libfsntfs/wiki/Home\n* How to build from source: https://github.com/libyal/libfsntfs/wiki/Building\n\n"
  },
  {
    "path": "acinclude.m4",
    "content": "dnl Checks for required headers and functions\ndnl\ndnl Version: 20230206\n\ndnl Function to detect if libfsntfs dependencies are available\nAC_DEFUN([AX_LIBFSNTFS_CHECK_LOCAL],\n  [dnl Headers included in libfsntfs/libfsntfs_name.c\n  AC_CHECK_HEADERS([wctype.h])\n\n  dnl Functions used in libfsntfs/libfsntfs_name.c\n  AC_CHECK_FUNCS([towupper])\n\n  AS_IF(\n    [test \"x$ac_cv_func_towupper\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: towupper],\n      [1])\n  ])\n\n  dnl Check for internationalization functions in libfsntfs/libfsntfs_i18n.c\n  AC_CHECK_FUNCS([bindtextdomain])\n])\n\ndnl Function to detect if fsntfstools dependencies are available\nAC_DEFUN([AX_FSNTFSTOOLS_CHECK_LOCAL],\n  [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h])\n\n  AC_CHECK_FUNCS([close getopt setvbuf])\n\n  AS_IF(\n   [test \"x$ac_cv_func_close\" != xyes],\n   [AC_MSG_FAILURE(\n     [Missing function: close],\n     [1])\n  ])\n\n  dnl Headers included in fsntfstools/fsntfsmount.c\n  AC_CHECK_HEADERS([errno.h sys/time.h])\n\n  dnl Functions included in fsntfstools/mount_file_system.c and fsntfstools/mount_file_entry.c\n  AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xno],\n    [AC_CHECK_FUNCS([clock_gettime getegid geteuid time])\n  ])\n])\n\ndnl Function to check if DLL support is needed\nAC_DEFUN([AX_LIBFSNTFS_CHECK_DLL_SUPPORT],\n  [AS_IF(\n    [test \"x$enable_shared\" = xyes && test \"x$ac_cv_enable_static_executables\" = xno],\n    [AS_CASE(\n      [$host],\n      [*cygwin* | *mingw* | *msys*],\n      [AC_DEFINE(\n        [HAVE_DLLMAIN],\n        [1],\n        [Define to 1 to enable the DllMain function.])\n      AC_SUBST(\n        [HAVE_DLLMAIN],\n        [1])\n\n      AC_SUBST(\n        [LIBFSNTFS_DLL_EXPORT],\n        [\"-DLIBFSNTFS_DLL_EXPORT\"])\n\n      AC_SUBST(\n        [LIBFSNTFS_DLL_IMPORT],\n        [\"-DLIBFSNTFS_DLL_IMPORT\"])\n      ])\n    ])\n  ])\n\n"
  },
  {
    "path": "appveyor.yml",
    "content": "environment:\n  nuget_token:\n    secure: xFlOodfYttki8HxA1hdhVhQ2lkVbj1EA1FxP9T1il2MUsBfH1rPEbTZy+etaMTD8\n  matrix:\n  - TARGET: vs2008\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013\n    VisualStudioVersion: 9.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python37\"\n  - TARGET: vs2010\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013\n    VisualStudioVersion: 10.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python37\"\n  - TARGET: vs2012\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013\n    VisualStudioVersion: 11.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python37\"\n  - TARGET: vs2013\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013\n    VisualStudioVersion: 12.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python37\"\n  - TARGET: vs2015\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015\n    VisualStudioVersion: 14.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python38\"\n  - TARGET: vs2017\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017\n    VisualStudioVersion: 15.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python38\"\n  - TARGET: vs2019\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019\n    VisualStudioVersion: 16.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python311\"\n  - TARGET: vs2022\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    VisualStudioVersion: 17.0\n    platform: Win32\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python311\"\n  - TARGET: vs2022-vsdebug\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    VisualStudioVersion: 17.0\n    platform: Win32\n    configuration: VSDebug\n    PYTHON_PATH: \"C:\\\\Python311\"\n  - TARGET: vs2022-x64\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    VisualStudioVersion: 17.0\n    platform: x64\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python311\"\n  - TARGET: vs2022-python\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    VisualStudioVersion: 17.0\n    platform: x64\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python311-x64\"\n  - TARGET: vs2022-nuget\n    BUILD_ENVIRONMENT: msbuild\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    VisualStudioVersion: 17.0\n    configuration: Release\n    PYTHON_PATH: \"C:\\\\Python311\"\n  - TARGET: macos-x64-clang\n    BUILD_ENVIRONMENT: xcode\n    APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma\n    HOMEBREW_NO_INSTALL_CLEANUP: 1\n    CC: clang\n    CFLAGS: \"-I/usr/local/include\"\n    LDFLAGS: \"-L/usr/local/lib\"\n    CONFIGURE_OPTIONS: \"\"\n  - TARGET: macos-x64-gcc\n    BUILD_ENVIRONMENT: xcode\n    APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma\n    HOMEBREW_NO_INSTALL_CLEANUP: 1\n    CC: gcc\n    CFLAGS: \"-I/usr/local/include\"\n    LDFLAGS: \"-L/usr/local/lib\"\n    CONFIGURE_OPTIONS: \"\"\n  - TARGET: macos-x64-gcc-python\n    BUILD_ENVIRONMENT: xcode\n    APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma\n    PYTHON: \"/usr/local/opt/python@3.11/bin/python3\"\n    PYTHON_CONFIG: \"/usr/local/opt/python@3.11/bin/python3-config\"\n    HOMEBREW_NO_INSTALL_CLEANUP: 1\n    CC: gcc\n    CFLAGS: \"-I/usr/local/include\"\n    LDFLAGS: \"-L/usr/local/lib\"\n    CONFIGURE_OPTIONS: \"--enable-python\"\n  - TARGET: macos-pkgbuild\n    BUILD_ENVIRONMENT: xcode\n    APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma\n    PYTHON: \"/usr/local/opt/python@3.11/bin/python3\"\n    PYTHON_CONFIG: \"/usr/local/opt/python@3.11/bin/python3-config\"\n    HOMEBREW_NO_INSTALL_CLEANUP: 1\n    CC: gcc\n    CFLAGS: \"-I/usr/local/include\"\n    LDFLAGS: \"-L/usr/local/lib\"\n    CONFIGURE_OPTIONS: \"--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix\"\n  - TARGET: cygwin64-gcc\n    BUILD_ENVIRONMENT: cygwin64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"\"\n  - TARGET: cygwin64-gcc-no-optimization\n    BUILD_ENVIRONMENT: cygwin64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-shared=no\"\n    CFLAGS: \"--coverage -O0\"\n    CPPFLAGS: \"-DOPTIMIZATION_DISABLED\"\n    LDFLAGS: \"--coverage\"\n  - TARGET: cygwin64-gcc-python\n    BUILD_ENVIRONMENT: cygwin64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-python\"\n  - TARGET: cygwin64-gcc-static-executables\n    BUILD_ENVIRONMENT: cygwin64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-static-executables --with-libfuse=no\"\n  - TARGET: mingw-w64-gcc\n    BUILD_ENVIRONMENT: mingw-w64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"\"\n  - TARGET: mingw-w64-gcc-no-optimization\n    BUILD_ENVIRONMENT: mingw-w64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-shared=no\"\n    CFLAGS: \"--coverage -O0\"\n    CPPFLAGS: \"-DOPTIMIZATION_DISABLED\"\n    LDFLAGS: \"--coverage\"\n  - TARGET: mingw-w64-gcc-python\n    BUILD_ENVIRONMENT: mingw-w64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-python\"\n  - TARGET: mingw-w64-gcc-static-executables\n    BUILD_ENVIRONMENT: mingw-w64\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n    CONFIGURE_OPTIONS: \"--enable-static-executables\"\n\nmatrix:\n  allow_failures:\n  - TARGET: mingw-w64-gcc-python\n\ninstall:\n- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (\n    git clone https://github.com/libyal/vstools.git ..\\vstools )\n- ps: If (($env:BUILD_ENVIRONMENT -eq \"msbuild\") -And (Test-Path \".\\synctestdata.ps1\")) {\n    .\\synctestdata.ps1 }\n- sh: if ( test ${BUILD_ENVIRONMENT} = \"xcode\" ) && test -f \"./synctestdata.sh\"; then ./synctestdata.sh; fi\n- ps: If ($env:BUILD_ENVIRONMENT -eq \"msbuild\") {\n    If ( ( \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\" ).Contains( $env:TARGET ) ) {\n      .\\syncdokan.ps1 -UseLegacyVersion }\n    Else {\n      .\\syncdokan.ps1 }\n    }\n- cmd: if [%TARGET%]==[vs2010] (\n    pushd ..\\dokan &&\n    set PYTHONPATH=..\\vstools &&\n    C:\\Python37\\python.exe ..\\vstools\\vstools\\scripts\\msvscpp_convert.py --no-python-dll --output-format 2010 msvscpp\\dokan.sln &&\n    rd /q /s msvscpp &&\n    ren vs2010 msvscpp &&\n    popd )\n- cmd: if [%TARGET%]==[vs2012] (\n    pushd ..\\dokan &&\n    set PYTHONPATH=..\\vstools &&\n    C:\\Python37\\python.exe ..\\vstools\\vstools\\scripts\\msvscpp_convert.py --no-python-dll --extend-with-x64 --output-format 2012 msvscpp\\dokan.sln &&\n    rd /q /s msvscpp &&\n    ren vs2012 msvscpp &&\n    popd )\n- cmd: if [%TARGET%]==[vs2013] (\n    pushd ..\\dokan &&\n    set PYTHONPATH=..\\vstools &&\n    C:\\Python37\\python.exe ..\\vstools\\vstools\\scripts\\msvscpp_convert.py --output-format 2013 msvscpp\\dokan.sln &&\n    rd /q /s msvscpp &&\n    ren vs2013 msvscpp &&\n    popd )\n- cmd: if [%TARGET%]==[vs2015] (\n    pushd ..\\dokan &&\n    set PYTHONPATH=..\\vstools &&\n    C:\\Python37\\python.exe ..\\vstools\\vstools\\scripts\\msvscpp_convert.py --output-format 2015 msvscpp\\dokan.sln &&\n    rd /q /s msvscpp &&\n    ren vs2015 msvscpp &&\n    popd )\n- ps: If ($env:BUILD_ENVIRONMENT -eq \"msbuild\") {\n    If ( ( \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\" ).Contains( $env:TARGET ) ) {\n      .\\builddokan.ps1 -UseLegacyVersion }\n    Else {\n      $Configuration = $env:CONFIGURATION;\n      If (${Configuration} -eq \"VSDebug\") {\n        $Configuration = \"Debug\" }\n      .\\builddokan.ps1 -Configuration ${Configuration} -Platform \"Win32\";\n      .\\builddokan.ps1 -Configuration ${Configuration} -Platform \"x64\"; }\n    }\n- sh: if test ${BUILD_ENVIRONMENT} = \"xcode\"; then brew untap homebrew/homebrew-cask-versions && brew update -q; fi\n- sh: if test ${BUILD_ENVIRONMENT} = \"xcode\"; then brew install -q autoconf automake gettext gnu-sed libtool macfuse openssl pkg-config || true; fi\n- ps: If ($env:BUILD_ENVIRONMENT -eq \"cygwin64\") {\n    (New-Object Net.WebClient).DownloadFile(\"https://cygwin.com/setup-x86_64.exe\", \"C:\\\\cygwin64\\\\setup-x86_64.exe\") }\n- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (\n    C:\\cygwin64\\setup-x86_64.exe -qgnNdO -l C:\\cygwin64\\var\\cache\\setup -R c:\\cygwin64 -s http://cygwin.mirror.constant.com -P cygfuse -P gettext-devel -P libssl-devel -P python3-devel -P wget -P zlib-devel )\n- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (\n    C:\\msys64\\usr\\bin\\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-python3 pkg-config )\n- ps: If ( ( \"cygwin64-gcc-no-optimization\", \"mingw-w64-gcc-no-optimization\" ).Contains( $env:TARGET ) ) {\n    $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\\codecov.exe }\n\nbuild_script:\n- ps: If ($env:BUILD_ENVIRONMENT -eq \"msbuild\") {\n    .\\synclibs.ps1;\n    .\\autogen.ps1 }\n- ps: If ($env:TARGET -eq \"vs2008\") {\n    .\\build.ps1 -VisualStudioVersion 2008 -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--no-python-dll\" }\n- ps: If ( ( \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\" ).Contains( $env:TARGET ) ) {\n    .\\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--extend-with-x64 --no-python-dll\" }\n- ps: If ( ( \"vs2017\", \"vs2019\", \"vs2022\", \"vs2022-vsdebug\", \"vs2022-x64\" ).Contains( $env:TARGET ) ) {\n    .\\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--extend-with-x64 --no-python-dll --with-dokany\" }\n- ps: If ($env:TARGET -eq \"vs2022-python\") {\n    .\\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--extend-with-x64 --python-path $env:PYTHON_PATH --with-dokany\" }\n- ps: If ($env:TARGET -eq \"vs2022-nuget\") {\n    .\\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform Win32 -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--extend-with-x64 --no-python-dll --with-dokany\";\n    .\\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform x64 -PythonPath $env:PYTHON_PATH -VSToolsOptions \"--extend-with-x64 --no-python-dll --with-dokany\" }\n- cmd: if [%TARGET%]==[vs2022-nuget] (\n    move msvscpp vs2008 &&\n    move vs2022 msvscpp &&\n    nuget pack libfsntfs.nuspec )\n- sh: if test ${BUILD_ENVIRONMENT} = \"xcode\"; then export PATH=\"/usr/local/opt/gettext/bin:$PATH\"; export SED=\"/usr/local/bin/gsed\"; tests/build.sh ${CONFIGURE_OPTIONS}; fi\n- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (\n    xcopy /i /q /s C:\\projects\\libfsntfs C:\\cygwin64\\home\\appveyor\\libfsntfs &&\n    C:\\cygwin64\\bin\\bash -e -l -c \"cd libfsntfs && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'\" &&\n    C:\\cygwin64\\bin\\bash -e -l -c \"cd libfsntfs && tests/build.sh ${CONFIGURE_OPTIONS}\" )\n- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (\n    xcopy /i /q /s C:\\projects\\libfsntfs C:\\msys64\\home\\appveyor\\libfsntfs &&\n    C:\\msys64\\usr\\bin\\bash -e -l -c \"cd libfsntfs && tests/build.sh ${CONFIGURE_OPTIONS}\" )\n\ntest_script:\n- cmd: rem Run tests\n- ps: If ($env:BUILD_ENVIRONMENT -eq \"msbuild\") {\n    .\\runtests.ps1 }\n- sh: if test ${BUILD_ENVIRONMENT} = \"xcode\" && test ${TARGET} != \"macos-pkgbuild\"; then tests/runtests.sh; fi\n- sh: if test ${TARGET} = \"macos-pkgbuild\"; then tests/pkgbuild.sh; fi\n- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (\n    C:\\cygwin64\\bin\\bash -l -c \"cd libfsntfs && tests/runtests.sh\" )\n- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (\n    C:\\msys64\\usr\\bin\\bash -l -c \"cd libfsntfs && tests/runtests.sh\" )\n\nafter_test:\n- cmd: if [%TARGET%]==[cygwin64-gcc-no-optimization] (\n    C:\\cygwin64\\bin\\bash -e -l -c \"cd libfsntfs && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \\*.gcno -type f -exec gcov -pb {} \\;) done\" &&\n    C:\\projects\\codecov.exe -R \\cygwin64\\home\\appveyor\\libfsntfs --name %TARGET% )\n- cmd: if [%TARGET%]==[mingw-w64-gcc-no-optimization] (\n    C:\\msys64\\usr\\bin\\bash -e -l -c \"cd libfsntfs && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \\*.gcno -type f -exec gcov -pb {} \\;) done\" &&\n    C:\\projects\\codecov.exe -R \\msys64\\home\\appveyor\\libfsntfs --name %TARGET% )\n\nartifacts:\n- path: \\*.nupkg\n\ndeploy_script:\n- ps: If ($env:APPVEYOR_REPO_TAG -eq \"true\" -and $isWindows -and $env:TARGET -eq \"vs2022-nuget\") {\n    Invoke-Expression \"nuget push *.nupkg -NonInteractive -NoSymbols -Source https://api.nuget.org/v3/index.json -ApiKey ${env:NUGET_TOKEN}\" }\n\n"
  },
  {
    "path": "autogen.ps1",
    "content": "# Script to generate the necessary files for a msvscpp build\n#\n# Version: 20241014\n\n$WinFlex = \"..\\win_flex_bison\\win_flex.exe\"\n$WinBison = \"..\\win_flex_bison\\win_bison.exe\"\n\n$Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Replace \"  \\[\",\"\" } | % { $_ -Replace \"\\],\",\"\" }\n$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace \"  \\[\",\"\" } | % { $_ -Replace \"\\],\",\"\" }\n$Prefix = ${Library}.Substring(3)\n\nGet-Content -Path \"include\\${Library}.h.in\" | Out-File -Encoding ascii \"include\\${Library}.h\"\nGet-Content -Path \"include\\${Library}\\definitions.h.in\" | % { $_ -Replace \"@VERSION@\",\"${Version}\" } | Out-File -Encoding ascii \"include\\${Library}\\definitions.h\"\nGet-Content -Path \"include\\${Library}\\features.h.in\" | % { $_ -Replace \"@[A-Z0-9_]*@\",\"0\" } | Out-File -Encoding ascii \"include\\${Library}\\features.h\"\nGet-Content -Path \"include\\${Library}\\types.h.in\" | % { $_ -Replace \"@[A-Z0-9_]*@\",\"0\" } | Out-File -Encoding ascii \"include\\${Library}\\types.h\"\nGet-Content -Path \"common\\types.h.in\" | % { $_ -Replace \"@PACKAGE@\",\"${Library}\" } | Out-File -Encoding ascii \"common\\types.h\"\nGet-Content -Path \"${Library}\\${Library}_definitions.h.in\" | % { $_ -Replace \"@VERSION@\",\"${Version}\" } | Out-File -Encoding ascii \"${Library}\\${Library}_definitions.h\"\nGet-Content -Path \"${Library}\\${Library}.rc.in\" | % { $_ -Replace \"@VERSION@\",\"${Version}\" } | Out-File -Encoding ascii \"${Library}\\${Library}.rc\"\n\nIf (Test-Path \"setup.cfg.in\")\n{\n\tGet-Content -Path \"setup.cfg.in\" | % { $_ -Replace \"@VERSION@\",\"${Version}\" } | Out-File -Encoding ascii \"setup.cfg\"\n}\n\nIf (Test-Path \"${Prefix}.net\")\n{\n\tGet-Content -Path \"${Prefix}.net\\${Prefix}.net.rc.in\" | % { $_ -Replace \"@VERSION@\",\"${Version}\" } | Out-File -Encoding ascii \"${Prefix}.net\\${Prefix}.net.rc\"\n}\n\n$NamePrefix = \"\"\n\nForEach (${Library} in Get-ChildItem -Directory -Path \"lib*\")\n{\n\tForEach (${DirectoryElement} in Get-ChildItem -Path \"${Library}\\*.l\")\n\t{\n\t\t$OutputFile = ${DirectoryElement} -Replace \".l$\",\".c\"\n\n\t\t$NamePrefix = Split-Path -path ${DirectoryElement} -leaf\n\t\t$NamePrefix = ${NamePrefix} -Replace \".l$\",\"_\"\n\n\t\tWrite-Host \"Running: ${WinFlex} -Cf ${DirectoryElement}\"\n\n\t\t# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr\n\t\t# therefore 2>&1 is added and the output is stored in a variable.\n\t\t$Output = Invoke-Expression -Command \"& '${WinFlex}' -Cf ${DirectoryElement} 2>&1\"\n\t\tWrite-Host ${Output}\n\n\t\t# Moving manually since `win_flex -o filename' does not provide the expected behavior.\n\t\tMove-Item \"lex.yy.c\" ${OutputFile} -force\n\t}\n\n\tForEach (${DirectoryElement} in Get-ChildItem -Path \"${Library}\\*.y\")\n\t{\n\t\t$OutputFile = ${DirectoryElement} -Replace \".y$\",\".c\"\n\n\t\tWrite-Host \"Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}\"\n\n\t\t# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr\n\t\t# therefore 2>&1 is added and the output is stored in a variable.\n\t\t$Output = Invoke-Expression -Command \"& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1\"\n\t\tWrite-Host ${Output}\n\t}\n}\n\n"
  },
  {
    "path": "autogen.sh",
    "content": "#!/bin/sh\n# Script to generate configure and Makefile using the autotools.\n#\n# Version: 20241013\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\n\nBINDIR=`which aclocal`;\nBINDIR=`dirname ${BINDIR}`;\n\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/usr/bin\";\nthen\n\tBINDIR=\"/usr/bin\";\nfi\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/usr/local/bin\";\nthen\n\tBINDIR=\"/usr/local/bin\";\nfi\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/opt/local/bin\";\nthen\n\t# Default location of MacPorts installed binaries.\n\tBINDIR=\"/opt/local/bin\";\nfi\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/opt/homebrew/bin\";\nthen\n\t# Default location of Homebrew installed binaries.\n\tBINDIR=\"/opt/homebrew/bin\";\nfi\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/mingw32/bin\";\nthen\n\t# Default location of 32-bit MSYS2-MinGW installed binaries.\n\tBINDIR=\"/mingw32/bin\";\nfi\nif ! test -x \"${BINDIR}/aclocal\" && test \"${BINDIR}\" != \"/mingw64/bin\";\nthen\n\t# Default location of 64-bit MSYS2-MinGW installed binaries.\n\tBINDIR=\"/mingw64/bin\";\nfi\n\nif ! test -x \"${BINDIR}/aclocal\";\nthen\n\techo \"Unable to find autotools\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nACLOCAL=\"${BINDIR}/aclocal\";\nAUTOCONF=\"${BINDIR}/autoconf\";\nAUTOHEADER=\"${BINDIR}/autoheader\";\nAUTOMAKE=\"${BINDIR}/automake\";\nAUTOPOINT=\"${BINDIR}/autopoint\";\nAUTORECONF=\"${BINDIR}/autoreconf\";\nLIBTOOLIZE=\"${BINDIR}/libtoolize\";\nPKGCONFIG=\"${BINDIR}/pkg-config\";\n\nif test \"${OSTYPE}\" = \"msys\";\nthen\n\t# Work-around for autopoint failing to detect gettext version\n\t# using func_trace (which is not available) on MSYS by writing\n\t# the gettext version to intl/VERSION.\n\tif ! test -d intl;\n\tthen\n\t\tmkdir intl;\n\tfi\n\tGETTEXT_VERSION=`gettext --version | head -n1 | sed 's/^.* //'`;\n\n\techo \"gettext-${GETTEXT_VERSION}\" > intl/VERSION;\n\nelif ! test -x \"${PKGCONFIG}\";\nthen\n\tif test \"${BINDIR}\" != \"/usr/bin\";\n\tthen\n\t\t# On OpenBSD most of the autotools are located in\n\t\t# /usr/local/bin while pkg-config is located in /usr/bin\n\t\tPKGCONFIG=\"/usr/bin/pkg-config\";\n\tfi\n\tif ! test -x \"${PKGCONFIG}\";\n\tthen\n\t\techo \"Unable to find: pkg-config\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test -x \"${AUTORECONF}\";\nthen\n\t${AUTORECONF} --force --install\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\nelse\n\tif ! test -x \"${ACLOCAL}\";\n\tthen\n\t\techo \"Unable to find: aclocal\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\tif ! test -x \"${AUTOCONF}\";\n\t\tthen\n\t\techo \"Unable to find: autoconf\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\tif ! test -x \"${AUTOHEADER}\";\n\tthen\n\t\techo \"Unable to find: autoheader\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\tif ! test -x \"${AUTOMAKE}\";\n\tthen\n\t\techo \"Unable to find: automake\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\tif ! test -x \"${AUTOPOINT}\";\n\tthen\n\t\techo \"Unable to find: autopoint\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\tif ! test -x \"${LIBTOOLIZE}\";\n\tthen\n\t\techo \"Unable to find: libtoolize\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\n\t${AUTOPOINT} --force;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\n\t${ACLOCAL} --force --install -I m4;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\n\t${LIBTOOLIZE} --force;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\n\t${AUTOHEADER} --force;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\n\t${AUTOCONF} --force;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\n\t${AUTOMAKE} --force --add-missing;\n\tif test $? -ne 0;\n\tthen\n\t\texit $?;\n\tfi\n\nfi\n\nexit ${EXIT_SUCCESS};\n\n"
  },
  {
    "path": "build.ps1",
    "content": "# Script that builds libfsntfs\n#\n# Version: 20251125\n\nParam (\n\t[string]$Configuration = ${Env:Configuration},\n\t[string]$Platform = ${Env:Platform},\n\t[string]$PlatformToolset = \"\",\n\t[string]$PythonPath = \"C:\\Python311\",\n\t[string]$VisualStudioVersion = \"\",\n\t[string]$VSToolsOptions = \"--extend-with-x64\",\n\t[string]$VSToolsPath = \"..\\vstools\"\n)\n\n$ExitSuccess = 0\n$ExitFailure = 1\n\n$Python = \"${PythonPath}\\python.exe\"\n\n$Git = \"git\"\n$GitUrl = \"https://github.com/libyal/vstools.git\"\n\n$MSVSCppConvert = \"${VSToolsPath}\\vstools\\scripts\\msvscpp_convert.py\"\n\nIf (-Not (Test-Path $Python))\n{\n    Write-Host \"Missing Python: ${Python}\" -foreground Red\n\n    Exit ${ExitFailure}\n}\nIf (-Not (Test-Path ${VSToolsPath}))\n{\n\t# PowerShell will raise NativeCommandError if git writes to stdout or stderr\n\t# therefore 2>&1 is added and the output is stored in a variable.\n\t$Output = Invoke-Expression -Command \"${Git} clone ${GitUrl} ${VSToolsPath} 2>&1\" | %{ \"$_\" }\n}\nElse\n{\n\tPush-Location \"${VSToolsPath}\"\n\n\tTry\n\t{\n\t\t# Make sure vstools are up to date.\n\t\t$Output = Invoke-Expression -Command \"${Git} pull 2>&1\" | %{ \"$_\" }\n\t}\n\tFinally\n\t{\n\t\tPop-Location\n\t}\n}\nIf (-Not (Test-Path ${MSVSCppConvert}))\n{\n\tWrite-Host \"Missing msvscpp_convert.py: ${MSVSCppConvert}\" -foreground Red\n\n\tExit ${ExitFailure}\n}\nIf (-Not ${VisualStudioVersion})\n{\n\t$VisualStudioVersion = \"2022\"\n\n\tWrite-Host \"Visual Studio version not set defauting to: ${VisualStudioVersion}\" -foreground Red\n}\nIf ((${VisualStudioVersion} -ne \"2008\") -And (${VisualStudioVersion} -ne \"2010\") -And (${VisualStudioVersion} -ne \"2012\") -And (${VisualStudioVersion} -ne \"2013\") -And (${VisualStudioVersion} -ne \"2015\") -And (${VisualStudioVersion} -ne \"2017\") -And (${VisualStudioVersion} -ne \"2019\") -And (${VisualStudioVersion} -ne \"2022\"))\n{\n\tWrite-Host \"Unsupported Visual Studio version: ${VisualStudioVersion}\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n$MSBuild = \"\"\n\nIf (${VisualStudioVersion} -eq \"2008\")\n{\n\t$MSBuild = \"C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\MSBuild.exe\"\n}\nElseIf ((${VisualStudioVersion} -eq \"2010\") -Or (${VisualStudioVersion} -eq \"2012\"))\n{\n\t$MSBuild = \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe\"\n}\nElseIf (${VisualStudioVersion} -eq \"2013\")\n{\n\t$MSBuild = \"C:\\Program Files (x86)\\MSBuild\\12.0\\Bin\\MSBuild.exe\"\n}\nElseIf (${VisualStudioVersion} -eq \"2015\")\n{\n\t$MSBuild = \"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe\"\n}\nElseIf (${VisualStudioVersion} -eq \"2017\")\n{\n\t$Results = Get-ChildItem -Path \"C:\\Program Files\\Microsoft Visual Studio\\${VisualStudioVersion}\\*\\MSBuild\\15.0\\Bin\\MSBuild.exe\" -Recurse -ErrorAction SilentlyContinue -Force\n\n\tIf ($Results.Count -eq 0)\n\t{\n\t\t$Results = Get-ChildItem -Path \"C:\\Program Files (x86)\\Microsoft Visual Studio\\${VisualStudioVersion}\\*\\MSBuild\\15.0\\Bin\\MSBuild.exe\" -Recurse -ErrorAction SilentlyContinue -Force\n\t}\n\tIf ($Results.Count -gt 0)\n\t{\n\t\t$MSBuild = $Results[0].FullName\n\t}\n}\nElseIf (${VisualStudioVersion} -eq \"2019\" -Or ${VisualStudioVersion} -eq \"2022\")\n{\n\t$Results = Get-ChildItem -Path \"C:\\Program Files\\Microsoft Visual Studio\\${VisualStudioVersion}\\*\\MSBuild\\Current\\Bin\\MSBuild.exe\" -Recurse -ErrorAction SilentlyContinue -Force\n\n\tIf ($Results.Count -eq 0)\n\t{\n\t\t$Results = Get-ChildItem -Path \"C:\\Program Files (x86)\\Microsoft Visual Studio\\${VisualStudioVersion}\\*\\MSBuild\\Current\\Bin\\MSBuild.exe\" -Recurse -ErrorAction SilentlyContinue -Force\n\t}\n\tIf ($Results.Count -gt 0)\n\t{\n\t\t$MSBuild = $Results[0].FullName\n\t}\n}\nIf (-Not ${MSBuild})\n{\n\tWrite-Host \"Unable to determine path to msbuild.exe\" -foreground Red\n\n\tExit ${ExitFailure}\n}\nElseIf (-Not (Test-Path ${MSBuild}))\n{\n\tWrite-Host \"Missing msbuild.exe: ${MSBuild}\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n\nIf (${VisualStudioVersion} -eq \"2008\")\n{\n\t$VSSolutionPath = \"msvscpp\"\n}\nElse\n{\n\t$VSSolutionPath = \"vs${VisualStudioVersion}\"\n\n\tIf (-Not (Test-Path \"${VSSolutionPath}\"))\n\t{\n\t\t${Env:PYTHONPATH} = ${VSToolsPath}\n\n\t\tInvoke-Expression -Command \"& '${Python}' ${MSVSCppConvert} --output-format ${VisualStudioVersion} ${VSToolsOptions} msvscpp\\libfsntfs.sln 2>&1\" | %{ \"$_\" }\n\t}\n}\n$VSSolutionFile = \"${VSSolutionPath}\\libfsntfs.sln\"\n\nIf (-Not (Test-Path \"${VSSolutionFile}\"))\n{\n\tWrite-Host \"Missing Visual Studio ${VisualStudioVersion} solution file: ${VSSolutionFile}\" -foreground Red\n\n\tExit ${ExitFailure}\n}\nIf (-Not ${Configuration})\n{\n\t$Configuration = \"Release\"\n\n\tWrite-Host \"Configuration not set defauting to: ${Configuration}\"\n}\nIf (-Not ${Platform})\n{\n\t$Platform = \"Win32\"\n\n\tWrite-Host \"Platform not set defauting to: ${Platform}\"\n}\n$PlatformToolset = \"\"\n\nIf (-Not ${PlatformToolset})\n{\n\tIf (${VisualStudioVersion} -eq \"2015\")\n\t{\n\t\t$PlatformToolset = \"v140\"\n\t}\n\tElseIf (${VisualStudioVersion} -eq \"2017\")\n\t{\n\t\t$PlatformToolset = \"v141\"\n\t}\n\tElseIf (${VisualStudioVersion} -eq \"2019\")\n\t{\n\t\t$PlatformToolset = \"v142\"\n\t}\n\tElseIf (${VisualStudioVersion} -eq \"2022\")\n\t{\n\t\t$PlatformToolset = \"v143\"\n\t}\n\tWrite-Host \"PlatformToolset not set defauting to: ${PlatformToolset}\"\n}\n$MSBuildOptions = \"/verbosity:quiet /target:Build /property:Configuration=${Configuration},Platform=${Platform}\"\n\nIf (${PlatformToolset})\n{\n\t$MSBuildOptions = \"${MSBuildOptions} /property:PlatformToolset=${PlatformToolset}\"\n}\nIf (${Env:APPVEYOR} -eq \"True\")\n{\n\tInvoke-Expression -Command \"& '${MSBuild}' ${MSBuildOptions} ${VSSolutionFile} /logger:'C:\\Program Files\\AppVeyor\\BuildAgent\\Appveyor.MSBuildLogger.dll' 2>&1\" | %{ \"$_\" }\n}\nElse\n{\n\tInvoke-Expression -Command \"& '${MSBuild}' ${MSBuildOptions} ${VSSolutionFile} 2>&1\" | %{ \"$_\" }\n}\n\nExit ${ExitSuccess}\n"
  },
  {
    "path": "builddokan.ps1",
    "content": "# Script that builds dokan\n#\n# Version: 20180322\n\nParam (\n\t[string]$Configuration = ${Env:Configuration},\n\t[string]$Platform = ${Env:Platform},\n\t[switch]$UseLegacyVersion = $false\n)\n\nIf (-not ${Configuration})\n{\n\t$Configuration = \"Release\"\n}\nIf (-not ${Platform})\n{\n\t$Platform = \"Win32\"\n}\n\nIf (${Env:AppVeyor} -eq \"True\")\n{\n\t$MSBuild = \"MSBuild.exe\"\n}\nElseIf (${Env:VisualStudioVersion} -eq \"15.0\")\n{\n\t$MSBuild = \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\amd64\\MSBuild.exe\"\n}\nElseIf (${Env:VisualStudioVersion} -eq \"9.0\")\n{\n\t$MSBuild = \"C:\\\\Windows\\Microsoft.NET\\Framework\\v3.5\\MSBuild.exe\"\n}\nElse\n{\n\t$MSBuild = \"C:\\\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe\"\n}\n$MSBuildOptions = \"/verbosity:quiet /target:Build /property:Configuration=${Configuration},Platform=${Platform}\"\n\nIf ($UseLegacyVersion)\n{\n\t$DokanPath = \"../dokan\"\n\t$ProjectFile = \"msvscpp\\dokan.sln\"\n}\nElse\n{\n\t$DokanPath = \"../dokany\"\n\t$ProjectFile = \"dokan\\dokan.vcxproj\"\n}\n\nPush-Location ${DokanPath}\n\nTry\n{\n\tWrite-Host \"${MSBuild} ${MSBuildOptions} ${ProjectFile}\"\n\n\tInvoke-Expression -Command \"& '${MSBuild}' ${MSBuildOptions} ${ProjectFile}\"\n}\nFinally\n{\n\tPop-Location\n}\n\n"
  },
  {
    "path": "common/Makefile.am",
    "content": "AM_CPPFLAGS = \\\n\t-I../include -I$(top_srcdir)/include\n\nEXTRA_DIST = \\\n\tbyte_stream.h \\\n\tcommon.h \\\n\tconfig.h \\\n\tconfig_borlandc.h \\\n\tconfig_msc.h \\\n\tconfig_winapi.h \\\n\tfile_stream.h \\\n\tmemory.h \\\n\tnarrow_string.h \\\n\tsystem_string.h \\\n\ttypes.h \\\n\ttypes.h.in \\\n\twide_string.h\n\nDISTCLEANFILES = \\\n\tconfig.h \\\n\ttypes.h \\\n\tMakefile \\\n\tMakefile.in\n\n"
  },
  {
    "path": "common/byte_stream.h",
    "content": "/*\n * Byte stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _BYTE_STREAM_H )\n#define _BYTE_STREAM_H\n\n#include \"common.h\"\n#include \"types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#define _BYTE_STREAM_HOST_IS_ENDIAN_BIG\t\t( *((uint32_t *) \"\\x01\\x02\\x03\\x04\" ) == 0x01020304 )\n#define _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE\t( *((uint32_t *) \"\\x01\\x02\\x03\\x04\" ) == 0x04030201 )\n#define _BYTE_STREAM_HOST_IS_ENDIAN_MIDDLE\t( *((uint32_t *) \"\\x01\\x02\\x03\\x04\" ) == 0x02010403 )\n\n#define _BYTE_STREAM_ENDIAN_BIG\t\t\t(uint8_t) 'b'\n#define _BYTE_STREAM_ENDIAN_LITTLE\t\t(uint8_t) 'l'\n#define _BYTE_STREAM_ENDIAN_MIDDLE\t\t(uint8_t) 'm'\n\ntypedef union byte_stream_float32\n{\n\tfloat floating_point;\n\tuint32_t integer;\n\n} byte_stream_float32_t;\n\ntypedef union byte_stream_float64\n{\n\tdouble floating_point;\n\tuint64_t integer;\n\n} byte_stream_float64_t;\n\n#define byte_stream_copy_to_uint16_big_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 0 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ];\n\n#define byte_stream_copy_to_uint16_little_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 0 ];\n\n#define byte_stream_copy_to_uint24_big_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 0 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ];\n\n#define byte_stream_copy_to_uint24_little_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 0 ];\n\n#define byte_stream_copy_to_uint32_big_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 0 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 3 ];\n\n#define byte_stream_copy_to_uint32_little_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 3 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 0 ];\n\n#define byte_stream_copy_to_uint48_big_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 0 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 3 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 4 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 5 ];\n\n#define byte_stream_copy_to_uint48_little_endian( byte_stream, value ) \\\n\t( value )  |= ( byte_stream )[ 5 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 4 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 3 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 0 ];\n\n#define byte_stream_copy_to_uint64_big_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 0 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 3 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 4 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 5 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 6 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 7 ];\n\n#define byte_stream_copy_to_uint64_little_endian( byte_stream, value ) \\\n\t( value )   = ( byte_stream )[ 7 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 6 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 5 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 4 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 3 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 2 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 1 ]; \\\n\t( value ) <<= 8; \\\n\t( value )  |= ( byte_stream )[ 0 ];\n\n#define byte_stream_copy_from_uint16_big_endian( byte_stream, value ) \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint16_little_endian( byte_stream, value ) \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint24_big_endian( byte_stream, value ) \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint24_little_endian( byte_stream, value ) \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint32_big_endian( byte_stream, value ) \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint32_little_endian( byte_stream, value ) \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint48_big_endian( byte_stream, value ) \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 5 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint48_little_endian( byte_stream, value ) \\\n\t( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \\\n\t( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint64_big_endian( byte_stream, value ) \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \\\n\t( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 7 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_copy_from_uint64_little_endian( byte_stream, value ) \\\n\t( byte_stream )[ 7 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \\\n\t( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \\\n\t( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \\\n\t( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \\\n\t( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \\\n\t( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \\\n\t( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \\\n\t( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff )\n\n#define byte_stream_bit_rotate_left_8bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 8 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_right_8bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 8 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_left_16bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 16 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_right_16bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 16 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_left_32bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 32 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_right_32bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 32 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_left_64bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 64 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_right_64bit( byte_stream, number_of_bits ) \\\n\t( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 64 - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_left( value, number_of_bits ) \\\n\t( ( ( value ) << ( number_of_bits ) ) | ( ( value ) >> ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) )\n\n#define byte_stream_bit_rotate_right( value, number_of_bits ) \\\n\t( ( ( value ) >> ( number_of_bits ) ) | ( ( value ) << ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) )\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _BYTE_STREAM_H ) */\n\n"
  },
  {
    "path": "common/common.h",
    "content": "/*\n * Common include file\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _COMMON_H )\n#define _COMMON_H\n\n#if defined( HAVE_CONFIG_H )\n#include \"config.h\"\n#endif\n\n/* Include the Borland/CodeGear C++ Builder compiler specific configuration\n */\n#if defined( __BORLANDC__ )\n#include \"config_borlandc.h\"\n\n/* Include the Microsoft Visual Studio C++ compiler specific configuration\n */\n#elif defined( _MSC_VER )\n#include \"config_msc.h\"\n#endif\n\n#include \"config_winapi.h\"\n\n#endif /* !defined( _COMMON_H ) */\n\n"
  },
  {
    "path": "common/config_borlandc.h",
    "content": "/*\n * Configuration for the Borland/CodeGear C++ Builder compiler\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _CONFIG_BORLANDC_H )\n#define _CONFIG_BORLANDC_H\n\n#endif /* !defined( _CONFIG_BORLANDC_H ) */\n\n"
  },
  {
    "path": "common/config_msc.h",
    "content": "/*\n * Configuration for the Microsoft Visual Studio C++ compiler\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _CONFIG_MSC_H )\n#define _CONFIG_MSC_H\n\n/* Disable warning C4127: conditional expression is constant\n */\n#pragma warning( disable : 4127 )\n\n/* Disable warning C4201: nonstandard extension used : nameless struct/union\n */\n#pragma warning( disable : 4201 )\n\n#endif /* !defined( _CONFIG_MSC_H ) */\n\n"
  },
  {
    "path": "common/config_winapi.h",
    "content": "/*\n * Configuration file for WINAPI\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _CONFIG_WINAPI_H )\n#define _CONFIG_WINAPI_H\n\n/* Define the earliest supported WINAPI version\n#define WINVER\t\t\t\t0x0501\n */\n\n/* If necessary make sure WINAPI is defined\n */\n#if defined( HAVE_WINDOWS_H ) || defined( __BORLANDC__ ) || defined( _MSC_VER )\n#include <windows.h>\n#endif\n\n#if defined( WINAPI )\n\n/* Define to the address where bug reports for this package should be sent.\n */\n#define PACKAGE_BUGREPORT\t\t\"joachim.metz@gmail.com\"\n\n/* Define the size of the integer for WINAPI\n */\n#if !defined( SIZEOF_INT )\n#define SIZEOF_INT\t\t\t4\n#endif\n\n/* Define the size of size_t for WINAPI\n * Do not define when pyconfig.h has been included via python.h\n */\n#if !defined( HAVE_PYCONFIG_H )\n\n#if !defined( SIZEOF_SIZE_T )\n#if __WORDSIZE == 64\n#define SIZEOF_SIZE_T\t\t\t8\n#else\n#define SIZEOF_SIZE_T\t\t\t4\n#endif\n#endif\n\n#endif /* !defined( HAVE_PYCONFIG_H ) */\n\n/* Define the size of the wide character for WINAPI\n */\n#if !defined( SIZEOF_WCHAR_T )\n#define SIZEOF_WCHAR_T\t\t\t2\n#endif\n\n/* Enable the DllMain function\n */\n#define HAVE_DLLMAIN\t\t\t1\n\n/* Enable verbose output\n#define HAVE_VERBOSE_OUTPUT\t\t1\n */\n\n/* Enable debug output\n#define HAVE_DEBUG_OUTPUT\t\t1\n */\n\n/* Enable both the narrow and wide character functions\n */\n#if !defined( HAVE_WIDE_CHARACTER_TYPE )\n#define HAVE_WIDE_CHARACTER_TYPE\t1\n#endif\n\n/* If not controlled by config.h enable multi-thread support\n */\n#if !defined( HAVE_CONFIG_H ) && !defined( HAVE_MULTI_THREAD_SUPPORT )\n#define HAVE_MULTI_THREAD_SUPPORT\t1\n#endif\n\n#endif /* defined( WINAPI ) */\n\n#endif /* !defined( _CONFIG_WINAPI_H ) */\n\n"
  },
  {
    "path": "common/file_stream.h",
    "content": "/*\n * FILE stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FILE_STREAM_H )\n#define _FILE_STREAM_H\n\n#include \"common.h\"\n\n#if defined( HAVE_GLIB_H )\n#include <glib.h>\n#include <glib/gstdio.h>\n#endif\n\n#include <stdio.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#define FILE_STREAM_OPEN_APPEND\t\t\t\"a\"\n#define FILE_STREAM_OPEN_READ\t\t\t\"r\"\n#define FILE_STREAM_OPEN_WRITE\t\t\t\"w\"\n\n#if defined( WINAPI )\n#define FILE_STREAM_BINARY_OPEN_APPEND\t\t\"ab\"\n#define FILE_STREAM_BINARY_OPEN_READ\t\t\"rb\"\n#define FILE_STREAM_BINARY_OPEN_WRITE\t\t\"wb\"\n\n#else\n#define FILE_STREAM_BINARY_OPEN_APPEND\t\t\"a\"\n#define FILE_STREAM_BINARY_OPEN_READ\t\t\"r\"\n#define FILE_STREAM_BINARY_OPEN_WRITE\t\t\"w\"\n\n#endif\n\n/* narrow character FILE stream open\n */\n#if defined( HAVE_GLIB_H )\n#define file_stream_open( filename, mode ) \\\n\tg_fopen( filename, mode )\n\n#elif defined( HAVE_FOPEN ) || defined( WINAPI )\n#define file_stream_open( filename, mode ) \\\n\tfopen( filename, mode )\n#endif\n\n/* wide character FILE stream open\n */\n#if defined( WINAPI )\n#define file_stream_open_wide( filename, mode ) \\\n\t_wfopen( filename, mode )\n#endif\n\n/* FILE stream close\n */\n#if defined( HAVE_FCLOSE ) || defined( WINAPI )\n#define file_stream_close( stream ) \\\n\tfclose( stream )\n#endif\n\n/* FILE stream read\n */\n#if defined( HAVE_FREAD ) || defined( WINAPI )\n#define file_stream_read( stream, data, size ) \\\n\tfread( data, 1, size, stream )\n#endif\n\n/* FILE stream write\n */\n#if defined( HAVE_FWRITE ) || defined( WINAPI )\n#define file_stream_write( stream, data, size ) \\\n\tfwrite( data, 1, size, stream )\n#endif\n\n/* FILE stream seek\n */\n#if defined( WINAPI )\n#define file_stream_seek_offset( stream, offset, whence ) \\\n\tfseek( stream, offset, whence )\n\n#elif defined( HAVE_FSEEKO )\n#define file_stream_seek_offset( stream, offset, whence ) \\\n\tfseeko( stream, offset, whence )\n\n#elif defined( HAVE_FSEEKO64 )\n#define file_stream_seek_offset( stream, offset, whence ) \\\n\tfseeko64( stream, offset, whence )\n#endif\n\n/* End of FILE stream\n */\n#if defined( HAVE_FEOF ) || defined( WINAPI )\n#define file_stream_at_end( stream ) \\\n        feof( stream )\n#endif\n\n/* Get narrow character string from FILE stream\n */\n#if defined( HAVE_FGETS ) || defined( WINAPI )\n#define file_stream_get_string( stream, string, size ) \\\n        fgets( string, size, stream )\n#endif\n\n/* Get wide characters string from FILE stream\n */\n#if defined( HAVE_FGETWS ) || defined( WINAPI )\n#define file_stream_get_string_wide( stream, string, size ) \\\n        fgetws( string, size, stream )\n#endif\n\n/* Variable arguments formatted print to stream function\n */\n#if defined( HAVE_GLIB_H )\n#define file_stream_vfprintf( stream, format, ... ) \\\n\tg_vfprintf( stream, format, __VA_ARGS__ )\n\n/* Borland BCC previous to version 5.6.0 cannot handle the macro form: MACRO( ... )\n */\n#elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define file_stream_vfprintf \\\n\tvfprintf\n\n#elif defined( HAVE_VFPRINTF ) || defined( WINAPI )\n#define file_stream_vfprintf( stream, format, ... ) \\\n\tvfprintf( stream, format, __VA_ARGS__ )\n#endif\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FILE_STREAM_H ) */\n\n"
  },
  {
    "path": "common/memory.h",
    "content": "/*\n * Memory functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MEMORY_H )\n#define _MEMORY_H\n\n#include \"common.h\"\n\n#if defined( HAVE_GLIB_H )\n#include <glib.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_STRING_H ) || defined( WINAPI )\n#include <string.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* Note that 128 MiB is an arbitrary selected upper limit here\n */\n#define MEMORY_MAXIMUM_ALLOCATION_SIZE \\\n\t( 128 * 1024 * 1024 )\n\n/* Memory allocation\n */\n#if defined( HAVE_GLIB_H )\n#define memory_allocate( size ) \\\n\tg_malloc( (gsize) size )\n\n#elif defined( WINAPI )\n#define memory_allocate( size ) \\\n\tHeapAlloc( GetProcessHeap(), 0, (SIZE_T) size )\n\n#elif defined( HAVE_MALLOC )\n#define memory_allocate( size ) \\\n\tmalloc( size )\n#endif\n\n#define memory_allocate_structure( type ) \\\n\t(type *) memory_allocate( sizeof( type ) )\n\n#define memory_allocate_structure_as_value( type ) \\\n\t(intptr_t *) memory_allocate( sizeof( type ) )\n\n/* Memory reallocation\n */\n#if defined( HAVE_GLIB_H )\n#define memory_reallocate( buffer, size ) \\\n\tg_realloc( (gpointer) buffer, (gsize) size )\n\n#elif defined( WINAPI )\n/* HeapReAlloc does not allocate empty (NULL) buffers as realloc does\n */\n#define memory_reallocate( buffer, size ) \\\n\t( buffer == NULL ) ? \\\n\tHeapAlloc( GetProcessHeap(), 0, (SIZE_T) size ) : \\\n\tHeapReAlloc( GetProcessHeap(), 0, (LPVOID) buffer, (SIZE_T) size )\n\n#elif defined( HAVE_REALLOC )\n#define memory_reallocate( buffer, size ) \\\n\trealloc( (void *) buffer, size )\n#endif\n\n/* Memory free\n */\n#if defined( HAVE_GLIB_H )\n#define memory_free( buffer ) \\\n\tg_free( (gpointer) buffer )\n\n#elif defined( WINAPI )\n#define memory_free( buffer ) \\\n\t( buffer == NULL ) ? TRUE : HeapFree( GetProcessHeap(), 0, (LPVOID) buffer )\n\n#elif defined( HAVE_FREE )\n#define memory_free( buffer ) \\\n\tfree( (void *) buffer )\n#endif\n\n/* Memory compare\n */\n#if defined( HAVE_MEMCMP ) || defined( WINAPI )\n#define memory_compare( buffer1, buffer2, size ) \\\n\tmemcmp( (const void *) buffer1, (const void *) buffer2, size )\n#endif\n\n/* Memory copy\n */\n#if defined( HAVE_MEMCPY ) || defined( WINAPI )\n#define memory_copy( destination, source, count ) \\\n\tmemcpy( (void *) destination, (void *) source, count )\n#endif\n\n/* Memory set\n */\n#if defined( HAVE_MEMSET ) || defined( WINAPI )\n#define memory_set( buffer, value, count ) \\\n\tmemset( (void *) buffer, (int) value, count )\n#endif\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MEMORY_H ) */\n\n"
  },
  {
    "path": "common/narrow_string.h",
    "content": "/*\n * Narrow character string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _NARROW_STRING_H )\n#define _NARROW_STRING_H\n\n#include \"common.h\"\n#include \"memory.h\"\n#include \"types.h\"\n\n#if defined( HAVE_GLIB_H )\n#include <glib.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_STRING_H ) || defined( WINAPI )\n#include <string.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* String allocation\n */\n#define narrow_string_allocate( size ) \\\n\t(char *) memory_allocate( sizeof( char ) * ( size ) )\n\n/* String reallocation\n */\n#define narrow_string_reallocate( string, size ) \\\n\t(char *) memory_reallocate( string, ( sizeof( char ) * ( size ) ) )\n\n/* String length\n */\n#if defined( HAVE_STRLEN ) || defined( WINAPI )\n#define narrow_string_length( string ) \\\n\tstrlen( string )\n#endif\n\n/* String compare\n */\n#if defined( HAVE_MEMCMP ) || defined( WINAPI )\n#define narrow_string_compare( string1, string2, size ) \\\n\tmemcmp( (void *) string1, (void *) string2, size )\n\n#elif defined( HAVE_STRNCMP )\n#define narrow_string_compare( string1, string2, size ) \\\n\tstrncmp( string1, string2, size )\n#endif\n\n/* Caseless string compare\n */\n#if defined( HAVE_GLIB_H )\n#define narrow_string_compare_no_case( string1, string2, size ) \\\n\tg_ascii_strncasecmp( string1, string2, size )\n\n#elif defined( _MSC_VER )\n#define narrow_string_compare_no_case( string1, string2, size ) \\\n\t_strnicmp( string1, string2, size )\n\n#elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_STRNICMP )\n#define narrow_string_compare_no_case( string1, string2, size ) \\\n\tstrnicmp( string1, string2, size )\n\n#elif defined( HAVE_STRNCASECMP )\n#define narrow_string_compare_no_case( string1, string2, size ) \\\n\tstrncasecmp( string1, string2, size )\n\n#elif defined( HAVE_STRCASECMP )\n#define narrow_string_compare_no_case( string1, string2, size ) \\\n\tstrcasecmp( string1, string2 )\n#endif\n\n/* String copy\n */\n#if defined( HAVE_MEMCPY ) || defined( WINAPI )\n#define narrow_string_copy( destination, source, size ) \\\n\t(char *) memcpy( (void *) destination, (void *) source, size )\n\n#elif defined( HAVE_STRNCPY )\n#define narrow_string_copy( destination, source, size ) \\\n\tstrncpy( destination, source, size )\n#endif\n\n/* String character search\n */\n#if defined( HAVE_MEMCHR ) || defined( WINAPI )\n#define narrow_string_search_character( string, character, size ) \\\n\t(char *) memchr( (void *) string, (int) character, size )\n\n#elif defined( HAVE_STRCHR )\n#define narrow_string_search_character( string, character, size ) \\\n\tstrchr( string, (int) character )\n#endif\n\n/* String reverse character search\n */\n#if defined( HAVE_MEMRCHR ) && ( HAVE_DECL_MEMRCHR == 1 )\n#define narrow_string_search_character_reverse( string, character, size ) \\\n\t(char *) memrchr( (void *) string, (int) character, size )\n\n#elif defined( HAVE_STRRCHR ) || defined( WINAPI )\n/* (void)(size) is used to suppress unused variable warnings */\n#define narrow_string_search_character_reverse( string, character, size ) \\\n\tstrrchr( string, (int) character ); (void)(size)\n#endif\n\n/* String sub-string search\n */\n#if defined( HAVE_STRSTR ) || defined( WINAPI )\n#define narrow_string_search_string( string, substring, size ) \\\n\tstrstr( string, substring )\n#endif\n\n/* String formatted print (snprintf)\n */\n#if defined( HAVE_GLIB_H )\n#define narrow_string_snprintf( target, size, ... ) \\\n\tg_snprintf( target, size, __VA_ARGS__ )\n\n#elif defined( _MSC_VER )\n#define narrow_string_snprintf( target, size, ... ) \\\n\tsprintf_s( target, size, __VA_ARGS__ )\n\n#elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define narrow_string_snprintf \\\n\tsnprintf\n\n#elif defined( HAVE_SNPRINTF ) || defined( WINAPI )\n#define narrow_string_snprintf( target, size, ... ) \\\n\tsnprintf( target, size, __VA_ARGS__ )\n#endif\n\n/* String input conversion (sscanf)\n */\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define narrow_string_sscanf \\\n\tsscanf\n\n#elif defined( HAVE_SSCANF ) || defined( WINAPI )\n#define narrow_string_sscanf( string, format, ... ) \\\n\tsscanf( string, format, __VA_ARGS__ )\n#endif\n\n/* Variable arguments formatted print to string function (vsnprintf)\n */\n#if defined( HAVE_GLIB_H )\n#define narrow_string_vsnprintf( string, size, format, ... ) \\\n\tg_vsnprintf( string, size, format, __VA_ARGS__ )\n\n#elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define narrow_string_vsnprintf \\\n\tvsnprintf\n\n#elif defined( HAVE_VSNPRINTF ) || defined( WINAPI )\n#define narrow_string_vsnprintf( string, size, format, ... ) \\\n\tvsnprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _NARROW_STRING_H ) */\n\n"
  },
  {
    "path": "common/system_string.h",
    "content": "/*\n * System character string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _SYSTEM_STRING_H )\n#define _SYSTEM_STRING_H\n\n#include \"common.h\"\n#include \"narrow_string.h\"\n#include \"types.h\"\n#include \"wide_string.h\"\n\n#if defined( _cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\n#if SIZEOF_WCHAR_T != 2\n#error Unsupported wide system character size\n#endif\n\n/* Intermediate version of the macro required\n * for correct evaluation predefined string\n */\n#define _SYSTEM_STRING_INTERMEDIATE( string ) \\\n\tL ## string\n\n#define _SYSTEM_STRING( string ) \\\n\t_SYSTEM_STRING_INTERMEDIATE( string )\n\n#define system_string_allocate( size ) \\\n\twide_string_allocate( size )\n\n#define system_string_reallocate( string, size ) \\\n\twide_string_reallocate( string, size )\n\n#define system_string_compare( destination, source, size ) \\\n\twide_string_compare( destination, source, size )\n\n#define system_string_compare_no_case( destination, source, size ) \\\n\twide_string_compare_no_case( destination, source, size )\n\n#define system_string_copy( destination, source, size ) \\\n\twide_string_copy( destination, source, size )\n\n#define system_string_length( string ) \\\n\twide_string_length( string )\n\n#define system_string_search_character( string, character, size ) \\\n\twide_string_search_character( string, character, size )\n\n#define system_string_search_character_reverse( string, character, size ) \\\n\twide_string_search_character_reverse( string, character, size )\n\n#define system_string_search_string( string, substring, size ) \\\n\twide_string_search_string( string, substring, size )\n\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define system_string_sprintf \\\n\twide_string_snwprintf\n\n#else\n#define system_string_sprintf( string, size, format, ... ) \\\n\twide_string_snwprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define system_string_vsnprintf \\\n\twide_string_vsnwprintf\n\n#else\n#define system_string_vsnprintf( string, size, format, ... ) \\\n\twide_string_vsnwprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#else\n\n#define _SYSTEM_STRING( string ) \\\n\tstring\n\n#define system_string_allocate( size ) \\\n\tnarrow_string_allocate( size )\n\n#define system_string_reallocate( string, size ) \\\n\tnarrow_string_reallocate( string, size )\n\n#define system_string_compare( destination, source, size ) \\\n\tnarrow_string_compare( destination, source, size )\n\n#define system_string_compare_no_case( destination, source, size ) \\\n\tnarrow_string_compare_no_case( destination, source, size )\n\n#define system_string_copy( destination, source, size ) \\\n\tnarrow_string_copy( destination, source, size )\n\n#define system_string_length( string ) \\\n\tnarrow_string_length( string )\n\n#define system_string_search_character( string, character, size ) \\\n\tnarrow_string_search_character( string, character, size )\n\n#define system_string_search_character_reverse( string, character, size ) \\\n\tnarrow_string_search_character_reverse( string, character, size )\n\n#define system_string_search_string( string, substring, size ) \\\n\tnarrow_string_search_string( string, substring, size )\n\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define system_string_sprintf \\\n\tnarrow_string_snprintf\n\n#else\n#define system_string_sprintf( string, size, format, ... ) \\\n\tnarrow_string_snprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define system_string_vsnprintf \\\n\tnarrow_string_vsnprintf\n\n#else\n#define system_string_vsnprintf( string, size, format, ... ) \\\n\tnarrow_string_vsnprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n/* For backwards compatibility */\n#define system_string_vsprintf system_string_vsnprintf\n\n#if defined( _cplusplus )\n}\n#endif\n\n#endif /* !defined( _SYSTEM_STRING_H ) */\n\n"
  },
  {
    "path": "common/types.h.in",
    "content": "/*\n * Type and type-support definitions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _TYPES_H )\n#define _TYPES_H\n\n#include \"common.h\"\n\n#if defined( HAVE_LIMITS_H ) || defined( WINAPI )\n#include <limits.h>\n#endif\n\n/* Make sure to include inttypes.h or stdint.h before\n * PRI definitions are defined\n */\n#include <@PACKAGE@/types.h>\n\n#if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )\n\n#define HAVE_WIDE_SYSTEM_CHARACTER 1\n\n/* The system character type is wide\n * A system string contains either UTF-16 or UTF-32\n */\ntypedef wchar_t system_character_t;\ntypedef wint_t system_integer_t;\n\n#define PRIc_SYSTEM \"lc\"\n#define PRIs_SYSTEM \"ls\"\n\n#else\n\n/* The system character type is narrow\n * A system string contains either UTF-8 or extended ASCII with a codepage\n */\ntypedef char system_character_t;\ntypedef int system_integer_t;\n\n#define PRIc_SYSTEM \"c\"\n#define PRIs_SYSTEM \"s\"\n\n#endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */\n\n/* Fallback for systems without PRI definitions\n * Do not define when pyconfig.h has been included via python.h\n */\n#if !defined( HAVE_PYCONFIG_H )\n\n#if !defined( PRId8 )\n#define PRId8 \"d\"\n#endif\n\n#if !defined( PRId16 )\n#define PRId16 \"d\"\n#endif\n\n#if !defined( PRId32 )\n#if defined( WINAPI )\n#define PRId32 \"I32d\"\n\n#else\n#define PRId32 \"d\"\n\n#endif\n#endif /* !defined( PRId32 ) */\n\n#if !defined( PRId64 )\n#if defined( WINAPI )\n#define PRId64 \"I64d\"\n\n#elif __WORDSIZE == 64\n#define PRId64 \"ld\"\n\n#else\n#define PRId64 \"lld\"\n\n#endif\n#endif /* !defined( PRId64 ) */\n\n#if !defined( PRIi8 )\n#define PRIi8 \"i\"\n#endif\n\n#if !defined( PRIi16 )\n#define PRIi16 \"i\"\n#endif\n\n#if !defined( PRIi32 )\n#if defined( WINAPI )\n#define PRIi32 \"I32i\"\n\n#else\n#define PRIi32 \"i\"\n\n#endif\n#endif /* !defined( PRIi32 ) */\n\n#if !defined( PRIi64 )\n#if defined( WINAPI )\n#define PRIi64 \"I64i\"\n\n#elif __WORDSIZE == 64\n#define PRIi64 \"li\"\n\n#else\n#define PRIi64 \"lli\"\n\n#endif\n#endif /* !defined( PRIi64 ) */\n\n#if !defined( PRIu8 )\n#define PRIu8 \"u\"\n#endif\n\n#if !defined( PRIu16 )\n#define PRIu16 \"u\"\n#endif\n\n#if !defined( PRIu32 )\n#if defined( WINAPI )\n#define PRIu32 \"I32u\"\n\n#else\n#define PRIu32 \"u\"\n\n#endif\n#endif /* !defined( PRIu32 ) */\n\n#if !defined( PRIu64 )\n#if defined( WINAPI )\n#define PRIu64 \"I64u\"\n\n#elif __WORDSIZE == 64\n#define PRIu64 \"lu\"\n\n#else\n#define PRIu64 \"llu\"\n\n#endif\n#endif /* !defined( PRIu64 ) */\n\n#if !defined( PRIo8 )\n#define PRIo8 \"o\"\n#endif\n\n#if !defined( PRIo16 )\n#define PRIo16 \"o\"\n#endif\n\n#if !defined( PRIo32 )\n#if defined( WINAPI )\n#define PRIo32 \"I32o\"\n\n#else\n#define PRIo32 \"o\"\n\n#endif\n#endif /* !defined( PRIo32 ) */\n\n#if !defined( PRIo64 )\n#if defined( WINAPI )\n#define PRIo64 \"I64o\"\n\n#elif __WORDSIZE == 64\n#define PRIo64 \"lo\"\n\n#else\n#define PRIo64 \"llo\"\n\n#endif\n#endif /* !defined( PRIo64 ) */\n\n#if !defined( PRIx8 )\n#define PRIx8 \"x\"\n#endif\n\n#if !defined( PRIx16 )\n#define PRIx16 \"x\"\n#endif\n\n#if !defined( PRIx32 )\n#if defined( WINAPI )\n#define PRIx32 \"I32x\"\n\n#else\n#define PRIx32 \"x\"\n\n#endif\n#endif /* !defined( PRIx32 ) */\n\n#if !defined( PRIx64 )\n#if defined( WINAPI )\n#define PRIx64 \"I64x\"\n\n#elif __WORDSIZE == 64\n#define PRIx64 \"lx\"\n\n#else\n#define PRIx64 \"llx\"\n\n#endif\n#endif /* !defined( PRIx64 ) */\n\n#endif /* !defined( HAVE_PYCONFIG_H ) */\n\n/* Fallback for systems without printf %jd definition\n */\n#if defined( HAVE_PRINTF_JD )\n#define PRIjd\t\"jd\"\n#define PRIji\t\"ji\"\n#define PRIju\t\"ju\"\n#define PRIjx\t\"jx\"\n\n#elif SIZEOF_OFF_T == 8\n#define PRIjd\tPRId64\n#define PRIji\tPRIi64\n#define PRIju\tPRIu64\n#define PRIjx\tPRIx64\n\n#else\n#define PRIjd\tPRId32\n#define PRIji\tPRIi32\n#define PRIju\tPRIu32\n#define PRIjx\tPRIx32\n\n#endif /* defined( HAVE_PRINTF_JD ) */\n\n/* Fallback for systems without printf %zd definition\n */\n#if defined( HAVE_PRINTF_ZD )\n#define PRIzd\t\"zd\"\n#define PRIzi\t\"zi\"\n#define PRIzu\t\"zu\"\n#define PRIzx\t\"zx\"\n\n#elif defined( _MSC_VER )\n#define PRIzd\t\"Id\"\n#define PRIzi\t\"Ii\"\n#define PRIzu\t\"Iu\"\n#define PRIzx\t\"Ix\"\n\n#elif SIZEOF_SIZE_T == 8\n#define PRIzd\tPRId64\n#define PRIzi\tPRIi64\n#define PRIzu\tPRIu64\n#define PRIzx\tPRIx64\n\n#else\n#define PRIzd\tPRId32\n#define PRIzi\tPRIi32\n#define PRIzu\tPRIu32\n#define PRIzx\tPRIx32\n\n#endif /* defined( HAVE_PRINTF_ZD ) */\n\n/* Fallback for systems without (U)INTx_MAX definitions\n */\n\n/* The maximum signed 8-bit integer is 127 (0x7f)\n */\n#if !defined( INT8_MAX )\n#define INT8_MAX (0x7f)\n#endif\n\n/* The maximum unsigned 8-bit integer is 256 (0xff)\n */\n#if !defined( UINT8_MAX )\n#define UINT8_MAX (0xff)\n#endif\n\n/* The maximum signed 16-bit integer is 32767 (0x7ffff)\n */\n#if !defined( INT16_MAX )\n#define INT16_MAX (0x7fff)\n#endif\n\n/* The maximum unsigned 16-bit integer is 65535 (0xffff)\n */\n#if !defined( UINT16_MAX )\n#define UINT16_MAX (0xffff)\n#endif\n\n/* The maximum signed 32-bit integer is 2147483647 (0x7fffffff)\n */\n#if !defined( INT32_MAX )\n#define INT32_MAX (0x7fffffffL)\n#endif\n\n/* The maximum unsigned 32-bit integer is 4294967295 (0xffffffff)\n */\n#if !defined( UINT32_MAX )\n#define UINT32_MAX (0xffffffffUL)\n#endif\n\n/* The minimum signed 64-bit integer is -9223372036854775808 (0x8000000000000000)\n */\n#if !defined( INT64_MIN )\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define INT64_MIN (0x8000000000000000UL)\n#else\n#define INT64_MIN (0x8000000000000000ULL)\n#endif\n#endif /* !defined( INT64_MIN ) */\n\n/* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff)\n */\n#if !defined( INT64_MAX )\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define INT64_MAX (0x7fffffffffffffffUL)\n#else\n#define INT64_MAX (0x7fffffffffffffffULL)\n#endif\n#endif /* !defined( INT64_MAX ) */\n\n/* The maximum unsigned 64-bit integer is 18446744073709551615 (0xffffffffffffffff)\n */\n#if !defined( UINT64_MAX )\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define UINT64_MAX (0xffffffffffffffffUL)\n#else\n#define UINT64_MAX (0xffffffffffffffffULL)\n#endif\n#endif /* !defined( UINT64_MAX ) */\n\n/* The maximum signed integer\n */\n#if !defined( INT_MAX )\n#define INT_MAX INT32_MAX\n#endif\n\n/* The maximum unsigned integer\n */\n#if !defined( UINT_MAX )\n#define UINT_MAX UINT32_MAX\n#endif\n\n/* The maximum signed long integer\n */\n#if !defined( LONG_MAX )\n#define LONG_MAX INT32_MAX\n#endif\n\n/* The maximum unsigned long integer\n */\n#if !defined( ULONG_MAX )\n#define ULONG_MAX UINT32_MAX\n#endif\n\n/* The maximum signed size type is platform dependent\n */\n#if !defined( SSIZE_MAX )\n\n#if defined( WINAPI )\n\n#if defined( _WIN64 )\n#define SSIZE_MAX INT64_MAX\n#else\n#define SSIZE_MAX INT32_MAX\n#endif\n\n#else\n\n#if __WORDSIZE == 64\n#define SSIZE_MAX INT64_MAX\n#else\n#define SSIZE_MAX INT32_MAX\n#endif\n\n#endif /* WINAPI */\n\n#endif /* SSIZE_MAX */\n\n#endif /* !defined( _TYPES_H ) */\n\n"
  },
  {
    "path": "common/wide_string.h",
    "content": "/*\n * Wide character string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _WIDE_STRING_H )\n#define _WIDE_STRING_H\n\n#include \"common.h\"\n#include \"memory.h\"\n#include \"types.h\"\n\n#if defined( HAVE_WCHAR_H ) || defined( WINAPI )\n#include <wchar.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* Intermediate version of the macro required\n * for correct evaluation predefined string\n */\n#define _WIDE_STRING_INTERMEDIATE( string ) \\\n\tL ## string\n\n#define _WIDE_STRING( string ) \\\n\t_WIDE_STRING_INTERMEDIATE( string )\n\n/* String allocation\n */\n#define wide_string_allocate( size ) \\\n\t(wchar_t *) memory_allocate( sizeof( wchar_t ) * ( size ) )\n\n/* String reallocation\n */\n#define wide_string_reallocate( string, size ) \\\n\t(wchar_t *) memory_reallocate( string, ( sizeof( wchar_t ) * ( size ) ) )\n\n/* String length\n */\n#if defined( HAVE_WCSLEN ) || defined( WINAPI )\n#define wide_string_length( string ) \\\n\twcslen( string )\n#endif\n\n/* String compare\n */\n#if defined( HAVE_WMEMCMP )\n#define wide_string_compare( string1, string2, size ) \\\n\twmemcmp( (void *) string1, (void *) string2, size )\n\n#elif defined( HAVE_WCSNCMP ) || defined( WINAPI )\n#define wide_string_compare( string1, string2, size ) \\\n\twcsncmp( string1, string2, size )\n#endif\n\n/* Caseless string compare\n */\n#if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ >= 0x0551 ) )\n#define wide_string_compare_no_case( string1, string2, size ) \\\n\t_wcsnicmp( string1, string2, size )\n\n#elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_WCSNICMP )\n#define wide_string_compare_no_case( string1, string2, size ) \\\n\twcsnicmp( string1, string2, size )\n\n#elif defined( HAVE_WCSNCASECMP )\n#define wide_string_compare_no_case( string1, string2, size ) \\\n\twcsncasecmp( string1, string2, size )\n\n#elif defined( HAVE_WCSCASECMP )\n#define wide_string_compare_no_case( string1, string2, size ) \\\n\twcscasecmp( string1, string2 )\n#endif\n\n/* String copy\n */\n#if defined( HAVE_WMEMCPY )\n#define wide_string_copy( destination, source, size ) \\\n\t(wchar_t *) wmemcpy( (void *) destination, (void *) source, size )\n\n#elif defined( HAVE_WCSNCPY ) || defined( WINAPI )\n#define wide_string_copy( destination, source, size ) \\\n\twcsncpy( destination, source, size )\n#endif\n\n/* String character search\n */\n#if defined( HAVE_WMEMCHR )\n#define wide_string_search_character( string, character, size ) \\\n\t(wchar_t *) wmemchr( (void *) string, (wchar_t) character, size )\n\n#elif defined( HAVE_WCSCHR ) || defined( WINAPI )\n#define wide_string_search_character( string, character, size ) \\\n\twcschr( string, (wchar_t) character )\n\n#endif\n\n/* String reverse character search\n */\n#if defined( HAVE_WMEMRCHR )\n#define wide_string_search_character_reverse( string, character, size ) \\\n\t(wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size )\n\n#elif defined( HAVE_WCSRCHR ) || defined( WINAPI )\n/* (void)(size) is used to suppress unused variable warnings */\n#define wide_string_search_character_reverse( string, character, size ) \\\n\twcsrchr( string, (wchar_t) character ); (void)(size)\n#endif\n\n/* String sub-string search\n */\n#if defined( HAVE_WCSSTR ) || defined( WINAPI )\n#define wide_string_search_string( string, substring, size ) \\\n\twcsstr( string, substring )\n\n#endif\n\n/* String formatted print (snwprintf)\n */\n#if defined( _MSC_VER )\n#define wide_string_snwprintf( target, size, ... ) \\\n\tswprintf_s( target, size, __VA_ARGS__ )\n\n#elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define wide_string_snwprintf \\\n\tsnwprintf\n\n#elif defined( WINAPI )\n#define wide_string_snwprintf( target, size, ... ) \\\n\tsnwprintf( target, size, __VA_ARGS__ )\n\n#elif defined( HAVE_SWPRINTF )\n#define wide_string_snwprintf( target, size, ... ) \\\n\tswprintf( target, size, __VA_ARGS__ )\n#endif\n\n/* Variable arguments formatted print to string function (vsnwprintf)\n */\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )\n#define wide_string_vsnwprintf \\\n\t_vsnwprintf\n\n#elif defined( WINAPI )\n#define wide_string_vsnwprintf( string, size, format, ... ) \\\n\t_vsnwprintf( string, size, format, __VA_ARGS__ )\n\n#elif defined( HAVE_VSWPRINTF )\n#define wide_string_vsnwprintf( string, size, format, ... ) \\\n\tvswprintf( string, size, format, __VA_ARGS__ )\n#endif\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _WIDE_STRING_H ) */\n\n"
  },
  {
    "path": "configure.ac",
    "content": "AC_PREREQ([2.71])\n\nAC_INIT(\n  [libfsntfs],\n  [20260208],\n  [joachim.metz@gmail.com])\n\nAC_CONFIG_SRCDIR(\n  [include/libfsntfs.h.in])\n\nAM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])\nAM_EXTRA_RECURSIVE_TARGETS([sources splint])\n\nAC_CONFIG_MACRO_DIR([m4])\n\ndnl Check for host type\nAC_CANONICAL_HOST\n\ndnl Check for libtool DLL support\nLT_INIT([win32-dll])\n\ndnl Checks for programs\nAC_PROG_CC\nAC_PROG_GCC_TRADITIONAL\nAC_PROG_CXX\nAC_PROG_MAKE_SET\nAC_PROG_INSTALL\n\ndnl Check for libtool\nAC_SUBST(LIBTOOL_DEPS)\n\ndnl Check for pkg-config\nAC_PATH_PROG(PKGCONFIG,[pkg-config])\n\ndnl Support of internationalization (i18n)\nAM_GNU_GETTEXT([external])\nAM_GNU_GETTEXT_VERSION([0.21])\n\ndnl Check for compiler language support\nAC_C_CONST\nAC_C_VOLATILE\n\ndnl Check for large file support\nAC_SYS_LARGEFILE\n\ndnl Check if shared library support should be disabled\nAX_COMMON_CHECK_DISABLE_SHARED_LIBS\n\ndnl Check if tools should be build as static executables\nAX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES\n\ndnl Check if WINAPI support should be enabled\nAX_COMMON_CHECK_ENABLE_WINAPI\n\ndnl Check if wide character type should be enabled\nAX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE\n\ndnl Check if verbose output should be enabled\nAX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT\n\ndnl Check if debug output should be enabled\nAX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT\n\ndnl Check for type definitions\nAX_TYPES_CHECK_LOCAL\n\ndnl Check if common required headers and functions are available\nAX_COMMON_CHECK_LOCAL\n\ndnl Check if libcerror or required headers and functions are available\nAX_LIBCERROR_CHECK_ENABLE\n\ndnl Check if libcthreads or required headers and functions are available\nAX_LIBCTHREADS_CHECK_ENABLE\n\ndnl Check if libcdata or required headers and functions are available\nAX_LIBCDATA_CHECK_ENABLE\n\ndnl Check if libclocale or required headers and functions are available\nAX_LIBCLOCALE_CHECK_ENABLE\n\ndnl Check if libcnotify or required headers and functions are available\nAX_LIBCNOTIFY_CHECK_ENABLE\n\ndnl Check if libcsplit or required headers and functions are available\nAX_LIBCSPLIT_CHECK_ENABLE\n\ndnl Check if libuna or required headers and functions are available\nAX_LIBUNA_CHECK_ENABLE\n\ndnl Check if libcfile or required headers and functions are available\nAX_LIBCFILE_CHECK_ENABLE\n\ndnl Check if libcpath or required headers and functions are available\nAX_LIBCPATH_CHECK_ENABLE\n\ndnl Check if libbfio or required headers and functions are available\nAX_LIBBFIO_CHECK_ENABLE\n\ndnl Check if libfcache or required headers and functions are available\nAX_LIBFCACHE_CHECK_ENABLE\n\ndnl Check if libfdata or required headers and functions are available\nAX_LIBFDATA_CHECK_ENABLE\n\ndnl Check if libfdatetime or required headers and functions are available\nAX_LIBFDATETIME_CHECK_ENABLE\n\ndnl Check if libfguid or required headers and functions are available\nAX_LIBFGUID_CHECK_ENABLE\n\ndnl Check if libfwnt or required headers and functions are available\nAX_LIBFWNT_CHECK_ENABLE\n\ndnl Check if libfsntfs required headers and functions are available\nAX_LIBFSNTFS_CHECK_LOCAL\n\ndnl Check if libfsntfs Python bindings (pyfsntfs) required headers and functions are available\nAX_PYTHON_CHECK_ENABLE\n\nAS_IF(\n  [test \"x${ac_cv_enable_python}\" != xno],\n  [dnl Headers included in pyfsntfs/pyfsntfs_error.c\n  AC_CHECK_HEADERS([stdarg.h varargs.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_stdarg_h\" != xyes && test \"x$ac_cv_header_varargs_h\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing headers: stdarg.h and varargs.h],\n      [1])\n    ])\n  ])\n\ndnl Check if libfusn or required headers and functions are available\nAX_LIBFUSN_CHECK_ENABLE\n\ndnl Check if libhmac or required headers and functions are available\nAX_LIBHMAC_CHECK_ENABLE\n\ndnl Check if libfuse or required headers and functions are available\nAX_LIBFUSE_CHECK_ENABLE\n\ndnl Check if fsntfstools required headers and functions are available\nAX_FSNTFSTOOLS_CHECK_LOCAL\n\ndnl Check if DLL support is needed\nAX_LIBFSNTFS_CHECK_DLL_SUPPORT\n\ndnl Check if tests required headers and functions are available\nAX_TESTS_CHECK_LOCAL\nAX_TESTS_CHECK_OSSFUZZ\n\ndnl Set additional compiler flags\nCFLAGS=\"$CFLAGS -Wall\";\n\ndnl Check if requires and build requires should be set in spec file\nAS_IF(\n  [test \"x$ac_cv_libcerror\" = xyes || test \"x$ac_cv_libcthreads\" = xyes || test \"x$ac_cv_libcdata\" = xyes || test \"x$ac_cv_libclocale\" = xyes || test \"x$ac_cv_libcnotify\" = xyes || test \"x$ac_cv_libcsplit\" = xyes || test \"x$ac_cv_libuna\" = xyes || test \"x$ac_cv_libcfile\" = xyes || test \"x$ac_cv_libcpath\" = xyes || test \"x$ac_cv_libbfio\" = xyes || test \"x$ac_cv_libfcache\" = xyes || test \"x$ac_cv_libfdata\" = xyes || test \"x$ac_cv_libfdatetime\" = xyes || test \"x$ac_cv_libfguid\" = xyes || test \"x$ac_cv_libfwnt\" = xyes],\n  [AC_SUBST(\n    [libfsntfs_spec_requires],\n    [Requires:])\n  ])\n\nAS_IF(\n  [test \"x$ac_cv_libfusn\" = xyes || test \"x$ac_cv_libhmac\" = xyes || test \"x$ac_cv_libcrypto\" != xno || test \"x$ac_cv_libfuse\" != xno],\n  [AC_SUBST(\n    [libfsntfs_spec_tools_build_requires],\n    [BuildRequires:])\n  ])\n\ndnl Set the date for the dpkg files\nAC_SUBST(\n  [DPKG_DATE],\n  [`date -R 2> /dev/null`])\n\ndnl Set the date for the spec file\nAC_SUBST(\n  [SPEC_DATE],\n  [`date +\"%a %b %e %Y\" 2> /dev/null`])\n\ndnl Generate Makefiles\nAC_CONFIG_FILES([Makefile])\nAC_CONFIG_FILES([include/Makefile])\nAC_CONFIG_FILES([common/Makefile])\nAC_CONFIG_FILES([libcerror/Makefile])\nAC_CONFIG_FILES([libcthreads/Makefile])\nAC_CONFIG_FILES([libcdata/Makefile])\nAC_CONFIG_FILES([libclocale/Makefile])\nAC_CONFIG_FILES([libcnotify/Makefile])\nAC_CONFIG_FILES([libcsplit/Makefile])\nAC_CONFIG_FILES([libuna/Makefile])\nAC_CONFIG_FILES([libcfile/Makefile])\nAC_CONFIG_FILES([libcpath/Makefile])\nAC_CONFIG_FILES([libbfio/Makefile])\nAC_CONFIG_FILES([libfcache/Makefile])\nAC_CONFIG_FILES([libfdata/Makefile])\nAC_CONFIG_FILES([libfdatetime/Makefile])\nAC_CONFIG_FILES([libfguid/Makefile])\nAC_CONFIG_FILES([libfwnt/Makefile])\nAC_CONFIG_FILES([libfsntfs/Makefile])\nAC_CONFIG_FILES([pyfsntfs/Makefile])\nAC_CONFIG_FILES([libfusn/Makefile])\nAC_CONFIG_FILES([libhmac/Makefile])\nAC_CONFIG_FILES([fsntfstools/Makefile])\nAC_CONFIG_FILES([po/Makefile.in])\nAC_CONFIG_FILES([po/Makevars])\nAC_CONFIG_FILES([manuals/Makefile])\nAC_CONFIG_FILES([tests/Makefile])\nAC_CONFIG_FILES([ossfuzz/Makefile])\nAC_CONFIG_FILES([msvscpp/Makefile])\ndnl Generate header files\nAC_CONFIG_FILES([include/libfsntfs.h])\nAC_CONFIG_FILES([include/libfsntfs/definitions.h])\nAC_CONFIG_FILES([include/libfsntfs/features.h])\nAC_CONFIG_FILES([include/libfsntfs/types.h])\nAC_CONFIG_FILES([libfsntfs/libfsntfs_definitions.h])\ndnl Generate distribution specific files\nAC_CONFIG_FILES([common/types.h])\nAC_CONFIG_FILES([dpkg/changelog])\nAC_CONFIG_FILES([libfsntfs/libfsntfs.rc])\nAC_CONFIG_FILES([libfsntfs.pc])\nAC_CONFIG_FILES([libfsntfs.spec])\nAC_CONFIG_FILES([setup.cfg])\ndnl Generate a source configuration file\nAC_CONFIG_HEADERS([common/config.h])\n\nAC_OUTPUT\n\ndnl Print a summary\nAC_MSG_NOTICE([\nBuilding:\n   libcerror support:                           $ac_cv_libcerror\n   libcthreads support:                         $ac_cv_libcthreads\n   libcdata support:                            $ac_cv_libcdata\n   libclocale support:                          $ac_cv_libclocale\n   libcnotify support:                          $ac_cv_libcnotify\n   libcsplit support:                           $ac_cv_libcsplit\n   libuna support:                              $ac_cv_libuna\n   libcfile support:                            $ac_cv_libcfile\n   libcpath support:                            $ac_cv_libcpath\n   libbfio support:                             $ac_cv_libbfio\n   libfcache support:                           $ac_cv_libfcache\n   libfdata support:                            $ac_cv_libfdata\n   libfdatetime support:                        $ac_cv_libfdatetime\n   libfguid support:                            $ac_cv_libfguid\n   libfwnt support:                             $ac_cv_libfwnt\n   libfusn support:                             $ac_cv_libfusn\n   libhmac support:                             $ac_cv_libhmac\n   MD5 support:                                 $ac_cv_libhmac_md5\n   FUSE support:                                $ac_cv_libfuse\n\nFeatures:\n   Multi-threading support:                     $ac_cv_libcthreads_multi_threading\n   Wide character type support:                 $ac_cv_enable_wide_character_type\n   fsntfstools are build as static executables: $ac_cv_enable_static_executables\n   Python (pyfsntfs) support:                   $ac_cv_enable_python\n   Verbose output:                              $ac_cv_enable_verbose_output\n   Debug output:                                $ac_cv_enable_debug_output\n]);\n\n"
  },
  {
    "path": "documentation/New Technologies File System (NTFS).asciidoc",
    "content": "= New Technologies File System (NTFS)\nAnalysis of NTFS\n\n:toc:\n:toclevels: 4\n\n:numbered!:\n[abstract]\n== Summary\n\nNTFS is the primary file system for Microsoft Windows versions that are based\non Windows NT. This specification is based on publicly available work on the\nformat and was enhanced by analyzing test data.\n\nThis document is intended as a working document of the data format specification\nfor the libfsntfs project.\n\n[preface]\n== Document information\n\n[cols=\"1,5\"]\n|===\n| Author(s): | Joachim Metz <joachim.metz@gmail.com>\n| Abstract: | This document contains information about the New Technologies File System (NTFS)\n| Classification: | Public\n| Keywords: | New Technologies File System, NTFS\n|===\n\n[preface]\n== License\n\n....\nCopyright (C) 2009-2025, Joachim Metz <joachim.metz@gmail.com>.\nPermission is granted to copy, distribute and/or modify this document under the\nterms of the GNU Free Documentation License, Version 1.3 or any later version\npublished by the Free Software Foundation; with no Invariant Sections, no\nFront-Cover Texts, and no Back-Cover Texts. A copy of the license is included\nin the section entitled \"GNU Free Documentation License\".\n....\n\n[preface]\n== Revision history\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Version | Author | Date | Comments\n| 0.0.1 | J.B. Metz | August 2009 +\nSeptember 2010 +\nOctober 2010 +\nNovember 2010 +\nDecember 2010 | Initial version, based on earlier notes.\n| 0.0.2 | J.B. Metz | March 2011 | Additional information about multi data run MFT.\n| 0.0.3 | J.B. Metz | May 2012 | Additional information.\n| 0.0.4 | J.B. Metz | February 2014 | Additional information.\n| 0.0.5 | J.B. Metz | July 2014 +\nAugust 2014 | Textual changes and additional information.\n| 0.0.6 | J.B. Metz | March 2015 | Additional information and switched to asciidoc format.\n| 0.0.7 | J.B. Metz | May 2015 | Additional information.\n| 0.0.8 | J.B. Metz | July 2015 | Textual changes.\n| 0.0.9 | J.B. Metz | August 2015 | Additional information.\n| 0.0.10 | J.B. Metz | August 2015 | Additional information regarding index and security descriptors.\n| 0.0.11 | J.B. Metz | January 2016 | Additional information about common alternate data stream.\n| 0.0.12 | J.B. Metz | January 2016 | Additional information about extended attributes.\n| 0.0.13 | J.B. Metz | March 2016 | Small changes.\n| 0.0.14 | J.B. Metz | April 2016 | Small changes.\n| 0.0.15 | J.B. Metz | June 2018 | Corrected typos.\n| 0.0.16 | J.B. Metz | January 2019 | Changes to format.\n| 0.0.17 | J.B. Metz | August 2019 | Additional information regarding volumes created by Windows 10 (1903) and mkntfs.\n| 0.0.18 | J.B. Metz | September 2019 | Additional information regarding Windows Overlay Filter (WOF) compressed data.\n| 0.0.19 | J.B. Metz | November 2019 | Additional information regarding short file names.\n| 0.0.20 | J.B. Metz | January 2020 | Additional information regarding $STANDARD_INFORMATION and $ATTRIBUTE_LIST attributes.\n| 0.0.21 | J.B. Metz | April 2020 | Additional information regarding compressed data runs.\n| 0.0.22 | J.B. Metz | May 2020 | Additional information regarding LZNT1 compressed block corruption scenarios.\n| 0.0.23 | J.B. Metz | December 2020 | Additional information regarding reparse point tag values.\n| 0.0.24 | J.B. Metz | October 2021 | Small changes.\n| 0.0.25 | J.B. Metz | February 2022 | Additional information regarding index entry size.\n| 0.0.26 | J.B. Metz | December 2022 | Additional information regarding $VOLUME_INFORMATION flags.\n| 0.0.27 | J.B. Metz | July 2023 | Additional information file name UTF-16 strings.\n| 0.0.28 | J.B. Metz | January 2025 | Textual changes.\n|===\n\n:numbered:\n== Overview\n\nNTFS is the primary file system for Microsoft Windows versions that are based\non Windows NT.\n\n[yellow-background]*TODO describe relation to OS2 HPFS*\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Characteristics | Description\n| Byte order | little-endian\n| Date and time values | FILETIME in UTC\n| Character strings | ASCII strings are Single Byte Character (SBC) or Multi Byte Character (MBC) string stored with a codepage. Sometimes referred to as ANSI string representation. +\nThough technically maybe incorrect, this document will use term (extended) ASCII string. +\nUnicode strings are stored in UTF-16 little-endian without the byte order mark (BOM).\n|===\n\n=== Versions\n\nThere are multiple version of NTFS.\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| NTFS version | Remarks\n| 1.0 | Introduced in Windows NT 3.1\n| 1.1 | Introduced in Windows NT 3.5, also seen to be used by Windows NT 3.1\n| 1.2 | Introduced in Windows NT 3.51\n| 3.0 | Introduced in Windows 2000\n| 3.1 | Introduced in Windows XP\n|===\n\n[yellow-background]*Need test images for version 1.0 and 1.1*\n\n[NOTE]\nThe versions mentioned above are the version as used by NTFS. Another common\nversioning schema uses the Windows version, e.g. NTFS 5.0 is the version of\nNTFS used on Windows XP which is version 3.1 in schema mentioned above.\n\n=== Test version\n\nThe following version of programs were used to test the information within this\ndocument:\n\n* Windows NT 3.1 (version 1.1)\n* Windows NT4 (version 1.2)\n* Windows 2000 (version 3.0)\n* Windows XP SP3 (version 3.1)\n* Windows 2003 (version 3.1)\n* Windows Vista (version 3.1)\n* Windows 2008 (version 3.1)\n* Windows 7 (version 3.1)\n* Windows 8 (version 3.1)\n* Windows 10 (1809, 1903) (version 3.1)\n* Windows 11 (21H2) (version 3.1)\n* NTFS-3G\n\n[NOTE]\nWindows 10 (1809) has been observed to use NTFS version 1.2 for 64k cluster\nblock size.\n\n== Terminology\n\n=== Cluster\n\nNTFS refers to it file system blocks as clusters. Note that these are not the\nsame as the physical clusters of a harddisk. For clarity these are referred to\nas cluster blocks. In other sources they are also referred to as logical\nclusters which are numbered globally (or absolute).\n\nTypically the cluster block is 8 sectors (8 x 512 = 4096 bytes) in size.\n\n=== Virtual cluster\n\nThe term virtual cluster refers to cluster blocks which are numbered locally\n(or relative).\n\n=== Long and short (file) name\n\nIn Windows terminology the name of a file (or directory) can either be short or\nlong. The short name is an equivalent of the filename in the (DOS) 8.3 format.\nThe long name is actual the (full) name of the file. The term long refers to\nthe aspect that the name is longer than the short variant. Because most\ndocumentation refer to the (full) name as the long name, for clarity sake so\nwill this document.\n\n== The volume\n\nEverything on an NTFS volume is a file. There are two types of files:\n\n* files that contain volume and file system metadata (referred to as metadata files);\n* files that contain data (referred to as files).\n\n=== The metadata files\n\nNTFS uses the Master File Table (MFT) to store information about files and\ndirectories. The MFT entries reference the different volume and file system\nmetadata. There are several predefined metadata files.\n\nThe following metadata files are predefined and use a fixed MFT entry index.\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| MFT entry index | Filename | Description\n| 0 | $MFT | Master File Table\n| 1 | $MFTMirr | Back up of the first 4 entries of the Master File Table\n| 2 | $LogFile | Metadata transaction journal\n| 3 | $Volume | Volume information\n| 4 | $AttrDef | MFT entry attribute definitions\n| 5 | . | Root directory\n| 6 | $Bitmap | Cluster block allocation bitmap\n| 7 | $Boot | Boot record (or boot code)\n| 8 | $BadClus | Bad clusters\n| 9 | $Quota | Quota information +\nLast used in NTFS version 1.2\n| 9 | $Secure | Security and access control information +\nIntroduced in NTFS version 3.0\n| 10 | $UpCase | Table of uppercase characters used for ensuring case insensitivity in Windows and DOS name spaces.\n| 11 | $Extend | A directory containing extended metadata files\n| 12-15 | | [yellow-background]*Unknown (Reserved)* +\nMarked as in use but empty\n| 16-23 | | Unused +\nMarked as unused\n3+| _As of NTFS version 3.0_\n| 24 | $Extend\\$Quota | Quota information +\nWas MFT entry 9 in Windows NT 4\n| 25 | $Extend\\$ObjId | Unique file identifiers for distributed link tracking\n| 26 | $Extend\\$Reparse | Backreferences to reparse points\n3+| _As of Windows Vista_ ([yellow-background]*or server 2003?*) +\n_Transactional NTFS metadata (See section: <<transactional_ntfs,Transactional NTFS (TxF)>>)_\n| 27 | $Extend\\$RmMetadata | Resource manager metadata directory\n| 28 | $Extend\\$RmMetadata\\$Repair | Repair information\n| 29 or 30 | $Extend\\$RmMetadata\\$TxfLog | Transactional NTFS (TxF) log metadata directory\n| 30 or 31 | $Extend\\$RmMetadata\\$Txf | Transactional NTFS (TxF) metadata directory\n| 31 or 32 | $Extend\\$RmMetadata\\$TxfLog\\$Tops | TxF Old Page Stream (TOPS) file +\nUsed to store data that has been overwritten inside a currently active transaction\n| 32 or 33 | $Extend\\$RmMetadata\\$TxfLog\\$TxfLog.blf | Transactional NTFS (TxF) base log metadata file\n3+| _As of Windows 10_\n| 29 | $Extend\\$Deleted | Temporary location for files that have an open handle but a request has been made to delete them\n3+| _Common_\n| | ... | A file or directory\n|===\n\nThe following metadata files are predefined, however the MFT entry index is\ncommonly used but not fixed.\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| MFT entry index | Filename | Description\n| | $Extend\\$UsnJrnl | USN change journal +\nSee section: <<usn_change_journal,USN change journal>> +\n[yellow-background]*Has this file been added in Windows XP SP3? Otherwise what are reasons for it to not be present?*\n|===\n\n== The volume header\n\nThe volume header is stored at the start of the volume (in the $Boot metadata\nfile) and contains:\n\n* the volume signature\n* the BIOS parameter block\n* the boot loader\n\nThe volume header is 512 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 3 | | Boot entry point +\nOften contains: +\neb52   jmp 0x52 +\n90       nop +\nThis is a jump instruction to the bootcode at offset 84 followed by a no-operation.\n| 3 | 8 | \"NTFS\\x20\\x20\\x20\\x20\" | File system signature +\n(Also known as OEM and/or dummy identifier) +\n4+| _DOS version 2.0 BIOS parameter block (BPB)_\n| 11 | 2 | | Bytes per sector +\nValues supported by mkntfs: 256, 512, 1024, 2048 and 4096\n| 13 | 1 | | Sectors per cluster block +\nSee below.\n| 14 | 2 | 0x00 | [yellow-background]*Unknown (Reserved Sectors)* +\nnot used by NTFS and must be 0 `[MSDN]`\n| 16 | 1 | 0x00 | Number of File Allocation Tables (FATs) +\nnot used by NTFS and must be 0 `[MSDN]`\n| 17 | 2 | 0 | Root directory entries +\nnot used by NTFS and must be 0 `[MSDN]`\n| 19 | 2 | | [yellow-background]*Unknown (Total number of sectors (16-bit))* +\n[yellow-background]*Used if the total of number of sectors fits in 16-bit?*\n| 21 | 1 | | Media descriptor +\nSee section: <<media_descriptor,Media descriptor>>\n| 22 | 2 | 0x00 | Sectors Per File Allocation Table (FAT) +\nnot used by NTFS and must be 0 `[MSDN]`\n4+| _DOS version 3.4 BIOS parameter block (BPB)_\n| 24 | 2 | 0x3f | Sectors per track +\nNot used by NTFS `[MSDN]`\n| 26 | 2 | 0xff | Number of heads +\nNot used by NTFS `[MSDN]`\n| 28 | 4 | 0x3f | Number of hidden sectors +\nNot used by NTFS `[MSDN]`\n| 32 | 4 | 0x00 | [yellow-background]*Unknown (Total number of sectors (32-bit))* +\n[yellow-background]*Used if the total of number of sectors fits in 32-bit?* +\nNot used by NTFS must be 0 `[MSDN]`\n4+| _NTFS version 8.0 BIOS parameter block (BPB) or extended BPB_ +\n_Introduced in Windows NT version 3.1_\n| 36 | 1 | 0x80 | [yellow-background]*Unknown (Disc unit number)* +\nNot used by NTFS `[MSDN]`\n| 37 | 1 | 0x00 | [yellow-background]*Unknown (Flags)* +\nNot used by NTFS `[MSDN]`\n| 38 | 1 | 0x80 | [yellow-background]*Unknown (BPB version signature byte)* +\nNot used by NTFS `[MSDN]`\n| 39 | 1 | 0x00 | [yellow-background]*Unknown (Reserved)* +\nNot used by NTFS `[MSDN]`\n| 40 | 8 | | Total number of sectors (64-bit)\n| 48 | 8 | | Master File Table (MFT) cluster block number\n| 56 | 8 | | Mirror MFT cluster block number\n| 64 | 1 | | MFT entry size +\nSee below.\n| 65 | 3 | | [yellow-background]*Unknown* +\nNot used by NTFS `[MSDN]`\n| 68 | 1 | | Index entry size +\nSee below.\n| 69 | 3 | | [yellow-background]*Unknown* +\nNot used by NTFS `[MSDN]`\n| 72 | 8 | | NTFS volume serial number +\nSee below.\n| 80 | 4 | 0x00 | Checksum +\nnot used by NTFS `[MSDN]`\n4+|\n| 84 | 426 | | Bootcode +\n[yellow-background]*What is the exact end of the bootcode and are there no trailing values?*\n| 510 | 2 | 0x55 0xaa | Sector signature\n|===\n\nThe sectors per cluster block value as used by mkntfs is defined as following:\n\n* Values 0 to 128 represent sizes of 0 to 128 sectors.\n* Values 244 to 255 represent sizes of `2^(256-n)` sectors.\n* Other values are unknown.\n\nThe MFT entry size and index entry size are defined as following:\n\n* Values 0 to 127 represent sizes of 0 to 127 cluster blocks.\n* Values 128 to 255 represent sizes of `2^(256-n)` bytes; or `2^(-n)` if considered as a signed byte.\n* Other values are not considered valid.\n\nThe cluster block size can be determined as following:\n\n....\ncluster block size = bytes per sector x sectors per cluster block\n....\n\n[NOTE]\nDifferent NTFS implementations support different cluster block sizes.\n\nKnown supported cluster block size:\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Cluster block size | Bytes per sector | Supported by\n| 256 | 256 | mkntfs\n| 512 | 256 - 512 | mkntfs, ntfs3g, Windows\n| 1024 | 256 - 1024 | mkntfs, ntfs3g, Windows\n| 2048 | 256 - 2048 | mkntfs, ntfs3g, Windows\n| 4096 | 256 - 4096 | mkntfs, ntfs3g, Windows\n| 8192 | 256 - 4096 | mkntfs, ntfs3g, Windows\n| 16K (16384) | 256 - 4096 | mkntfs, ntfs3g, Windows\n| 32K (32768) | 256 - 4096 | mkntfs, ntfs3g, Windows\n| 64K (65536) | 256 - 4096 | mkntfs, ntfs3g, Windows\n| 128K (131072) | 256 - 4096 | mkntfs, ntfs3g, Windows 10 (1903)\n| 256K (262144) | 256 - 4096 | mkntfs, ntfs3g, Windows 10 (1903)\n| 512K (524288) | 256 - 4096 | mkntfs, ntfs3g, Windows 10 (1903)\n| 1M (1048576) | 256 - 4096 | mkntfs, ntfs3g, Windows 10 (1903)\n| 2M (2097152) | 512 - 4096 | mkntfs, ntfs3g, Windows 10 (1903)\n|===\n\n[NOTE]\nWindows 10 (1903) requires the partition containing the NTFS file system to be\naligned with the cluster block size. For example for a cluster block size of 128k\nthe partition must 128 KiB aligned. The default partition partition alignment\nappears to be 64 KiB.\n\n[NOTE]\nmkntfs restricts the cluster size to: bytes per sector >= cluster size > 4096 * bytes per sector\n\nThe MFT offset can be determined as following:\n\n....\nMFT offset = volume header offset\n           + ( MFT cluster block number x Cluster block size )\n....\n\nNote that the lower 32-bit part of the NTFS volume serial number is the WINAPI\nvolume serial number. E.g. compare the output of:\n\n....\nfsutil fsinfo volumeinfo C:\nfsutil fsinfo ntfsinfo C:\n....\n\nOften the volume will be smaller than the underlying partition. A (nearly\nidentical) backup of the volume header is stored in last sector of cluster\nblock, that follows the last cluster block of the volume. Often this is the 512\nbytes after the last sector of the volume, but not necessarily. The backup\nvolume header is not included in the volume size.\n\n=== BitLocker Drive Encryption (BDE)\n\nBitLocker Drive Encryption (BDE) uses the file system signature: \"-FVE-FS-\".\nWhere FVE is an abbreviation of Full Volume Encryption.\n\nThe data structures of BDE on Windows Vista and 7 differ.\n\nA Windows Vista BDE volume starts with:\n\n....\neb 52 90 2d 46 56 45 26 46 53 2d\n....\n\nA Windows 7 BDE volume starts with:\n\n....\neb 58 90 2d 46 56 45 26 46 53 2d\n....\n\nBDE is largely a stand-alone but has some integration with NTFS. For more\ninformation about BDE see https://github.com/libyal/libbde/blob/main/documentation/BitLocker%20Drive%20Encryption%20(BDE)%20format.asciidoc[[LIBBDE\\]].\n\n=== Volume Shadow Snapshots (VSS)\n\nVolume Shadow Snapshots (VSS) uses the GUID\n3808876b-c176-4e48-b7ae-04046e6cc752 (stored in little-endian) to identify its\ndata. VSS is largely a stand-alone but has some integration with NTFS.\n\nFor more information about VSS see https://github.com/libyal/libvshadow/blob/main/documentation/Volume%20Shadow%20Snapshot%20(VSS)%20format.asciidoc[[LIBVSHADOW\\]].\n\n=== [[media_descriptor]]Media descriptor\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Bit(s) | Identifier | Description\n| 0 | | Sides: +\n0 => single-sided +\n1 => double-sided\n| 1 | | Track size: +\n0 => 9 sectors per track +\n1 => 8 sectors per track\n| 2 | | Density: +\n0 => 80 tracks +\n1 => 40 tracks\n| 3 | | Type: +\n0 => Fixed disc +\n1 => Removable disc\n| 4 – 7 | | Always set to 1\n|===\n\n=== The boot loader\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 512 | | | [yellow-background]*Windows NT (boot) loader* +\n[yellow-background]*NTLDR/BOOTMGR*\n|===\n\n== The Master File Table (MFT)\n\nThe MFT consist of an array of MFT entries. The offset of the MFT table can be\nfound in the volume header and the size of the MFT is defined by the MFT entry\nof the $MFT metadata file.\n\n[NOTE]\nThe MFT can consists of multiple data ranges, defined by the data runs in the\n$MFT metadata file.\n\n=== MFT entry\n\nAlthough the size of a MFT entry is defined in the volume header is commonly\n1024 bytes in size and consists of:\n\n* The MFT entry header\n* The fix-up values\n* An array of MFT attribute values\n* Padding, which should contain 0-byte values\n\n[NOTE]\nThe MFT entry can be filled entirely with 0-byte values. Seen in Windows XP\nfor MFT entry indexes 16 - 23.\n\n==== MFT entry header\n\nThe MFT entry header (FILE_RECORD_SEGMENT_HEADER) is 42 or 48 bytes in size\nand consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _MULTI_SECTOR_HEADER_\n| 0 | 4 | \"BAAD\" +\n\"FILE\" | Signature\n| 4 | 2 | | The fix-up values offset +\nContains an offset relative from the start of the MFT entry +\nAccording to `[MSDN]` this value is the update sequence array offset\n| 6 | 2 | | The number of fix-up values +\nAccording to `[MSDN]` this value is the update sequence array size.\n4+|\n| 8 | 8 | | Metadata transaction journal sequence number +\nContains a $LogFile Sequence Number (LSN)\n| 16 | 2 | | Sequence (number)\n| 18 | 2 | | Reference (link) count\n| 20 | 2 | | Attributes offset (or first attribute offset) +\nContains an offset relative from the start of the MFT entry\n| 22 | 2 | | Entry flags +\nSee section: <<mft_entry_flags,MFT entry flags>>\n| 24 | 4 | | Used entry size +\nContains the number of bytes of the MFT entry that are in use\n| 28 | 4 | | Total entry size +\nContains the number of bytes of the MFT entry\n[yellow-background]*Could this be used to store data larger than 1024 - header continuously?*\n| 32 | 8 | | Base record file reference +\nSee section: <<file_reference,The file reference>>\n| 40 | 2 | | First available attribute identifier\n4+| _Version 3.0_\n| 42 | 2 | | [yellow-background]*Unknown (wfixupPattern)*\n| 44 | 4 | | [yellow-background]*Unknown*\n4+| _Version 3.1_\n| 42 | 2 | | [yellow-background]*Unknown (wfixupPattern)*\n| 44 | 4 | | MFT entry index\n|===\n\nThe base record file reference indicates if the MFT entry is used to store\nadditional attributes for another MFT entry, e.g. for attribute list attributes.\n\nAccording to `[MSDN]` the sequence number is incremented each time that a file\nrecord segment is freed; it is 0 if the segment is not used.\n\n`[MSDN]` states that the update sequence array must end before the last USHORT\nvalue in the first sector. It also claims the update sequence array size value\ncontains the number of bytes. It seems to be more likely to the number of words.\n\nThe \"BAAD\" signature presumably indicates a bad MFT entry. `[RUSSON05]` states\nthat during chkdsk, if NTFS finds a multi-sector item where the multi-sector\nheader does not match the values at the end of the sector, it marks the item as\n\"BAAD\" and fill it with 0-byte values except for a fix-up value at the end of\nthe first sector. The \"BAAD\" signature has been seen to be used on Windows NT4\nand XP.\n\nIn NT4 (version 1.2) the MFT entry is 42 bytes in size and the fix-up values\nare stored at offset 42. This is likely where the field name wfixupPattern\noriginates from.\n\n=== [[mft_entry_flags]]MFT entry flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x0001 | FILE_RECORD_SEGMENT_IN_USE +\nMFT_RECORD_IN_USE | In use\n| 0x0002 | FILE_NAME_INDEX_PRESENT +\nMFT_RECORD_IS_DIRECTORY | Has file name (or $I30) index +\nWhen this flag is set the file entry represents a directory (that contains sub file entries)\n| 0x0004 | MFT_RECORD_IN_EXTEND | [yellow-background]*Unknown* +\nAccording to `[APPLE06]` this is set for all system files present in the $Extend directory\n| 0x0008 | MFT_RECORD_IS_VIEW_INDEX | Is index +\nWhen this flag is set the file entry represents an index +\nAccording to `[APPLE06]` this is set for all indices other than $I30\n|===\n\n=== [[file_reference]]The file reference\n\nThe file reference (FILE_REFERENCE or MFT_SEGMENT_REFERENCE) is 8 bytes in size\nand consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 6 | | MFT entry index +\nNote that the index value in the MFT entry is only 32-bit in size.\n| 6 | 2 | | Sequence number\n|===\n\n=== [[fix_up_values]]The fix-up values\n\nThe fix-up values are of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | | Fix-up placeholder value\n| 2 | 2 x number of fix-up values | | Fix-up (original) value array\n|===\n\nOn disk the last 2 bytes for each 512 bytes block is replaced by the fix-up\nplaceholder value. The original value is stored in the corresponding fix-up\n(original) value array entry.\n\n[NOTE]\nThere can be more fix-up values than the amount of sectors in the data.\n\nSee `[CARRIER05]` and/or `[RUSSON05]` for examples on applying the fix-up values.\n\n=== MFT attribute\n\nThe MFT attribute consist of:\n\n* the attribute header\n* the attribute resident or non-resident data\n* the <<attribute_name,attribute name>>\n* [yellow-background]*unknown data likely alignment padding (4-byte alignment)*\n* the attribute data runs or data\n* alignment padding (8-byte alignment), can contain remnant data\n\n==== MFT attribute header\n\nThe MFT attribute header (ATTRIBUTE_RECORD_HEADER) is 16 bytes in size and\nconsists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Attribute type (or type code) +\nSee section: <<attribute_types,The attribute types>>\n| 4 | 4 | | Size (or record length) +\nThe size of the attribute including the 8 bytes of the attribute type and size\n| 8 | 1 | | Non-resident flag (or form code) +\n0 => RESIDENT_FORM +\n1 => NONRESIDENT_FORM\n| 9 | 1 | | Name size (or name length) +\nContains the number of characters without the end-of-string character\n| 10 | 2 | | Name offset +\nContains an offset relative from the start of the MFT attribute\n| 12 | 2 | | Attribute data flags +\nSee section: <<mft_attribute_data_flags,MFT attribute data flags>>\n| 14 | 2 | | Attribute identifier (or instance) +\n[yellow-background]*An unique identifier to distinguish between attributes that contain segmented data.*\n|===\n\n===== Notes\n\n[yellow-background]*Size (or record length) upper 2 bytes overloaded or remnant data?*\n\n....\ntype\t\t\t\t\t: 0x000000a0 ($INDEX_ALLOCATION)\nsize\t\t\t\t\t: 458832 (0x70050)\nnon resident flag\t\t\t: 0x01\nname size\t\t\t\t: 4\nname offset\t\t\t\t: 64\ndata flags\t\t\t\t: 0x0000\n\nidentifier\t\t\t\t: 4\n....\n\n===== [[mft_attribute_data_flags]]MFT attribute data flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x0001 | | Is compressed\n| | |\n| 0x00ff | ATTRIBUTE_FLAG_COMPRESSION_MASK |\n| | |\n| 0x4000 | ATTRIBUTE_FLAG_ENCRYPTED | Is encrypted\n| 0x8000 | ATTRIBUTE_FLAG_SPARSE | Is sparse\n|===\n\n[yellow-background]*Does 0x0001 indicate the LZNT1 compression method?\nDo other values indicate other compression values?*\n\n==== Resident MFT attribute\n\nThe resident MFT attribute data is present when the non-resident flag is not\nset (0). The resident data is 8 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Data size (or value length)\n| 4 | 2 | | Data offset (or value size) +\nContains an offset relative from the start of the MFT attribute\n| 6 | 1 | | Indexed flag +\n[yellow-background]*Only the lower bit is used, do the other bits have any significance?*\n| 7 | 1 | 0x00 | Padding +\nContains an empty byte\n|===\n\n===== Notes\n\n[yellow-background]*What meaning has ATTRIBUTE_FLAG_COMPRESSION_MASK in\n$INDEX_ROOT attribute? The attribute data is uncompressed.*\n\nSeen on Windows 10 (NTFS version 3.1)\n\n....\ntype                                 : 0x00000090 ($INDEX_ROOT)\nsize                                 : 88\nnon resident flag                    : 0x00\nname size                            : 4\nname offset                          : 24\ndata flags                           : 0x0001\n        Is compressed\n....\n\n==== Non-resident MFT attribute\n\nThe non-resident MFT attribute data is present when the non-resident flag is\nset (1). The non-resident data is 48 or 56 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | First (or lowest) Virtual Cluster Number (VCN) of the data\n| 8 | 8 | | Last (or highest) Virtual Cluster Number (VCN) of the data +\n[yellow-background]*Seen this value to be -1 in combination with data size of 0*\n| 16 | 2 | | Data runs offset (or mappings pairs offset) +\nContains an offset relative from the start of the MFT attribute\n| 18 | 2 | | Compression unit size +\nContains the compression unit size as `2^(n)` number of cluster blocks. +\nThis value is used for compressed data in the data runs. +\n[yellow-background]*A value of 0 indicates the attribute data is uncompressed.?* +\n[yellow-background]*Seen on XP, compressed MFT attribute data with compression unit size of 0.* +\n[yellow-background]*So it looks more the default compression unit size (16 cluster blocks) should be used.*\n| 20 | 4 | | Padding +\nContains zero-bytes\n| 24 | 8 | | Allocated data size (or allocated length) +\nContains the allocated data size in number of bytes. +\nThis value is not valid if the first VCN is nonzero.\n| 32 | 8 | | Data size (or file size) +\nContains the data size in number of bytes. +\nThis value is not valid if the first VCN is nonzero.\n| 40 | 8 | | Valid data size (or valid data length) +\nContains the valid data size in number of bytes.\nThis value is not valid if the first VCN is nonzero.\n4+| _If compression unit size > 0_\n| 48 | 8 | | Total allocated size +\nContains the total allocated size in number of cluster blocks.\n|===\n\n[NOTE]\nThe total size of the data runs should be larger or equal to the data size.\n\n[NOTE]\nWindows will fill data ranges beyond the valid data size with 0-byte values.\nThe data size remains unchanged. This applies to compressed and uncompressed\ndata. If the first VCN is zero a valid data size of 0 represents a file\nentirely filled with 0-byte values.\n\n==== [[attribute_name]]Attribute name\n\nThe attribute name is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | ... | | Name +\nContains an UTF-16 little-endian without end-of-string character\n|===\n\n==== Data runs\n\nThe data runs are stored in a variable size (data) runlist. This runlist\nconsists of runlist elements.\n\nA runlist element is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0.0  | 4 bits | | Number of cluster blocks value size +\nContains the number of bytes used to store the data run size\n| 0.4 | 4 bits | | Cluster block number value size +\nContains the number of bytes used to store the data run size\n| 1 | Size value size | | Data run number of cluster blocks +\nContains the number of cluster blocks\n| ... | Cluster block number value size | | Data run cluster block number +\nSee below.\n|===\n\nThe data run cluster block number is a singed value, where the MSB is the\nsinged bit, e.g. if the data run cluster block contains \\'dbc8' it corresponds\nto the 64-bit value 0xffffffffffffdbc8.\n\nThe first data run offset contains the absolute cluster block number where\nsuccessive data run offsets are relative to the last data run offset.\n\n[NOTE]\nThe cluster block number byte size is the first nibble when reading the byte\nstream, but here it is represented as the upper nibble of the first byte.\n\nThe last runlist element is an empty value size tuple; in other words a 0 byte.\n\n[yellow-background]*Does a data run with a \"number of cluster blocks value size\"\nof 0 represent this as well?*\n\nThe MFT attribute data flag (ATTRIBUTE_FLAG_SPARSE) indicates if the data\nstream is sparse or not.\n\nA sparse data run has a \"cluster block number value size\" 0, representing there\nis no offset (cluster block number). A sparse data run should be filled with\n0-byte values.\n\n[NOTE]\nCompressed files also define sparse data runs without setting the sparse flag.\n\n[yellow-background]*TODO: what about data runs with a cluster block number\nvalue size of 0 but without the necessary flags? Seen in ADS: $BadClus:$Bad.\nAssuming for now the data run is sparse.*\n\nThe MFT attribute data flags (0x00ff) indicate if the data stream is compressed\nor not. The currently known value for LZNT1 compression is 1.\n\n[NOTE]\nWindows 10 supports Windows Overlay Filter (WOF) compressed data, which stores\nthe LZXPRESS Huffman or LZX compressed data in alternate data stream named\nWofCompressedData and links it to the default data stream using a reparse point.\n\nThe data is stored in compression unit blocks. A compression unit typically\nconsists of 16 cluster blocks. However the actual value is stored in the\nnon-resident MFT attribute. See <<compression,Compression>> for more\ninformation on how to determine which data runs store the compressed and which\ndo not.\n\n[NOTE]\nCompression is supported upto NTFS file systems with a cluster block size of\n4096 bytes or less.\n\nThe compression is specified on a pre attribute basis. Where an attribute\nchain can consists of attribute with compressed and uncompressed attribute\ndata. [yellow-background]*Note that it is unknown if mixing compressed and\nuncompressed attributes is supported by the Windows implementation.*\n\nAccording to `[RUSSON05]` the size of the runlist is rounded up to the next\nmultitude of 4 bytes. The size of the trailing data can be even larger than 3\nand are not always zero-bytes.\n\nSee `[CARRIER05]` and/or `[RUSSON05]` for examples on reading the runlist.\n\n== The attributes\n\n=== [[attribute_types]]The attribute types\n\nTechnically the attribute types are stored in the `$AttrDef` metadata file.\nAlso see section: <<attribute_definitions,The attribute definitions>>\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000000 | | Unused\n| 0x00000010 | $STANDARD_INFORMATION | Standard information\n| 0x00000020 | $ATTRIBUTE_LIST | Attributes list\n| 0x00000030 | $FILE_NAME | The file or directory name\n| 0x00000040 | $VOLUME_VERSION | Volume version +\nRemoved in NTFS version 3.0\n| 0x00000040 | $OBJECT_ID | Object identifier +\nIntroduced in NTFS version 3.0\n| 0x00000050 | $SECURITY_DESCRIPTOR | Security descriptor\n| 0x00000060 | $VOLUME_NAME | Volume name\n| 0x00000070 | $VOLUME_INFORMATION | Volume information\n| 0x00000080 | $DATA | Data stream\n| 0x00000090 | $INDEX_ROOT | Index root\n| 0x000000a0 | $INDEX_ALLOCATION | Index allocation\n| 0x000000b0 | $BITMAP | Bitmap\n| 0x000000c0 | $SYMBOLIC_LINK | Symbolic link +\nRemoved in NTFS version 3.0\n| 0x000000c0 | $REPARSE_POINT | Reparse point +\nIntroduced in NTFS version 3.0\n| 0x000000d0 | $EA_INFORMATION | (HPFS) extended attribute information\n| 0x000000e0 | $EA | (HPFS) extended attribute\n| 0x000000f0 | $PROPERTY_SET | Property set +\nRemoved in NTFS version 3.0\n| 0x00000100 | $LOGGED_UTILITY_STREAM | Logged utility stream +\nIntroduced in NTFS version 3.0\n| | |\n| 0x00001000 | | First user defined attribute\n| | |\n| 0xffffffff | | End of attributes marker\n|===\n\n=== The standard information attribute\n\nThe standard information attribute ($STANDARD_INFORMATION) contains the basic\nfile entry metadata. It is stored as a resident MFT attribute.\n\nThe standard information data (STANDARD_INFORMATION) is either 48 or 72 bytes\nin size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | Creation date and time +\nContains a FILETIME\n| 8 | 8 | | Last modification date and time +\n(Also referred to as last written date and time) +\nContains a FILETIME\n| 16 | 8 | | MFT entry last modification date and time +\nContains a FILETIME\n| 24 | 8 | | Last access date and time +\nContains a FILETIME\n| 32 | 4 | | File attribute flags +\nSee section: <<file_attribute_flags,File attribute flags>>\n| 36 | 4 | | [yellow-background]*Unknown (Maximum number of versions)* +\n[yellow-background]*What does it contain and what is it used for?*\n| 40 | 4 | | [yellow-background]*Unknown (Version number)* +\n[yellow-background]*What does it contain and what is it used for?* +\n[yellow-background]*On Windows 10 does a value of 1 indicate case-senstive folder?*\n| 44 | 4 | | [yellow-background]*Unknown (Class identifier)* +\n[yellow-background]*What does it contain and what is it used for?*\n4+| _Introduced in NTFS version 3.0_\n| 48 | 4 | | Owner identifier +\n[yellow-background]*What does it contain and what is it used for?*\n| 52 | 4 | | Security descriptor identifier +\nContains the entry number in the security ID index ($Secure:$SII) +\nSee section: <<access_control,Access Control>>\n| 56 | 8 | | Quota charged +\n[yellow-background]*What does it contain and what is it used for?* +\n[yellow-background]*Does this value correspond to StorageReservedID in fsutil layout output?*\n| 64 | 8 | | Update Sequence Number (USN) +\n[yellow-background]*What does it contain and what is it used for?*\n|===\n\n[NOTE]\nMFT entries without a $STANDARD_INFORMATION attribute but with other attributes,\nsuch as $FILE_NAME, and an $I30 index have been observed.\n\n=== The attribute list attribute\n\nThe attribute list attribute ($ATTRIBUTE_LIST) is a list of attributes in an\nMFT entry. The attributes stored in the list are placeholders for other\nattributes. Some of these attributes could not be stored in the MFT entry due\nto space limitations. The attribute list attribute can be stored as either a\nresident (for a small amount of data) and non-resident MFT attribute.\n\nThe attribute list data contains an array of attribute list entries and stored\nas a continous stream accross one or more cluster blocks.\n\nNote that MFT entry 0 also can contain an attribute list and allows to store\nlisted attributes beyond the first data run.\n\n==== The attribute list entry\n\nThe attribute list entry consists of:\n\n* the attribute list entry header\n* the <<attribute_name,attribute name>>\n* alignment padding (8-byte alignment), can contain remnant data\n\n===== The attribute list entry header\n\nThe attribute list entry header (ATTRIBUTE_LIST_ENTRY) is 26 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Attribute type (or type code) +\nSee section: <<attribute_types,The attribute types>>\n| 4 | 2 | | Size (or record length) +\nThe size of the attribute including the 6 bytes of the attribute type and size\n| 6 | 1 | | Name size (or name length) +\nContains the number of characters without the end-of-string character\n| 7 | 1 | | Name offset +\nContains an offset relative from the start of the attribute list entry\n| 8 | 8 | | Data first (or lowest) VCN\n| 16 | 8 | | File reference (or segment reference) +\nThe file reference to the MFT entry that contains (part of) the attribute data +\nSee section: <<file_reference,The file reference>>\n| 24 | 2 | | Attribute identifier +\n[yellow-background]*An unique identifier to distinguish between attributes that contain segmented data.*\n|===\n\nThe data first VCN is used when the attribute data is stored. The attribute list\ncontains an attribute list entry for every cluster block. The corresponding\ncluster block will contain an MFT attribute containing the attribute data. See\n`[CARRIER05]` pages 365 and 366 for more information.\n\n=== [[file_name_attribute]]The file name attribute\n\nThe file name attribute ($FILE_NAME) contains the basic file system\ninformation, like the parent file entry, MAC times and filename. It is stored\nas a resident MFT attribute.\n\nThe file name data (FILE_NAME) is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | Parent file reference +\nSee section: <<file_reference,The file reference>>\n| 8 | 8 | | Creation date and time +\nContains a FILETIME\n| 16 | 8 | | Last modification date and time +\n(Also referred to as last written date and time) +\nContains a FILETIME\n| 24 | 8 | | MFT entry last modification date and time +\nContains a FILETIME\n| 32 | 8 | | Last access date and time +\nContains a FILETIME\n| 40 | 8 | | Allocated (or reserved) file size +\nSee below.\n| 48 | 8 | | File size +\nSee below.\n| 56 | 4 | | File attribute flags +\nSee section: <<file_attribute_flags,File attribute flags>>\n| 60 | 4 | | Extended data +\nSee below.\n| 64 | 1 | | Name string size +\nContains the number of characters without the end-of-string character\n| 65 | 1 | | Namespace of the name string\n| 66 | ... | | Name string\nContains an UTF-16 little-endian without an end-of-string character\n|===\n\n[NOTE]\nThe name string is not strict UTF-16 since it allows for unpaired surrogates,\nsuch as \"U+d800\" and \"U+dc00\".\n\nThe extended data contains:\n\n* the reparse point tag (see section <<reparse_point_tag,Reparse point tag>>) if the reparse point file attribute flag (FILE_ATTRIBUTE_REPARSE_POINT) is set;\n* [yellow-background]*the extended attribute data size.*\n\nThe allocated file size and file size values do not always contain accurate\nvalues when stored in a MFT attribute, see `[CARRIER05]` page 363 for more\ninformation. [CARRIER05] also states that the file size values are accurate\nwhen 'used in a directory index' (stored in an index value), however this seems\nto be true for most files but not for all. At least the $MFT and $MFTMirr\nmetadata file directory entries on a Windows Vista NTFS volume were found to\ncontain the same value as the corresponding MFT entries, which were not equal\nto the size of the data stream.\n\nAn MFT attribute can contain multiple file name attributes, e.g. for a separate\n(long) name and short name.\n\nIn several cases on a Vista NTFS volume the MFT entry contained both a DOS &\nWindows and POSIX name space `$FILE_NAME` attribute. However the directory entry\nindex (`$I30`) of the parent directory only contained the DOS & Windows name.\n\nIn case of a hard link the MFT entry will contain additional file name\nattributes with the parent file reference of each hard link.\n\n==== Namespace\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0 | POSIX | Case sensitive character set that consists of all Unicode characters except for: +\n\\0 (zero character), +\n/ (forward slash). +\n +\nThe : (colon) is valid for NTFS but not for Windows.\n| 1 | FILE_NAME_NTFS (or WINDOWS) | A case insensitive sub set of the POSIX character set that consists of all Unicode characters except for: +\n\" * / : < > ? \\ \\| +\n +\nNote that names cannot end with a . (dot) or ' ' (space).\n| 2 | FILE_NAME_DOS (or DOS) | A case insensitive sub set of the WINDOWS character set that consists of all upper case ASCII characters except for: +\n\" * + , / : ; < = > ? \\ +\n +\nNote the name must follow the 8.3 format.\n| 3 | DOS_WINDOWS | Both the DOS and WINDOWS names are identical +\n[yellow-background]*Which is the same as the DOS character set, with the exception that lower case is used as well.*\n|===\n\n[NOTE]\nThe Windows API function CreateFile allows to create case sensitive file names when the flag FILE_FLAG_POSIX_SEMANTICS is set.\n\n==== Long to short name conversion\n\nBasically the conversion from a long name to short name boils down to the\napproach mentioned below. Note that it differs from the approach mentioned in\n`[RUSSON05]`, in regard of the third case to make the short name unique.\n\nIn the long name:\n\n* ignore Unicode characters beyond the first 8-bit (extended ASCII)\n* ignore control characters and spaces (character < 0x20)\n* ignore non-allowed characters (\" * + , / : ; < = > ? \\)\n* ignore dots except the last one, which is used for the extension\n* make all letters upper case\n\nAdditional observations:\n\n* `[` or `]` are replaced by an underscore (`_`)\n\nMake the name unique:\n\n1. use the characters 1 to 6 add ~1 and if the long name has an extension add the a dot and its first 3 letters\n2. if the name already exists try \\~2 up to ~9\n3. if the name already exists use [yellow-background]*some 16-bit hexadecimal value* for characters 3 to 6 with ~1\n\n[yellow-background]*`[MSDN]` Generates the next four letters of the short file\nname by mathematically manipulating the remaining letters of the long file\nname.*\n\n[yellow-background]*Note: behavior dependent on fsutil?*\n\ncase 1: \"Program Files\" becomes \"PROGRA~1\" or \" ~PLAYMOVIE.REG\" becomes \"\\~PLAYM~1.REG\"\n\ncase 2: \"Program Data\", in the same directory as \"Program Files\", becomes \"PROGRA~2\"\n\ncase 3: \"x86_microsoft-windows-r..ry-editor.resources_31bf3856ad364e35_6.0.6000.16386_en-us_f89a7b0005d42fd4\",\nin a directory with a lot of filenames starting with \"x86_microsoft\", becomes \"X8FCA6~1.163\"\n\n=== The volume version attribute\n\nThe volume version attribute ($VOLUME_VERSION) contains [yellow-background]*TODO*\n\n[yellow-background]*Need a pre NTFS 3.0 volume with this attribute. $AttrDef\nindicates the attribute to be 8 bytes in size.*\n\n=== The object identifier attribute\n\nThe object identifier attribute ($OBJECT_ID) contains distributed link tracker\nproperties. It is stored as a resident MFT attribute.\n\nThe object identifier data is either 16 or 64 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 16 | | Droid file identifier +\nContains a GUID\n| 16 | 16 | | Birth droid volume identifier +\nContains a GUID\n| 32 | 16 | | Birth droid file identifier +\nContains a GUID\n| 48 | 16 | | Birth droid domain identifier +\nContains a GUID\n|===\n\nDroid in this context refers to CDomainRelativeObjId.\n\n=== The security descriptor attribute\n\n[yellow-background]*TODO: does this override any value in $Secure:$SDS?*\n\nThe security descriptor attribute ($SECURITY_DESCRIPTOR) contains a Windows NT\nsecurity descriptor. It can be stored as either a resident (for a small amount\nof data) and non-resident MFT attribute.\n\nSee: https://github.com/libyal/libfwnt/blob/main/documentation/Security%20Descriptor.asciidoc[[LIBFWNT\\]]\n\n=== The volume name attribute\n\nThe volume name attribute ($VOLUME_NAME) contains the name of the volume. It is\nstored as a resident MFT attribute.\n\nThe volume name data is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | ... | | Name string +\nContains an UTF-16 little-endian without an end-of-string character\n|===\n\nThe volume name attribute is used in the $Volume metadata file MFT entry.\n\n=== The volume information attribute\n\nThe volume information attribute ($VOLUME_INFORMATION) contains information\nabout the volume. It is stored as a resident MFT attribute.\n\nThe volume information data is 12 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | [yellow-background]*Unknown (empty value?)*\n| 8 | 1 | | Major version number\n| 9 | 1 | | Minor version number\n| 10 | 2 | | Volume flags\n|===\n\nThe volume information attribute is used in the $Volume metadata file MFT entry.\n\n==== Volume flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x0001 | VOLUME_IS_DIRTY | [yellow-background]*Is dirty*\n| 0x0002 | VOLUME_RESIZE_LOG_FILE | [yellow-background]*Re-size journal (LogFile)*\n| 0x0004 | VOLUME_UPGRADE_ON_MOUNT | [yellow-background]*Upgrade on next mount*\n| 0x0008 | VOLUME_MOUNTED_ON_NT4 | [yellow-background]*Mounted on Windows NT 4*\n| 0x0010 | VOLUME_DELETE_USN_UNDERWAY | [yellow-background]*Delete USN underway*\n| 0x0020 | VOLUME_REPAIR_OBJECT_ID | [yellow-background]*Repair object identifiers*\n| | |\n| 0x0080 | | [yellow-background]*Unknown*\n| | |\n| 0x4000 | VOLUME_CHKDSK_UNDERWAY | [yellow-background]*chkdsk underway*\n| 0x8000 | VOLUME_MODIFIED_BY_CHKDSK | [yellow-background]*Modified by chkdsk*\n|===\n\n=== The data stream attribute\n\nThe data stream attribute ($DATA) contains the file data. It can be stored as\neither a resident (for a small amount of data) and non-resident MFT attribute.\n\nAlso note that multiple data attributes for the same data stream can be used in\nthe attribute list to define different parts of the data stream data. The first\ndata stream attribute will contain the size of the entire data stream data.\nOther data stream attributes should have a size of 0. Also see:\n<<attribute_chains,Attribute chains>>.\n\n=== The index root attribute\n\nThe index root attribute ($INDEX_ROOT) contains the root of the index tree. It\nis stored as a resident MFT attribute.\n\nSee section: <<index,The index>> and <<index_root,The index root>>.\n\n=== The index allocation attribute\n\nThe index allocation attribute ($INDEX_ALLOCATION) contains an array of index\nentries. It is stored as a non-resident MFT attribute.\n\nNote that the index allocation attribute itself does not define which attribute\ntype it contains in the index value data. For this information it needs the\ncorresponding index root attribute.\n\nAlso note that multiple index allocation attributes for the same index can be\nused in the attribute list to define different parts of the index allocation\ndata. The first index allocation attribute will contain the size of the entire\nindex allocation data. Other index allocation attributes should have a size of\n0. Also see: <<attribute_chains,Attribute chains>>.\n\nSee section: <<index,The index>>.\n\n=== The bitmap attribute\n\nThe bitmap attribute ($BITMAP) contains the allocation bitmap. It can be stored\nas either a resident (for a small amount of data) and non-resident MFT\nattribute.\n\nIt is used to maintain information about which entry is used and which is not.\nEvery bit in the bitmap represents an entry. The index is stored byte-wise with\nthe LSB of the byte corresponds to the first allocation element; the allocation\nelement can represent several things, see below.\n\nThe allocation element is allocated if the corresponding bit contains 1 or\nunallocated if 0.\n\nIt is known to be used in:\n\n* the MFT (nameless), where an allocation element represents a MFT entry;\n* indexes ($I##), where an allocation element represents an index entry.\n\n=== The symbolic link attribute\n\nThe symbolic link attribute ($SYMBOLIC_LINK) contains [yellow-background]*TODO*\n\n[yellow-background]*Need a pre NTFS 3.0 volume with this attribute. $AttrDef\nindicates the attribute is of variable size.*\n\n=== The reparse point attribute\n\nThe reparse point attribute ($REPARSE_POINT) contains information about a file\nsystem-level link. It is stored as a resident MFT attribute.\n\nSee section: <<reparse_point,The reparse point>>.\n\n=== The (HPFS) extended attribute information\n\nThe (HPFS) extended attribute information ($EA_INFORMATION) contains\ninformation about the extended attribute ($EA).\n\nThe extended attribute information data is 8 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | | Size of an extended attribute entry\n| 2 | 2 | | Number of extended attributes which have NEED_EA set +\n[yellow-background]*TODO: determine what this flag is used for*\n| 4 | 4 | | Size of the extended attribute ($EA) data\n|===\n\nE.g.\n\n....\n00000000: 08 00 00 00 18 00 00 00                            ........\n....\n\n=== The (HPFS) extended attribute\n\nThe (HPFS) extended attribute ($EA) contains the extended attribute data.\n\nThe extended attribute data is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Offset to next extended attribute entry +\nThe offset is relative from the start of the extended attribute data\n| 4 | 1 | | Flags +\n0x80 => NEED_EA (Need EA) flag\n| 5 | 1 | | Number of characters of the extended attribute name\n| 6 | 2 | | Value data size\n| 8 | ... | | The extended attribute name +\nContains an ASCII string +\n[yellow-background]*TODO: is this value 16-bit aligned?*\n| ... | ... | | Value data\n| ... | ... | | [yellow-background]*TODO: unknown trailing data*\n|===\n\nE.g.\n\n....\n00000000: 18 00 00 00 00 09 04 00  2e 55 4e 49 58 41 54 54   ........ .UNIXATT\n00000010: 52 00 b6 01 00 00 03 87                            R.......\n....\n\n==== UNITATTR extended attribute value data\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | [yellow-background]*TODO: is this an equivalent of st_mode?*\n|===\n\n=== The property set attribute\n\nThe property set attribute ($PROPERTY_SET) contains [yellow-background]*TODO*\n\n[yellow-background]*Need a pre NTFS 3.0 volume with this attribute. $AttrDef\nindicates does not seem to always define this attribute.*\n\n=== The logged utility stream attribute\n\n[yellow-background]*attribute type for storing additional data for the files and directories*\n\n[yellow-background]*resident, known to cause problems when non-resident on Windows Vista*\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| $EFS | | Encrypted NTFS (EFS)\n| $TXF_DATA | | Transactional NTFS (TxF)\n|===\n\n[yellow-background]*TODO add text*\n\n=== [[attribute_chains]]Attribute chains\n\nMultiple attributes can make up a single attribute, e.g. the attributes:\n\n1. $INDEX_ALLOCATION ($I30) VCN: 0\n2. $INDEX_ALLOCATION ($I30) VCN: 596\n\nThe first attribute will contain the size of the data defined by all the\nattributes. Other attributes should have a size of 0.\n\nIt is assumed that the attributes in a chain must be continuous and defined\nin-order.\n\n== [[attribute_types]]The attribute types\n\nThe attribute types are stored in the `$AttrDef` metadata file.\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 128 | | Attribute name +\nContains an UTF-16 little-endian [yellow-background]*with end-of-string character?* +\n[yellow-background]*The unused bytes are filled with 0-byte values*\n| 128 | 4 | | Attribute type (or type code)\n| 132 | 8 | | [yellow-background]*Unknown (empty values?)*\n| 140 | 4 | | [yellow-background]*Unknown (flags?)*\nSeen: 0x40, 0x42, 0x80\n| 144 | 8 | | [yellow-background]*Unknown (minimum attribute size?)*\n| 152 | 8 | | [yellow-background]*Unknown (maximum attribute size?)* +\nSeen: -1 (no maximum?), 48\n|===\n\n....\n00000000  24 00 53 00 54 00 41 00  4e 00 44 00 41 00 52 00  |$.S.T.A.N.D.A.R.|\n00000010  44 00 5f 00 49 00 4e 00  46 00 4f 00 52 00 4d 00  |D._.I.N.F.O.R.M.|\n00000020  41 00 54 00 49 00 4f 00  4e 00 00 00 00 00 00 00  |A.T.I.O.N.......|\n00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n00000080  10 00 00 00 00 00 00 00  00 00 00 00 40 00 00 00  |............@...|\n00000090  30 00 00 00 00 00 00 00  30 00 00 00 00 00 00 00  |0.......0.......|\n000000a0  24 00 41 00 54 00 54 00  52 00 49 00 42 00 55 00  |$.A.T.T.R.I.B.U.|\n000000b0  54 00 45 00 5f 00 4c 00  49 00 53 00 54 00 00 00  |T.E._.L.I.S.T...|\n000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n00000120  20 00 00 00 00 00 00 00  00 00 00 00 80 00 00 00  | ...............|\n00000130  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|\n00000140  24 00 46 00 49 00 4c 00  45 00 5f 00 4e 00 41 00  |$.F.I.L.E._.N.A.|\n....\n\n== [[index]]The index\n\nThe index structures are used for various purposes one of which are the\ndirectory entries.\n\nThe root of the index is stored in index root. The index root attribute defines\nwhich type of attribute is stored in the index and the root index node.\n\nIf the index is too large part of the index is stored in an index allocation\nattribute with the same attribute name. The index allocation attribute defines\na data stream which contains index entries. Each index entry contains an index\nnode.\n\nSee `[CARRIER05]` page 378 for an illustration how the index root and index\nallocation attribute relate.\n\nAn index consists of a tree, where both the branch and index leaf nodes contain\nthe actual data. E.g. in case of a directory entries index, any node that\ncontains index value data make up for the directory entries.\n\nThe index value data in a branch node signifies the upper bound of the values\nin the that specific branch. E.g. if directory entries index branch node\ncontains the name 'textfile.txt' all names in that index branch are smaller\nthan 'textfile.txt'. Note the actual sorting order is dependent on the\ncollation type defined in the index root attribute.\n\nThe index allocation attribute is accompanied by a bitmap attribute with the\ncorresponding attribute name. The bitmap attribute defines the allocation of\nvirtual cluster blocks within the index allocation attribute data stream.\n\n[NOTE]\nThe index allocation attribute can be present even though it is not used.\n\n=== Common used indexes\n\nIndexes commonly used by NTFS are:\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| $I30 | | Directory entries (used by directories)\n| $SDH | | Security descriptor hashes (used by $Secure)\n| $SII | | Security descriptor identifiers (used by $Secure)\n| $O | | Object identifiers (used by $ObjId)\n| $O | | Owner identifiers (used by $Quota)\n| $Q | | Quotas (used by $Quota)\n| $R | | Reparse points (used by $Reparse)\n|===\n\n=== [[index_root]]The index root\n\nThe index root consists of:\n\n* index root header\n* index node header\n* an array of index values\n\n==== The index root header\n\nThe index root header is 16 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Attribute type +\nContains the type of the indexed attribute or 0 if none\n| 4 | 4 | | Collation type +\nContains a value to indicate the ordering of the index entries +\nSee section: <<collation_type,Collation type>>\n| 8 | 4 | | Index entry size\n| 12 | 4 | | Index entry number of cluster blocks\n|===\n\n[NOTE]\n`[CARRIER05]` and `[RUSSON05]` state that the last 3 bytes are unused\n(alignment padding). However it is highly probably that the last value is\n32-bit in size.\n\n[NOTE]\nIn NT4 (version 1.2) the index entry size does not have to match the index\nentry size in the volume header. The correct size seems to be the value in\nthe index root header.\n\n==== [[collation_type]]Collation type\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000000 | COLLATION_BINARY | Binary +\nThe first byte is most significant\n| 0x00000001 | COLLATION_FILENAME | Unicode strings case-insensitive\n| 0x00000002 | COLLATION_UNICODE_STRING | Unicode strings case-sensitive +\nUpper case letters should come first\n| | |\n| 0x00000010 | COLLATION_NTOFS_ULONG | Unsigned 32-bit little-endian integer\n| 0x00000011 | COLLATION_NTOFS_SID | NT security identifier (SID)\n| 0x00000012 | COLLATION_NTOFS_SECURITY_HASH | Security hash first, then NT security identifier\n| 0x00000013 | COLLATION_NTOFS_ULONGS | An array of unsigned 32-bit little-endian integer values\n|===\n\n=== The index entry\n\nThe index entry consists of:\n\n* the index entry header\n* the index node header\n* the fix-up values\n* alignment padding (8-byte alignment), contains zero-bytes\n* an array of index values\n\n==== The index entry header\n\nThe index entry header is 24 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | \"INDX\" | Signature\n| 4 | 2 | | The fix-up values offset +\nContains an offset relative from the start of the index entry header.\n| 6 | 2 | | The number of fix-up values\n| 8 | 8 | | Metadata transaction journal sequence number +\nContains a $LogFile Sequence Number (LSN)\n| 16 | 8 | | Virtual Cluster Number (VCN) of the index entry\n|===\n\n[NOTE]\nThere can be more fix-up value than supported by the index entry data size.\n\n=== The index node header\n\nThe index node header is 16 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Index values offset +\nThe offset is relative from the start of the index node header\n| 4 | 4 | | Index node size +\nThe value includes the size of the index node header. See below.\n| 8 | 4 | | Allocated index node size +\nThe value includes the size of the index node header\n| 12 | 4 | | Index node flags +\nSee section: <<index_node_flags,The index node flags>>\n|===\n\nNote that `[RUSSON05]` states that the last 3 bytes are unused (alignment\npadding), while `[CARRIER05]` states that the last value is 32-bit in size.\nHere we assume that the index node flags are a 32-bit value.\n\nIn an index entry (index allocation attribute) the index node size includes the\nsize of the fix-up values and the alignment padding following it.\n\nThe remainder of the index node contains remnant data and/or zero-byte values.\n\n==== [[index_node_flags]]The index node flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | | Is branch node +\nUsed to indicate if the node is a branch node that has sub nodes\n|===\n\n=== The index value\n\nThe index value is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | File reference +\nSee section: <<file_reference,The file reference>>\n| 8 | 2 | | Index value size\n| 10 | 2 | | Index key data size\n| 12 | 4 | | Index value flags\n4+| _If index key data size > 0_\n| 16 | ... | | Index key data\n| ... | ... | | Index value data\n4+| _If index value flag 0x00000001 (is branch node) is set_\n| ... | 8 | | Sub node Virtual Cluster Number (VCN)\n|===\n\n[NOTE]\nThe index values ared stored 8 byte aligned.\n\n[NOTE]\nSome sources define the index value flags as a 16-bit value followed by\n2 bytes of padding.\n\n==== The index value flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | | Has sub node +\nIf set the index value contains a sub node Virtual Cluster Number (VCN)\n| 0x00000002 | | Is last +\nIf set the index value is the last in the index values array\n|===\n\n=== Index key and value data\n\n==== Directory entry index value\n\nThe MFT attribute name of the directory entry index is: $I30.\n\nThe directory entry index value contains a file name attribute in the index\nkey data. See section: <<file_name_attribute,The file name attribute>>.\n\nThe index value data seems to contain remnant data.\n\n[NOTE]\nBoth the short and long names of the same file have a separate index value. The\nshort name uses the DOS name space and the long name the WINDOWS name space.\n\n[yellow-background]*Index values with a single name use either the POSIX or\nDOS_WINDOWS name space?*\n\nA hard link to a file in the same directory will also have a separate index\nvalue.\n\n[yellow-background]*Does the hard link always has POSIX name space?*\n\n==== Security descriptor hash index value\n\nThe MFT attribute name of the security descriptor hash index is: $SDH.\nIt appears to only to be used by the $Secure metadata file.\n\nSee section: <<security_descriptor_hash_index_value,The security descriptor hash index value>>\n\n==== Security descriptor identifier index value\n\nThe MFT attribute name of the security descriptor identifier index is: $SII.\nIt appears to only to be used by the $Secure metadata file.\n\nSee section: <<security_descriptor_identifier_index_value,The security descriptor identifier index value>>\n\n== [[compression]]Compression\n\nTypically NTFS compression groups 16 cluster blocks together. This group of 16\ncluster blocks also named a compression unit is either \\'compressed' or\nuncompressed data. The term compressed is quoted here because, as you will see\nbelow, the group of cluster blocks can also contain uncompressed data. A group\nof cluster blocks is \\'compressed' when it is compressed size is smaller than\nits uncompressed data size.\n\n[NOTE]\nThe actual compression unit size is stored in the non-resident MFT attribute.\n\nWithin a group of cluster blocks each of the 16 blocks is \\'compressed'\nindividually see <<compression_block_based_storage,Block based storage>>.\nThe maximum uncompressed data size is always the cluster size (in most cases\n4096).\n\nThe data runs in the $DATA stream define cluster block ranges. A simple example:\n\n....\n21 02 35 52\n....\n\nThis data run defines 2 data blocks starting at block number 21045 followed by\n14 sparse blocks. The total number of blocks is 16 which is the size of the\ncompression unit. The data is stored compressed in the first 2 blocks and the\n14 sparse blocks are only there to make sure the data runs add up to the\ncompression unit size. They do not define actual sparse data.\n\nAnother example:\n\n....\n21 40 37 52\n....\n\nThis data run defines 64 data blocks starting at block number 21047. Since\nthis data run is larger than the compression unit size the data is stored\nuncompressed.\n\nIf the data run was e.g. 60 data blocks followed by 4 sparse blocks the first 3\ncompression units (blocks 1 to 48) would be uncompressed and the last\ncompression unit (blocks 49 to 64) would be compressed.\n\nAlso \"sparse data\" and \"sparse compression unit\" data runs can be mixed. If in\nthe previous example the 60 data blocks would be followed by 20 sparse blocks\nthe last compression unit (blocks 65 to 80) would be sparse.\n\n[NOTE]\nA compression unit can consists of multiple compressed data runs, e.g. 1 data\nblock followed by 4 data blocks followed by 11 sparse blocks. Data runs have\nbeen observed where the last data run size does not align with the compression\nunit size.\n\n[NOTE]\nThe sparse blocks data run can be stored in a subsequent attribute in an\nattribute chain and can be stored in multiple data runs.\n\n[yellow-background]*Does the sparse flag needs to be set for sparse compressed\nfiles?*\n\n[yellow-background]*Is resident data is always uncompressed?*\n\nAlso see `[RUSSON05]` for more detailed examples.\n\n=== [[compression_block_based_storage]]Block based storage\n\nNTFS compression stores the \\'compressed' data in blocks. Each block has a 2\nbyte block header.\n\nThe block is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | | Block size\n| 2 | (compressed data size) | |\n|===\n\nThe upper 4 bits of the block size are used as flags.\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Bit(s) | Description\n| 0 - 11 | Compressed data size\n| 12 - 14 | [yellow-background]*Unknown flags*\n| 15 | Data is compressed\n|===\n\n=== LZNT1 compression method\n\nFor more information about LZNT1 see:\nhttps://github.com/libyal/libfwnt/blob/main/documentation/Compression%20methods.asciidoc[[LIBFWNT\\]]\n\nAlso see section: <<corruption_scenarios,Corruption scenarios>>\n\n=== Windows Overlay Filter (WOF) compressed data\n\nA MFT entry that contains Windows Overlay Filter (WOF) compressed data has the\nfollowing attributes:\n\n* reparse point attribute with tag 0x80000017, which defines the compression method\n* a nameless data attribute that is sparse and contains the uncompressed data size\n* a data attribute named WofCompressedData that contains LZXPRESS Huffman or LZX compressed data\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _Chunk offset table_\n| 0 | ... | | Array of 32-bit of 64-bit compressed data chunk offsets +\nThe offset is relative from the start of the data chunks\n4+| _Data chunks_\n| ... | ... | | One or more compressed or uncompressed data chunks\n|===\n\n[NOTE]\nIf the chunk size equals the size of the uncompressed data the chunk is stored\n(as-is) uncompressed.\n\nThe size of the chunk offset table is:\n\n....\nnumber of chunk offsets = uncompressed size / compression unit size\n....\n\nThe offset of the first compressed data chunk is at the end of the chunk offset\ntable and is not stored in the chunk offset table.\n\nFor more information about the compression methods see section\n<<wof_compression_method,Windows Overlay Filter (WOF) compression method>>\n\n== [[reparse_point]]The reparse point\n\nThe reparse point is used to create file system-level links. Reparse data is\nstored in the reparse point attribute. The reparse point data\n(REPARSE_DATA_BUFFER) is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Reparse point tag\n| 4 | 2 | | Reparse data size\n| 6 | 2 | 0 | [yellow-background]*Unknown (Reserved)*\n| 8 | ... | | Reparse data\n|===\n\n[yellow-background]*What about the GUID mentioned in `[RUSSON05]` in third\nparty reparse points.*\n\n[yellow-background]*`[MSDN]` ReparseGuid: A 16-byte GUID that uniquely\nidentifies the owner of the reparse point. Reparse pointGUIDs are assigned by\nthe implementer of a file system, the file system filter driver, or the\nminifilter driver. The implementer must generate one GUID to use with their\nassigned reparse point tag, and must always use this GUID as the ReparseGuid\nfor that tag.*\n\n=== [[reparse_point_tag]]Reparse point tag\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0.0  | 16 bits | | Type\n| 2.0  | 12 bits | | [yellow-background]*Unknown (Reserved)*\n| 3.4 | 4 bits | | Flags\n|===\n\n==== Predefined reparse point tag values\n\nPredefined reparse point tag values according to `[MSDN]`:\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000000 | IO_REPARSE_TAG_RESERVED_ZERO | [yellow-background]*Unknown (Reserved)*\n| 0x00000001 | IO_REPARSE_TAG_RESERVED_ONE | [yellow-background]*Unknown (Reserved)*\n| 0x00000002 | IO_REPARSE_TAG_RESERVED_TWO | [yellow-background]*Unknown (Reserved)*\n| | |\n| 0x80000005 | IO_REPARSE_TAG_DRIVE_EXTENDER | Used by Home server drive extender\n| 0x80000006 | IO_REPARSE_TAG_HSM2 | Used by Hierarchical Storage Manager Product\n| 0x80000007 | IO_REPARSE_TAG_SIS | Used by single-instance storage (SIS) filter driver\n| 0x80000008 | IO_REPARSE_TAG_WIM | Used by the WIM Mount filter\n| 0x80000009 | IO_REPARSE_TAG_CSV | Used by Clustered Shared Volumes (CSV) version 1\n| 0x8000000a | IO_REPARSE_TAG_DFS | Used by the Distributed File System (DFS)\n| 0x8000000b | IO_REPARSE_TAG_FILTER_MANAGER | Used by filter manager test harness\n| | |\n| 0x80000012 | IO_REPARSE_TAG_DFSR | Used by the Distributed File System (DFS)\n| 0x80000013 | IO_REPARSE_TAG_DEDUP | Used by the Data Deduplication (Dedup)\n| 0x80000014 | IO_REPARSE_TAG_NFS | Used by the Network File System (NFS)\n| 0x80000015 | IO_REPARSE_TAG_FILE_PLACEHOLDER | Used by Windows Shell for placeholder files\n| 0x80000016 | IO_REPARSE_TAG_DFM | Used by Dynamic File filter\n| 0x80000017 | IO_REPARSE_TAG_WOF | Used by Windows Overlay Filter (WOF), for either WIMBoot or compression +\nSee section: <<wof_reparse_data,Windows Overlay Filter (WOF) reparse data>>\n| 0x80000018 | IO_REPARSE_TAG_WCI | Used by Windows Container Isolation (WCI) +\nSee section: <<wci_reparse_data,Windows Container Isolation (WCI) reparse data>>\n| | |\n| 0x8000001b | IO_REPARSE_TAG_APPEXECLINK | Used by Universal Windows Platform (UWP) packages to encode information that allows the application to be launched by CreateProcess\n| | |\n| 0x8000001e | IO_REPARSE_TAG_STORAGE_SYNC | Used by the Azure File Sync (AFS) filter\n| | |\n| 0x80000020 | IO_REPARSE_TAG_UNHANDLED | Used by Windows Container Isolation (WCI)\n| 0x80000021 | IO_REPARSE_TAG_ONEDRIVE | [yellow-background]*Unknown (Not used)*\n| | |\n| 0x80000023 | IO_REPARSE_TAG_AF_UNIX | Used by the Windows Subsystem for Linux (WSL) to represent a UNIX domain socket\n| 0x80000024 | IO_REPARSE_TAG_LX_FIFO | Used by the Windows Subsystem for Linux (WSL) to represent a UNIX FIFO (named pipe)\n| 0x80000025 | IO_REPARSE_TAG_LX_CHR | Used by the Windows Subsystem for Linux (WSL) to represent a UNIX character special file\n| 0x80000036 | IO_REPARSE_TAG_LX_BLK | Used by the Windows Subsystem for Linux (WSL) to represent a UNIX block special file\n| | |\n| 0x9000001c | IO_REPARSE_TAG_PROJFS | Used by the Windows Projected File System filter, for files managed by a user mode provider such as VFS for Git\n| | |\n| 0x90001018 | IO_REPARSE_TAG_WCI_1 | Used by Windows Container Isolation (WCI)\n| | |\n| 0x9000101a | IO_REPARSE_TAG_CLOUD_1 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000201a | IO_REPARSE_TAG_CLOUD_2 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000301a | IO_REPARSE_TAG_CLOUD_3 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000401a | IO_REPARSE_TAG_CLOUD_4 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000501a | IO_REPARSE_TAG_CLOUD_5 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000601a | IO_REPARSE_TAG_CLOUD_6 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000701a | IO_REPARSE_TAG_CLOUD_7 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000801a | IO_REPARSE_TAG_CLOUD_8 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000901a | IO_REPARSE_TAG_CLOUD_9 | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000a01a | IO_REPARSE_TAG_CLOUD_A | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000b01a | IO_REPARSE_TAG_CLOUD_B | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000c01a | IO_REPARSE_TAG_CLOUD_C | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000d01a | IO_REPARSE_TAG_CLOUD_D | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000e01a | IO_REPARSE_TAG_CLOUD_E | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0x9000f01a | IO_REPARSE_TAG_CLOUD_F | Used by the Cloud Files filter, for files managed by a sync engine such as OneDrive\n| | |\n| 0xa0000003 | IO_REPARSE_TAG_MOUNT_POINT | Junction or mount point +\nSee section: <<junction_reparse_data,Junction or mount point reparse data>>\n| | |\n| 0xa000000c | IO_REPARSE_TAG_SYMLINK | Symbolic link +\nSee section: <<symbolic_link_reparse_data,Symbolic link reparse data>>\n| | |\n| 0xa0000010 | IO_REPARSE_TAG_IIS_CACHE | Used by Microsoft Internet Information Services (IIS) caching\n| | |\n| 0xa0000019 | IO_REPARSE_TAG_GLOBAL_REPARSE | Used by NPFS to indicate a named pipe symbolic link from a server silo into the host silo\n| 0xa000001a | IO_REPARSE_TAG_CLOUD | Used by the Cloud Files filter, for files managed by a sync engine such as Microsoft OneDrive\n| | |\n| 0xa000001d | IO_REPARSE_TAG_LX_SYMLINK | Used by the Windows Subsystem for Linux (WSL) to represent a UNIX symbolic link\n| | |\n| 0xa000001f | IO_REPARSE_TAG_WCI_TOMBSTONE | Used by Windows Container Isolation (WCI)\n| | |\n| 0xa0000022 | IO_REPARSE_TAG_PROJFS_TOMBSTONE | Used by the Windows Projected File System filter, for files managed by a user mode provider such as VFS for Git\n| | |\n| 0xa0000027 | IO_REPARSE_TAG_WCI_LINK | Used by Windows Container Isolation (WCI)\n| | |\n| 0xa0001027 | IO_REPARSE_TAG_WCI_LINK_1 | Used by Windows Container Isolation (WCI)\n| | |\n| 0xc0000004 | IO_REPARSE_TAG_HSM | Used by Hierarchical Storage Manager Product\n| | |\n| 0xc0000014 | IO_REPARSE_TAG_APPXSTRM | [yellow-background]*Unknown (Not used)*\n|===\n\n==== Notes\n\n[yellow-background]*single-instance storage (SIS): An NTFS feature that\nimplements links with the semantics of copies for files stored on an\nNTFSvolume. SIS uses copy-on-close to implement the copy semantics of its\nlinks.*\n\n....\nIs this documentation wrong or are these alternative values?\n\nFlag\tDescription\n0x68000005\tNSS\n0x68000006\tNSS recover\n0x68000007\tSIS\n0x68000008\tDFS\n0x88000003\tMount point\n0xA8000004\tHSM\n0xE8000000\tSymbolic link\n....\n\n==== Reparse point tag flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x1 | | [yellow-background]*Unknown (Reserved)* +\nReserved according to `[MSDN]`\n| 0x2 | | Is alias (Name surrogate bit) +\nIf this bit is set, the file or directory represents another named entity in the system.\n| 0x4 | | Is high-latency media +\nReserved according to `[MSDN]`\n| 0x8 | | Is native (Microsoft-bit) +\n[yellow-background]*Does this flag influence the reparse point GUID?*\n|===\n\n=== [[junction_reparse_data]]Junction or mount point reparse data\n\nA reparse point with tag IO_REPARSE_TAG_MOUNT_POINT (0xa0000003) contains\njunction or mount point reparse data. The junction or mount point reparse data\nis of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | | Substitute name offset +\nThe offset is relative from the start of the reparse name data\n| 2 | 2 | | Substitute name size +\nValue in bytes, the size of the end-of-string character is not included\n| 4 | 2 | | Print name offset +\nThe offset is relative from the start of the reparse name data\n| 6 | 2 | | Print name size +\nValue in bytes, the size of the end-of-string character is not included\n4+| _Reparse name data_\n| 8 | ... | | Substitute name +\nContains an UTF-16 little-endian [yellow-background]*with the end-of-string character?*\n| ... | ... | | Print name +\nContains an UTF-16 little-endian [yellow-background]*with the end-of-string character?*\n|===\n\n[yellow-background]*TODO: what do byte values like 0x02 represent in the substitute name?*\n\n....\n00000010: 5c 00 3f 00 3f 00 02 00  43 00 3a 00 5c 00 55 00   \\.?.?... C.:.\\.U.\n00000020: 73 00 65 00 72 00 73 00  5c 00 74 00 65 00 73 00   s.e.r.s. \\.t.e.s.\n00000030: 74 00 5c 00 44 00 6f 00  63 00 75 00 6d 00 65 00   t.\\.D.o. c.u.m.e.\n00000040: 6e 00 74 00 73 00 00 00                            n.t.s...\n....\n\n=== [[symbolic_link_reparse_data]]Symbolic link reparse data\n\nA reparse point with tag IO_REPARSE_TAG_SYMLINK (0xa000000c0) contains symbolic\nlink reparse data. The symbolic link reparse data is of variable size and\nconsists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | | Substitute name offset +\nThe offset is relative from the start of the reparse name data\n| 2 | 2 | | Substitute name size +\nValue in bytes\n| 4 | 2 | | Print name offset +\nThe offset is relative from the start of the reparse name data\n| 6 | 2 | | Print name size +\nValue in bytes\n| 8 | 4 | | Symbolic link flags\n4+| _Reparse name data_\n| 12 | ... | | Substitute name +\nContains an UTF-16 little-endian without end-of-string character\n| ... | ... | | Print name +\nContains an UTF-16 little-endian without end-of-string character\n|===\n\n==== Symbolic link flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | SYMLINK_FLAG_RELATIVE | The substitute name is a path name relative to the directory containing the symbolic link.\n|===\n\n=== [[wof_reparse_data]]Windows Overlay Filter (WOF) reparse data\n\nA reparse point with tag IO_REPARSE_TAG_WOF (0x80000017) contains Windows\nOverlay Filter (WOF) reparse data. The Windows Overlay Filter (WOF) reparse\ndata is 16 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _External provider information_\n| 0 | 4 | 1 | [yellow-background]*Unknown (WOF version)*\n| 4 | 4 | 2 | [yellow-background]*Unknown (WOF provider)*\n4+| _Internal provider information_\n| 8 | 4 | 1 | [yellow-background]*Unknown (file information version)*\n| 12 | 4 | | Compression method +\nSee section <<wof_compression_method,Windows Overlay Filter (WOF) compression method>>\n|===\n\n==== [[wof_compression_method]]Windows Overlay Filter (WOF) compression method\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0 | | LZXPRESS Huffman with 4k window (compression unit)\n| 1 | | LZX with 32k window (compression unit)\n| 2 | | LZXPRESS Huffman with 8k window (compression unit)\n| 3 | | LZXPRESS Huffman with 16k window (compression unit)\n|===\n\nFor more information about LZXPRESS Huffman see:\nhttps://github.com/libyal/libfwnt/blob/main/documentation/Compression%20methods.asciidoc[[LIBFWNT\\]]\n\n=== [[wci_reparse_data]]Windows Container Isolation (WCI) reparse data\n\nA reparse point with tag IO_REPARSE_TAG_WCI (0x80000018) contains Windows\nContainer Isolation (WCI) reparse data. The Windows Container Isolation (WCI)\nreparse data is of variable size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | 1 | Version\n| 4 | 4 | 0 | [yellow-background]*Unknown (reserved)*\n| 8 | 16 | | Look-up identifier +\nContains a GUID\n| 24 | 2 | | Name size +\nValue in bytes\n| 26 | ... | | Name +\nContains an UTF-16 little-endian without end-of-string character\n|===\n\n== The allocation bitmap\n\nThe metadata file $Bitmap contains the allocation bitmap.\n\nEvery bit in the allocation bitmap represents a block the size of the cluster\nblock, where the LSB is the first bit in a byte.\n\n[yellow-background]*TODO determine and describe what the $SRAT data stream is used for.*\n\n== [[access_control]]Access control\n\nThe $Secure metadata file contains the security descriptors used for access control.\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Type | Name | Description\n| Data | $SDS | Security descriptor data stream +\nContains all the Security descriptors on the volume\n| Index | $SDH | Security descriptor hash index\n| Index | $SII | Security descriptor identifier index +\nContains the mapping of the security descriptor identifier (in $STANDARD_INFORMATION) to the offset of the security descriptor data (in $Secure:$SDS)\n|===\n\n[yellow-background]*TODO add text*\n\n[yellow-background]*In the $SII index do the index values contain a 32-bit checksum?*\n\n=== Security descriptor hash ($SDH) index\n\n==== [[security_descriptor_hash_index_value]]The security descriptor hash index value\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _Key data_\n| 0 | 4 | | Security descriptor hash\n| 4 | 4 | | Security descriptor identifier\n4+| _Value data_\n| 8 | 4 | | Security descriptor hash\n| 12 | 4 | | Security descriptor identifier\n| 16 | 8 | | Security descriptor data offset (in $SDS)\n| 24 | 4 | | Security descriptor data size (in $SDS)\n| 28 | 4 | | [yellow-background]*Alignment padding (8-byte alignment)* +\n[yellow-background]*Contains string \"I\\x00I\\x00\" ?*\n|===\n\n=== Security descriptor identifier ($SII) index\n\n==== [[security_descriptor_identifier_index_value]]The security descriptor identifier index value\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _Key data_\n| 0 | 4 | | Security descriptor identifier\n4+| _Value data_\n| 4 | 4 | | Security descriptor hash +\n[yellow-background]*TODO describe the hash algorithm*\n| 8 | 4 | | Security descriptor identifier\n| 12 | 8 | | Security descriptor data offset (in $SDS)\n| 20 | 4 | | Security descriptor data size (in $SDS)\n|===\n\n=== Security descriptor ($SDS) data stream\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Security descriptor hash\n| 4 | 4 | | Security descriptor identifier\n| 12 | 8 | | Security descriptor data offset (in $SDS)\n| 20 | 4 | | Security descriptor data size (in $SDS)\n| 24 | ... | | Security descriptor data +\nSee: https://github.com/libyal/libfwnt/blob/main/documentation/Security%20Descriptor.asciidoc[[LIBFWNT\\]]\n| ... | ... | | 16-bit alignment padding.\n|===\n\n== The object identifiers\n\n[yellow-background]*TODO add text*\n\n=== $ObjID:$O\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _Key data_\n| 0 | 16 | | File (or object) identifier +\nContains a GUID\n4+| _Value data_\n| 4 | 8 | | File reference +\nSee section: <<file_reference,The file reference>>\n| 12 | 16 | | Birth droid volume identifier +\nContains a GUID\n| 28 | 16 | | Birth droid file (or object) identifier +\nContains a GUID\n| 44 | 16 | | Birth droid domain identifier +\nContains a GUID\n|===\n\n....\n00000000  00 00 00 00 13 00 00 00  00 10 00 00 01 00 00 00  |................|\n00000010  10 00 00 00 88 00 00 00  88 00 00 00 01 00 00 00  |................|\n00000020  20 00 38 00 00 00 00 00  60 00 10 00 01 00 00 00  | .8.....`.......|\n\nOBJECT_ID: 43ecee59-e2b3-11dc-ad7e-001c2582598f of root directory\n\n00000030  59 ee ec 43 b3 e2 dc 11  ad 7e 00 1c 25 82 59 8f  |Y..C.....~..%.Y.|\n\nMFT file reference\nOBJECT_ID: e6a67b60-c0b5-4b53-b8fe-94470c83df89 of $Volume\n\n00000040  05 00 00 00 00 00 05 00  60 7b a6 e6 b5 c0 53 4b  |........`{....SK|\n00000050  b8 fe 94 47 0c 83 df 89  59 ee ec 43 b3 e2 dc 11  |...G....Y..C....|\n00000060  ad 7e 00 1c 25 82 59 8f  00 00 00 00 00 00 00 00  |.~..%.Y.........|\n00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n00000080  00 00 00 00 00 00 00 00  18 00 00 00 03 00 00 00  |................|\n00000090  01 00 00 00 00 00 00 00                           |........|\n....\n\n== [[log_file]]Metadata transaction journal (log file)\n\nThe metadata file $LogFile contains the metadata transaction journal.\n\n[yellow-background]*TODO add text.*\n\n* Log File Service restart page header\n* <<fix_up_values,fix-up values>>\n\n=== Log File service restart page header\n\nThe Log File service restart page header (LFS_RESTART_PAGE_HEADER) is 30 bytes\nin size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n4+| _MULTI_SECTOR_HEADER_\n| 0 | 4 | \"CHKD\" +\n\"RCRD\" +\n\"RSTR\" | Signature\n| 4 | 2 | | The fix-up values offset +\nContains an offset relative from the start of the restart page header +\nAccording to `[MSDN]` this value is the update sequence array offset\n| 6 | 2 | | The number of fix-up values +\nAccording to `[MSDN]` this value is the update sequence array size.\n4+|\n| 8 | 8 | | Checkdisk last LSN\n| 16 | 4 | | System page size\n| 20 | 4 | | Log page size\n| 24 | 2 | | Restart offset\n| 26 | 2 | | Minor format version\n| 28 | 2 | | Major format version +\n-1 => Beta Version +\n0 => Transition +\n1 => Update sequence support\n|===\n\n=== Notes\n\nLog File Service record header (LFS_RECORD_HEADER)\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | Metadata transaction journal sequence number +\nContains a $LogFile Sequence Number (LSN)\n| 8 | 8 | | Previous metadata transaction journal sequence number +\nContains a $LogFile Sequence Number (LSN)\n| 16 | 8 | | Undo next metadata transaction journal sequence number +\nContains a $LogFile Sequence Number (LSN)\n|===\n\n....\nLFS_RECORD_HEADER {\n\n    //\n    //  The following field is the size of data area for this record.  The\n    //  log record header will be padded if necessary to fill to a 64-bit\n    //  boundary, so the client data will begin on a 64-bit boundary to\n    //  insure that all of his data is 64-bit aligned.  The below value\n    //  has not been padded to 64 bits however.\n    //\n\n    ULONG ClientDataLength;\n\n    //\n    //  Client ID.  This identifies the owner of this log record.  The owner\n    //  is uniquely identified by his offset in the client array and the\n    //  sequence number associated with that client record.\n    //\n\n    LFS_CLIENT_ID ClientId;\n\n    //\n    //  This the Log Record type.  This could be a commit protocol record,\n    //  a client restart area or a client update record.\n    //\n\n    LFS_RECORD_TYPE RecordType;\n\n    //\n    //  Transaction ID.  This is used externally by a client (Transaction\n    //  Manager) to group log file entries.\n    //\n\n    TRANSACTION_ID TransactionId;\n\n    //\n    //  Log record flags.\n    //\n\n    USHORT Flags;\n\n    //\n    //  Alignment field.\n    //\n\n    USHORT AlignWord;\n....\n\n== [[usn_change_journal]]USN change journal\n\nThe metadata file $Extend\\$UsnJrnl contains the USN change journal. It\nis a sparse file in which NTFS stores records of changes to files and\ndirectories. Applications make use of the journal to respond to file and\ndirectory changes as they occur, like e.g. the Windows File Replication Service\n(FRS) and the Windows (Desktop) Search service.\n\nThe USN change journal consists of:\n\n* the $UsnJrnl:$Max data stream, containing metadata like the maximum size of the journal\n* the $UsnJrnl:$J data stream, containing the update (or change) entries. The $UsnJrnl:$J data stream is sparse.\n\n=== USN change journal metadata\n\nThe USN change journal metadata is 32 bytes in size and consists of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 8 | | Maximum size +\nContains the number of bytes\n| 8 | 8 | | Allocation delta +\nContains the number of bytes\n| 16 | 8 | | Update (USN) journal identifier +\nContains a FILETIME\n| 24 | 8 | | [yellow-background]*Unknown (empty)*\n|===\n\n=== USN change journal entries\n\nThe $UsnJrnl:$J data stream consists of an array of USN change journal entries.\nThe USN change journal entries are stored on a per block-basis and 64-bit\naligned. Therefore the remainder of the block can contain 0-byte values.\n\n[yellow-background]*TODO: The journal block size seems to be 4096 bytes, but\ncould this be defined by the index entry size? It does not match the cluster\nblock size.*\n\nOnce the stream reaches maximum size the earliest USN change journal entries\nare removed from the stream and replaced with a sparse data run.\n\n==== USN change journal entry\n\nThe USN change journal entry (USN_RECORD_V2) is of variable size and consists\nof:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | Entry (or record) size\n| 4 | 2 | 2 | Major version\n| 6 | 2 | 0 | Minor version\n| 8 | 8 | | File reference\n| 16 | 8 | | Parent file reference\n| 24 | 8 | | Update sequence number (USN) +\nContains the file offset of the USN change journal entry which is used as a unique identifier\n| 32 | 8 | | Update date and time +\nContains a FILETIME\n| 40 | 4 | | Update reason flags +\nSee section: <<update_reason_flags,Update reason flags>>\n| 44 | 4 | | Update source flags +\nSee section: <<update_source_flags,Update source flags>>\n| 48 | 4 | | Security descriptor identifier +\nContains the entry number in the security ID index ($Secure:$SII) +\nSee section: <<access_control,Access Control>>\n| 52 | 4 | | File attribute flags +\nSee section: <<file_attribute_flags,File attribute flags>>\n| 56 | 2 | | Name size +\nContains the byte size of the name\n| 58 | 2 | | Name offset +\nThe offset is relative from the start of the USN change journal entry\n| 60 | (name size) | | Name\n| ... | ... | 0x00 | Padding\n|===\n\n==== [[update_reason_flags]]Update reason flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | USN_REASON_DATA_OVERWRITE | The data in the file or directory is overwritten. +\n[yellow-background]*The default (unnamed) $DATA attribute was overwritten*\n| 0x00000002 | USN_REASON_DATA_EXTEND | The file or directory is extended +\n[yellow-background]*The default (unnamed) $DATA attribute was extended*\n| 0x00000004 | USN_REASON_DATA_TRUNCATION | The file or directory is truncated. +\n[yellow-background]*The default (unnamed) $DATA attribute was truncated*\n| | |\n| 0x00000010 | USN_REASON_NAMED_DATA_OVERWRITE | One or more named data streams ($DATA attributes) of file were overwritten\n| 0x00000020 | USN_REASON_NAMED_DATA_EXTEND | One or more named data streams ($DATA attributes) of file were extended\n| 0x00000040 | USN_REASON_NAMED_DATA_TRUNCATION | One or more named data streams ($DATA attributes) of a file were truncated\n| | |\n| 0x00000100 | USN_REASON_FILE_CREATE | The file or directory was created\n| 0x00000200 | USN_REASON_FILE_DELETE | The file or directory was deleted\n| 0x00000400 | USN_REASON_EA_CHANGE | The extended attributes of the file were changed\n| 0x00000800 | USN_REASON_SECURITY_CHANGE | The access rights (security descriptor) of a file or directory were changed\n| 0x00001000 | USN_REASON_RENAME_OLD_NAME | The name changed +\nThe USN change journal entry contains the old name\n| 0x00002000 | USN_REASON_RENAME_NEW_NAME | The name changed +\nThe USN change journal entry contains the new name\n| 0x00004000 | USN_REASON_INDEXABLE_CHANGE | Content indexed status changed +\nthe file attribute: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED was changed\n| 0x00008000 | USN_REASON_BASIC_INFO_CHANGE | Basic file or directory attributes changed +\nOne or more file or directory attributes were changed e.g. read-only, hidden, system, archive, or sparse attribute, or one or more time stamps.\n| 0x00010000 | USN_REASON_HARD_LINK_CHANGE | A hard link was created or deleted\n| 0x00020000 | USN_REASON_COMPRESSION_CHANGE | The file or directory was compressed or decompressed\n| 0x00040000 | USN_REASON_ENCRYPTION_CHANGE | The file or directory was encrypted or decrypted\n| 0x00080000 | USN_REASON_OBJECT_ID_CHANGE | The object identifier of a file or directory was changed\n| 0x00100000 | USN_REASON_REPARSE_POINT_CHANGE | The reparse point that in a file or directory was changed, or a reparse point was added to or deleted from a file or directory.\n| 0x00200000 | USN_REASON_STREAM_CHANGE | A named data stream ($DATA attribute) is added to or removed from a file, or a named stream is renamed\n| 0x00400000 | USN_REASON_TRANSACTED_CHANGE | [yellow-background]*Unknown found in TxF USN change journal entry list*\n| | |\n| 0x80000000 | USN_REASON_CLOSE | The file or directory was closed\n|===\n\n==== [[update_source_flags]]Update source flags\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | USN_SOURCE_DATA_MANAGEMENT | The operation added a private data stream to a file or directory. The modifications did not change the application data.\n| 0x00000002 | USN_SOURCE_AUXILIARY_DATA | The operation was caused by the operating system. Although a write operation is performed on the item, the data was not changed.\n| 0x00000004 | USN_SOURCE_REPLICATION_MANAGEMENT | The operation was caused by file replication\n|===\n\n== Alternate data streams\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Data stream name | Description\n| ♣BnhqlkugBim0elg1M1pt2tjdZe +\n♣SummaryInformation +\n{4c8cc155-6c1e-11d1-8e41-00c04fb9386d} | Used to store property sets +\nWhere ♣ is Unicode character U+2663 also known as black club\n| {59828bbb-3f72-4c1b-a420-b51ad66eb5d3}.XPRESS | Used during remote differential compression\n| AFP_AfpInfo +\nAFP_Resource | Used to store Macintosh operating system property lists\n| encryptable | Used to store attributes relating to thumbnails in the thumbnails database\n| favicon | Used to store favorite icons for web pages.\n| ms-properties | [yellow-background]*Unknown (Used to store property sets)*\n| OECustomProperty | Used to store custom properties related to email files\n| Zone.Identifier | Used to store URL security zones\n|===\n\n=== ms-properties\n\n....\n00000000  e9 00 00 00 8c 00 00 00  31 53 50 53 53 f1 ef fc  |........1SPSS...|\n00000010  39 e8 f3 4c a9 e7 ea 22  83 20 94 b8 25 00 00 00  |9..L...\". ..%...|\n00000020  6f 00 00 00 00 1f 10 00  00 01 00 00 00 08 00 00  |o...............|\n00000030  00 50 00 72 00 69 00 76  00 61 00 74 00 65 00 00  |.P.r.i.v.a.t.e..|\n00000040  00 25 00 00 00 6c 00 00  00 00 1f 00 00 00 09 00  |.%...l..........|\n00000050  00 00 53 00 6b 00 79 00  44 00 72 00 69 00 76 00  |..S.k.y.D.r.i.v.|\n00000060  65 00 00 00 00 00 11 00  00 00 6d 00 00 00 00 13  |e.........m.....|\n00000070  00 00 00 00 0d 04 00 15  00 00 00 6e 00 00 00 00  |...........n....|\n00000080  15 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n00000090  59 00 00 00 31 53 50 53  d6 b9 f9 b2 c4 fe d5 4d  |Y...1SPS.......M|\n000000a0  94 d7 89 57 48 8c 80 7b  3d 00 00 00 03 00 00 00  |...WH..{=.......|\n000000b0  00 1f 00 00 00 15 00 00  00 37 00 46 00 30 00 39  |.........7.F.0.9|\n000000c0  00 35 00 31 00 34 00 39  00 30 00 32 00 37 00 38  |.5.1.4.9.0.2.7.8|\n000000d0  00 34 00 38 00 45 00 44  00 21 00 31 00 30 00 33  |.4.8.E.D.!.1.0.3|\n000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00           |.............|\n000000ed\n....\n\n=== Zone.Identifier\n\n....\n00000000  5b 5a 6f 6e 65 54 72 61  6e 73 66 65 72 5d 0d 0a  |[ZoneTransfer]..|\n00000010  5a 6f 6e 65 49 64 3d 33  0d 0a                    |ZoneId=3..|\n0000001a\n....\n\n== [[transactional_ntfs]]Transactional NTFS (TxF)\n\nAs of Vista ([yellow-background]*or windows server 2003?*) Transactional NTFS\n(TxF) was added.\n\nIn TxF the resource manager (RM) keeps track of transactional metadata and log\nfiles. The TxF related metadata files are stored in the metadata directory:\n\n....\n$Extend\\$RmMetadata\n....\n\n=== Resource manager repair information\n\nThe resource manager repair information metadata file:\n$Extend\\$RmMetadata\\$Repair consists of the following data streams:\n\n* the default (unnamed) data stream, [yellow-background]*purpose unknown*\n* the $Config data stream, contains the resource manager repair configuration information\n\n==== Resource manager repair configuration information\n\nThe $Repair:$Config data streams contains:\n\n[yellow-background]*TODO*\n\n....\n00000000  01 00 00 00 01 00 00 00                           |........|\n....\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 4 | | [yellow-background]*Unknown*\n| 4 | 4 | | [yellow-background]*Unknown*\n|===\n\n=== Transactional NTFS (TxF) metadata directory\n\nThe transactional NTFS (TxF) metadata directory: $Extend\\$RmMetadata\\$Txf is used to isolate files for delete or overwrite operations.\n\nFile format? All files seem to start with similar information\n\n=== TxF Old Page Stream (TOPS) file\n\nThe TxF Old Page Stream (TOPS) file: $Extend\\$RmMetadata\\$TxfLog\\$Tops consists of the following data streams:\n\n* the default (unnamed) data stream, contains metadata about the resource manager, such as its GUID, its CLFS log policy, and the LSN at which recovery should start\n* the $T data stream, contains the file data that is partially overwritten by a transaction as opposed to a full overwrite, which would move the file into the Transactional NTFS (TxF) metadata directory\n\n==== TxF Old Page Stream (TOPS) metadata\n\nThe $Tops default (unnamed) data streams contains:\n\n[yellow-background]*TODO*\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 2 | 0x000a | [yellow-background]*Unknown*\n| 2 | 2 | 0x0064 | [yellow-background]*Size of TOPS metadata*\n| 4 | 4 | 0x0001 | [yellow-background]*Unknown* +\n[yellow-background]*Number of resource managers/streams?*\n| 8 | 16 | | Resource Manager (RM) identifier +\nContains a GUID\n| 24 | 8 | | [yellow-background]*Unknown (empty)*\n| 32 | 8 | | [yellow-background]*Base (or log start)* LSN of TxFLog stream\n| 40 | 8 | | [yellow-background]*Unknown*\n| 48 | 8 | | [yellow-background]*Last* flushed LSN of TxFLog stream\n| 56 | 8 | | [yellow-background]*Unknown*\n| 64 | 8 | | [yellow-background]*Unknown (empty)*\n| 72 | 8 | | [yellow-background]*Restart LSN?*\n| 80 | 20 | | [yellow-background]*Unknown*\n|===\n\n==== TxF Old Page Stream (TOPS) file data\n\nThe $Tops:$T data streams contains the file data that is partially overwritten\nby a transaction. It consists of multiple pending transaction XML-documents.\n\n[yellow-background]*Note that the start of each sector contains 0x0001, is this\na value indication the sector is empty? Or are there fix-up values stored\nsomewhere else?*\n\nA pending transaction XML-document starts with an UTF-8 byte-order-mark. Is\nroughly contains the following data:\n\n....\n<?xml version='1.0' encoding='utf-8'?>\n<PendingTransaction Version=\"2.0\" Identifier=\"...\">\n   <Transactions>\n      <Transaction TransactionId=\"...\">\n      <Install Application=\"..., Culture=..., Version=..., PublicKeyToken=...,\n                           ProcessorArchitecture=..., versionScope=...\"\n               RefGuid=\"...\"\n               RefIdentifier=\"...\"\n               RefExtra=\"...\"/>\n      ...\n      </Transaction>\n   </Transactions>\n   <ChangeList>\n      <Change Family=\"..., Culture=..., PublicKeyToken=...,\n                     ProcessorArchitecture=..., versionScope=...\"\n              New=\"...\"/>\n      ...\n   </ChangeList>\n   <POQ>\n      <BeginTransaction id=\"...\"/>\n\n      <CreateFile path=\"...\"\n                  fileAttribute=\"...\"/>\n      <DeleteFile path=\"...\"/>\n      <MoveFile source=\"...\" destination=\"...\"/>\n      <HardlinkFile source=\"...\" destination=\"...\"/>\n      <SetFileInformation path=\"...\"\n                          securityDescriptor=\"binary base64:...\"\n                          flags=\"...\"/>\n\n       <CreateKey path=\"...\"/>\n       <SetKeyValue path=\"...\"\n                    name=\"...\"\n                    type=\"...\"\n                    encoding=\"base64\"\n                    value=\"...\"/>\n      <DeleteKeyValue path=\"...\"\n                      name=\"...\"/>\n\n      ...\n   </POQ>\n   <InstallerQueue Length=\"...\">\n      <Action Installer=\"...\"\n              Mode=\"...\"\n              Phase=\"...\"\n              Family=\"..., Culture=..., PublicKeyToken=...,\n                     ProcessorArchitecture=..., versionScope=...\"\n              Old=\"...\"\n              New=\"...\"/>\n\n      ...\n   </InstallerQueue >\n</PendingTransaction>\n....\n\n=== Transactional NTFS (TxF) Common Log File System (CLFS) files\n\nTxF uses a Common Log File System (CLFS) log store and the logged utility\nstream attribute named $TXF_DATA.\n\nSee `[RUSSNOVICH09]`, `[MSDN]` and `[LIBFSCLFS]` for more information about\nCLFS.\n\nThe base log file (BLF) of the TxF log store is:\n\n....\n$Extend\\$RmMetadata\\$TxfLog\\TxfLog.blf\n....\n\nCommonly the corresponding container files are:\n\n....\n$Extend\\$RmMetadata\\$TxfLog\\TxfLogContainer00000000000000000001\n$Extend\\$RmMetadata\\$TxfLog\\TxfLogContainer00000000000000000002\n....\n\nTxF uses a multiplexed log store which contains two streams:\n\n* the KtmLog stream used for Kernel Transaction Manager (KTM) metadata records\n* TxfLog stream, which contains the TxF log records.\n\n=== Transactional data logged utility stream attribute\n\nThe transactional data ($TXF_DATA) logged utility stream attribute is 56 bytes\nin size and consist of:\n\n[cols=\"1,1,1,5\",options=\"header\"]\n|===\n| Offset | Size | Value | Description\n| 0 | 6 | | [yellow-background]*Unknown (remnant data)*\n| 6 | 8 | | Resource manager root file reference +\nContains an NTFS file reference that refers to the MFT\n| 14 | 8 | | [yellow-background]*USN index?*\n| 22 | 8 | | File identifier (TxID) +\nContains a TxF file identifier\n| 30 | 8 | | Data LSN +\nContains a CLFS LSN of file data transaction records\n| 38 | 8 | | Metadata LSN +\nContains a CLFS LSN of file system metadata transaction records\n| 46 | 8 | | Directory index LSN +\nContains a CLFS LSN of directory index transaction records\n| 54 | 2 | | [yellow-background]*Flags?* +\n[yellow-background]*Seen: 0x0000, 0x0002*\n|===\n\n[yellow-background]*Note there can be more than 1 per MTF entry*\n\n== Windows definitions\n\n=== [[file_attribute_flags]]File attribute flags\n\nThe file attribute flags consist of the following values:\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| Value | Identifier | Description\n| 0x00000001 | FILE_ATTRIBUTE_READONLY | Is read-only\n| 0x00000002 | FILE_ATTRIBUTE_HIDDEN | Is hidden\n| 0x00000004 | FILE_ATTRIBUTE_SYSTEM | Is a system file or directory\n| 0x00000008 | | Is a volume label +\n[yellow-background]*Not used by NTFS*\n| 0x00000010 | FILE_ATTRIBUTE_DIRECTORY | Is a directory +\n[yellow-background]*Not used by NTFS*\n| 0x00000020 | FILE_ATTRIBUTE_ARCHIVE | Should be archived\n| 0x00000040 | FILE_ATTRIBUTE_DEVICE | Is a device +\n[yellow-background]*Not used by NTFS*\n| 0x00000080 | FILE_ATTRIBUTE_NORMAL | Is normal +\nNone of the other flags should be set\n| 0x00000100 | FILE_ATTRIBUTE_TEMPORARY | Is temporary\n| 0x00000200 | FILE_ATTRIBUTE_SPARSE_FILE | Is a sparse file\n| 0x00000400 | FILE_ATTRIBUTE_REPARSE_POINT | Is a reparse point or symbolic link\n| 0x00000800 | FILE_ATTRIBUTE_COMPRESSED | Is compressed\n| 0x00001000 | FILE_ATTRIBUTE_OFFLINE | Is offline +\nThe data of the file is stored on an offline storage.\n| 0x00002000 | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | Do not index content +\nThe content of the file or directory should not be indexed by the indexing service.\n| 0x00004000 | FILE_ATTRIBUTE_ENCRYPTED | Is encrypted\n| 0x00008000 | | [yellow-background]*Unknown (seen on Windows 95 FAT)*\n| 0x00010000 | FILE_ATTRIBUTE_VIRTUAL | Is virtual\n3+| _The following flags are mainly used in the file name attribute and sparsely in the standard information attribute;_ +\n_it could be that they have a different meaning in both types of attributes or that the standard information flags are not updated._ +\n_For now the latter is assumed._\n| 0x10000000 | | [yellow-background]*Unknown* +\n[yellow-background]*Is directory (or has $I30 index ?) used instead of 0x00000010 ? Seen $Extend directory without this flag*\n| 0x20000000 | | [yellow-background]*Is index view* +\n[yellow-background]*(copy from corresponding bit in MFT record)*\n|===\n\n== [[corruption_scenarios]]Corruption scenarios\n\n=== Data steam with inconsistent data flags\n\nAn MFT entry contains an $ATTRIBUTE_LIST attribute that contains multiple $DATA\nattributes. The $DATA attributes define a LZNT1 compressed data stream though\nonly the first $DATA attribute has the compressed data flag set.\n\n[NOTE]\nIt is unclear if this is a corruption scenario or not.\n\n....\nMFT entry: 220 information:\n\tIs allocated\t\t\t: true\n\tFile reference\t\t\t: 220-59\n\tBase record file reference\t: Not set (0)\n\tJournal sequence number\t\t: 51876429013\n\tNumber of attributes\t\t: 5\n\nAttribute: 1\n\tType\t\t\t\t: $STANDARD_INFORMATION (0x00000010)\n\tCreation time\t\t\t: Jun 05, 2019 06:56:26.032730300 UTC\n\tModification time\t\t: Oct 05, 2019 06:56:04.150940700 UTC\n\tAccess time\t\t\t: Oct 05, 2019 06:56:04.150940700 UTC\n\tEntry modification time\t\t: Oct 05, 2019 06:56:04.150940700 UTC\n\tOwner identifier\t\t: 0\n\tSecurity descriptor identifier\t: 5862\n\tUpdate sequence number\t\t: 11553149976\n\tFile attribute flags\t\t: 0x00000820\n\t\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n\t\tIs compressed (FILE_ATTRIBUTE_COMPRESSED)\n\nAttribute: 2\n\tType\t\t\t\t: $ATTRIBUTE_LIST (0x00000020)\n\nAttribute: 3\n\tType\t\t\t\t: $FILE_NAME (0x00000030)\n\tParent file reference\t\t: 33996-57\n\tCreation time\t\t\t: Jun 05, 2019 06:56:26.032730300 UTC\n\tModification time\t\t: Oct 05, 2019 06:56:03.510061800 UTC\n\tAccess time\t\t\t: Oct 05, 2019 06:56:03.510061800 UTC\n\tEntry modification time\t\t: Oct 05, 2019 06:56:03.510061800 UTC\n\tFile attribute flags\t\t: 0x00000020\n\t\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n\tNamespace\t\t\t: POSIX (0)\n\tName\t\t\t\t: setupapi.dev.20191005_085603.log\n\nAttribute: 4\n\tType\t\t\t\t: $DATA (0x00000080)\n\tData VCN range\t\t\t: 513 - 1103\n\tData flags\t\t\t: 0x0000\n\nAttribute: 5\n\tType\t\t\t\t: $DATA (0x00000080)\n\tData VCN range\t\t\t: 0 - 512\n\tData size\t\t\t: 4487594 bytes\n\tData flags\t\t\t: 0x0001\n....\n\n=== Directory entry with outdated file reference\n\nThe directory entry: \\ProgramData\\McAfee\\Common Framework\\Task\\5.ini\n\n....\nFile entry:\n\tPath\t\t\t\t: \\ProgramData\\McAfee\\Common Framework\\Task\\5.ini\n\tFile reference\t\t\t: 51106-400\n\tName\t\t\t\t: 5.ini\n\tParent file reference\t\t: 65804-10\n\tSize\t\t\t\t: 723\n\tCreation time\t\t\t: Sep 16, 2011 20:47:54.561041200 UTC\n\tModification time\t\t: Apr 07, 2012 21:07:02.684060000 UTC\n\tAccess time\t\t\t: Apr 07, 2012 21:07:02.652810200 UTC\n\tEntry modification time\t\t: Apr 07, 2012 21:07:02.684060000 UTC\n\tFile attribute flags\t\t: 0x00002020\n\t\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n\t\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\n....\n\nThe corresponding MFT entry:\n\n....\nMFT entry: 51106 information:\n\tIs allocated\t\t\t: true\n\tFile reference\t\t\t: 51106-496\n\tBase record file reference\t: Not set (0)\n\tJournal sequence number\t\t: 0\n\tNumber of attributes\t\t: 3\n\nAttribute: 1\n\tType\t\t\t\t: $STANDARD_INFORMATION (0x00000010)\n\tCreation time\t\t\t: Sep 16, 2011 20:47:54.561041200 UTC\n\tModification time\t\t: Apr 07, 2012 21:07:02.684060000 UTC\n\tAccess time\t\t\t: Apr 07, 2012 21:07:02.652810200 UTC\n\tEntry modification time\t\t: Apr 07, 2012 21:07:02.684060000 UTC\n\tOwner identifier\t\t: 0\n\tSecurity descriptor identifier\t: 1368\n\tUpdate sequence number\t\t: 1947271600\n\tFile attribute flags\t\t: 0x00002020\n\t\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n\t\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\n\nAttribute: 2\n\tType\t\t\t\t: $FILE_NAME (0x00000030)\n\tParent file reference\t\t: 65804-10\n\tCreation time\t\t\t: Sep 16, 2011 20:47:54.561041200 UTC\n\tModification time\t\t: Apr 07, 2012 21:07:02.652810200 UTC\n\tAccess time\t\t\t: Apr 07, 2012 21:07:02.652810200 UTC\n\tEntry modification time\t\t: Apr 07, 2012 21:07:02.652810200 UTC\n\tFile attribute flags\t\t: 0x00002020\n\t\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n\t\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\n\tNamespace\t\t\t: DOS and Windows (3)\n\tName\t\t\t\t: 1.ini\n\nAttribute: 3\n\tType\t\t\t\t: $DATA (0x00000080)\n\tData size\t\t\t: 723 bytes\n\tData flags\t\t\t: 0x0000\n....\n\n[yellow-background]*TODO look into using $LogFile*\n\n=== LZNT1 compressed block with data size of 0\n\nNot sure if this is a corruption scenario or a data format edge case.\n\nA compression unit (index 30) consisting of the following data runs:\n\n....\nreading data run: 60.\ndata run:\n00000000: 11 01 01                                           ...\n\nvalue sizes                               : 1, 1\nnumber of cluster blocks                  : 1 (size: 4096)\ncluster block number                      : 687143 (1) (offset: 0xa7c27000)\n\nreading data run: 61.\ndata run:\n00000000: 01 0f                                              ..\n\nvalue sizes                               : 1, 0\nnumber of cluster blocks                  : 15 (size: 61440)\ncluster block number                      : 0 (0) (offset: 0x00000000)\n        Is sparse\n....\n\nContains the following data:\n\n....\na7c27000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n...\na7c27ff0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n....\n\nThis relates to an empty LZNT1 compressed block.\n\n....\ncompressed data offset                    : 0 (0x00000000)\ncompression chunk header                  : 0x0000\ncompressed chunk size                     : 1\nsignature value                           : 0\nis compressed flag                        : 0\n....\n\nIt was observed in 2 differnt NTFS implementations that the entire block is\nfilled with 0-byte values.\n\nTODO: verify behavior of Windows NTFS implementation.\n\n=== Truncated LZNT1 compressed block\n\nNot sure if this is a corruption scenario or a data format edge case.\n\nA compression unit (index 0) consisting of the following data runs:\n\n....\nreading data run: 0.\ndata run:\n00000000: 31 08 48 d8 01                                     1.H..\n\nvalue sizes                               : 1, 3\nnumber of cluster blocks                  : 8 (size: 32768)\ncluster block number                      : 120904 (120904) (offset: 0x1d848000)\n\nreading data run: 1.\ndata run:\n00000000: 01 08                                              ..\n\nvalue sizes                               : 1, 0\nnumber of cluster blocks                  : 8 (size: 32768)\ncluster block number                      : 0 (0) (offset: 0x00000000)\n        Is sparse\n....\n\nContains the following data:\n\n....\n1d848000  bd b7 50 44 46 50 00 01  00 01 00 40 e0 00 07 0b  |..PDFP.....@....|\n...\n1d84c000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n1d84fff0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n....\n\nThis relates to a LZNT1 compressed block that appears to be truncated at offset\n16384 (0x00004000).\n\n....\ncompressed data offset                    : 16384 (0x00004000)\ncompression flag byte                     : 0x00\n....\n\nDifferent behavior was observed in 2 differnt NTFS implementations:\n* one implementation fills the compressed block with the uncompressed data it could read and the rest with with 0-byte values\n* another implementation seems to provide the data that was already in its buffer\n\nTODO: verify behavior of Windows NTFS implementation.\n\n== Notes\n\nSignatures as indicated in `[RUSSON05]`:\n\n....\n        \"HOLE\" == ??? (NTFS 3.0+?)\n....\n\n=== NTFS reserved file names\n\n[cols=\"1,1,5\",options=\"header\"]\n|===\n| MFT entry index | Filename | Description\n| | \\$Extend\\$Config | Used for NTFS repair activity\n| | \\$Extend\\$Delete | Delete file name\n| | \\$Extend\\$Repair.log | Repair log name\n| | \\$Extend\\$Tops |\n| | \\$Extend\\$TxfLog | Transactional NTFS log\n|===\n\n=== File system flags\n\n....\nfsutil fsinfo volumeinfo C:\n....\n\n....\nFILE_CASE_PRESERVED_NAMES\n0x00000002\n\nThe specified volume supports preserved case of file names when it places a name on disk.\n\nFILE_CASE_SENSITIVE_SEARCH\n0x00000001\n\nThe specified volume supports case-sensitive file names.\n\nFILE_FILE_COMPRESSION\n0x00000010\n\nThe specified volume supports file-based compression.\n\nFILE_NAMED_STREAMS\n0x00040000\n\nThe specified volume supports named streams.\n\nFILE_PERSISTENT_ACLS\n0x00000008\n\nThe specified volume preserves and enforces access control lists (ACL). For example, the NTFS file system preserves and enforces ACLs, and the FAT file system does not.\n\nFILE_READ_ONLY_VOLUME\n0x00080000\n\nThe specified volume is read-only.\n\n    Windows 2000:  This value is not supported.\n\nFILE_SEQUENTIAL_WRITE_ONCE\n0x00100000\n\nThe specified volume supports a single sequential write.\n\n    Windows 2000:  This value is not supported.\n\nFILE_SUPPORTS_ENCRYPTION\n0x00020000\n\nThe specified volume supports the Encrypted File System (EFS). For more information, see File Encryption.\n\nFILE_SUPPORTS_EXTENDED_ATTRIBUTES\n0x00800000\n\nThe specified volume supports extended attributes. An extended attribute is a piece of application-specific metadata that an application can associate with a file and is not part of the file's data.\n\n    Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This value is not supported until Windows Server 2008 R2 and Windows 7.\n\nFILE_SUPPORTS_HARD_LINKS\n0x00400000\n\nThe specified volume supports hard links. For more information, see Hard Links and Junctions.\n\n    Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This value is not supported until Windows Server 2008 R2 and Windows 7.\n\nFILE_SUPPORTS_OBJECT_IDS\n0x00010000\n\nThe specified volume supports object identifiers.\n\nFILE_SUPPORTS_OPEN_BY_FILE_ID\n0x01000000\n\nThe file system supports open by FileID. For more information, see FILE_ID_BOTH_DIR_INFO.\n\n    Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This value is not supported until Windows Server 2008 R2 and Windows 7.\n\nFILE_SUPPORTS_REPARSE_POINTS\n0x00000080\n\nThe specified volume supports re-parse points.\n\nFILE_SUPPORTS_SPARSE_FILES\n0x00000040\n\nThe specified volume supports sparse files.\n\nFILE_SUPPORTS_TRANSACTIONS\n0x00200000\n\nThe specified volume supports transactions. For more information, see About KTM.\n\n    Windows 2000:  This value is not supported.\n\nFILE_SUPPORTS_USN_JOURNAL\n0x02000000\n\nThe specified volume supports update sequence number (USN) journals. For more information, see Change Journal Records.\n\n    Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This value is not supported until Windows Server 2008 R2 and Windows 7.\n\nFILE_UNICODE_ON_DISK\n0x00000004\n\nThe specified volume supports Unicode in file names as they appear on disk.\n\nFILE_VOLUME_IS_COMPRESSED\n0x00008000\n\nThe specified volume is a compressed volume, for example, a DoubleSpace volume.\n\nFILE_VOLUME_QUOTAS\n0x00000020\n\nThe specified volume supports disk quotas.\n....\n\n=== $MFT metadata file only parsing\n\nWhat file system metadata is missing:\n\n* Attribute lists are stored outside the $MFT\n* $I30 indexes are stored outside the $MFT\n* How to map MFT entry to parent? what if parent MFT entry has changed?\n\n:numbered!:\n[appendix]\n== References\n\n`[CARRIER05]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | File System Forensic Analysis\n| Author(s) | Brian Carrier\n| Date | 2005\n| ISBN-10 | 0-321-26817-2\n|===\n\n`[RUSSON05]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | NTFS Documentation\n| Author(s) | Richard Russon, Yuval Fiedel\n| Date | 2005\n| URL | https://flatcap.github.io/linux-ntfs/ntfs/\n|===\n\n`[APPLE06]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | ntfs_layout.h - NTFS associated on-disk structures\n| URL | https://opensource.apple.com/source/ntfs/ntfs-65.2/kext/ntfs_layout.h.auto.html\n|===\n\n`[RUSSNOVICH09]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | Windows Internals 5 - Covering Windows Server 2008 and Windows Vista\n| Author(s) | Mark E. Russinovich and David A. Solomon\n| Date | June 17, 2009\n| ISBN-13 | 978-0735625303\n|===\n\n`[LIBBDE]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | BitLocker Drive Encryption (BDE) format specification - Analysis of theBitLocker Drive Encryption (BDE) volume format\n| Date | March 2011\n| Author(s) | Joachim Metz\n| URL | https://github.com/libyal/libbde/blob/main/documentation/BitLocker%20Drive%20Encryption%20(BDE)%20format.asciidoc\n|===\n\n`[LIBFSCLFS]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | Common Log File System – Analysis of the Windows ARIES log system\n| Date | November 2010\n| Author(s) | Joachim Metz\n| URL | https://github.com/libyal/libfsclfs/blob/main/documenation/Common%20Log%20File%20System%20(CLFS).asciidoc\n|===\n\n`[LIBVSHADOW]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | Volume Shadow Snapshot (VSS) - Analysis the Windows NT VSS format\n| Date | March 2011\n| Author(s) | Joachim Metz\n| URL | https://github.com/libyal/libvshadow/blob/master/documentation/Volume%20Shadow%20Snapshot%20(VSS)%20format.asciidoc\n|===\n\n`[MSDN]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | How NTFS Works\n| URL | https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc781134(v=ws.10)\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | Master File Table\n| URL | https://learn.microsoft.com/en-us/windows/win32/devnotes/master-file-table\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | WIN32_FIND_DATAA structure (minwinbase.h)\n| URL | https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataa\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | Reparse point\n| URL | http://msdn.microsoft.com/en-us/library/aa365511%28v=VS.85%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/dd541667%28PROT.13%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/cc232005%28v=PROT.13%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/cc232006%28v=PROT.13%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/cc232007%28v=PROT.13%29.aspx\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | Update (or change) journal\n| URL | http://msdn.microsoft.com/en-us/library/aa363798.aspx +\nhttp://msdn.microsoft.com/en-us/library/aa363803%28VS.85%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/aa365722%28VS.85%29.aspx\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | Known Alternate Stream Names\n| URL | https://msdn.microsoft.com/en-us/library/dn365326.aspx\n|===\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Subject | transactional NTFS\n| URL | http://msdn.microsoft.com/en-us/library/bb968806%28v=VS.85%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/bb986748%28VS.85%29.aspx +\nhttp://msdn.microsoft.com/en-us/library/bb540368%28VS.85%29.aspx\n|===\n\n`[WIKI]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| URL | http://en.wikipedia.org/wiki/NTFS +\nhttp://en.wikipedia.org/wiki/BIOS_parameter_block +\nhttp://en.wikipedia.org/wiki/Transactional_NTFS\n|===\n\n`[WIN32PROG]`\n\n[cols=\"1,5\",options=\"header\"]\n|===\n| Title | The Win32 Programming Tutorials For Fun – Appendix E. NTFS On-Disk Structure\n| URL | http://www.installsetupconfig.com/win32programming/1996%20AppE_apnilife.pdf\n|===\n\n[appendix]\n== GNU Free Documentation License\n\nVersion 1.3, 3 November 2008\nCopyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.\n<http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n=== 0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other functional\nand useful document \"free\" in the sense of freedom: to assure everyone the\neffective freedom to copy and redistribute it, with or without modifying it,\neither commercially or noncommercially. Secondarily, this License preserves for\nthe author and publisher a way to get credit for their work, while not being\nconsidered responsible for modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative works of the\ndocument must themselves be free in the same sense. It complements the GNU\nGeneral Public License, which is a copyleft license designed for free software.\n\nWe have designed this License in order to use it for manuals for free software,\nbecause free software needs free documentation: a free program should come with\nmanuals providing the same freedoms that the software does. But this License is\nnot limited to software manuals; it can be used for any textual work,\nregardless of subject matter or whether it is published as a printed book. We\nrecommend this License principally for works whose purpose is instruction or\nreference.\n\n=== 1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium, that contains\na notice placed by the copyright holder saying it can be distributed under the\nterms of this License. Such a notice grants a world-wide, royalty-free license,\nunlimited in duration, to use that work under the conditions stated herein. The\n\"Document\", below, refers to any such manual or work. Any member of the public\nis a licensee, and is addressed as \"you\". You accept the license if you copy,\nmodify or distribute the work in a way requiring permission under copyright law.\n\nA \"Modified Version\" of the Document means any work containing the Document or\na portion of it, either copied verbatim, or with modifications and/or\ntranslated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section of the\nDocument that deals exclusively with the relationship of the publishers or\nauthors of the Document to the Document's overall subject (or to related\nmatters) and contains nothing that could fall directly within that overall\nsubject. (Thus, if the Document is in part a textbook of mathematics, a\nSecondary Section may not explain any mathematics.) The relationship could be a\nmatter of historical connection with the subject or with related matters, or of\nlegal, commercial, philosophical, ethical or political position regarding them.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose titles are\ndesignated, as being those of Invariant Sections, in the notice that says that\nthe Document is released under this License. If a section does not fit the\nabove definition of Secondary then it is not allowed to be designated as\nInvariant. The Document may contain zero Invariant Sections. If the Document\ndoes not identify any Invariant Sections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are listed, as\nFront-Cover Texts or Back-Cover Texts, in the notice that says that the\nDocument is released under this License. A Front-Cover Text may be at most 5\nwords, and a Back-Cover Text may be at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy, represented\nin a format whose specification is available to the general public, that is\nsuitable for revising the document straightforwardly with generic text editors\nor (for images composed of pixels) generic paint programs or (for drawings)\nsome widely available drawing editor, and that is suitable for input to text\nformatters or for automatic translation to a variety of formats suitable for\ninput to text formatters. A copy made in an otherwise Transparent file format\nwhose markup, or absence of markup, has been arranged to thwart or discourage\nsubsequent modification by readers is not Transparent. An image format is not\nTransparent if used for any substantial amount of text. A copy that is not\n\"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain ASCII without\nmarkup, Texinfo input format, LaTeX input format, SGML or XML using a publicly\navailable DTD, and standard-conforming simple HTML, PostScript or PDF designed\nfor human modification. Examples of transparent image formats include PNG, XCF\nand JPG. Opaque formats include proprietary formats that can be read and edited\nonly by proprietary word processors, SGML or XML for which the DTD and/or\nprocessing tools are not generally available, and the machine-generated HTML,\nPostScript or PDF produced by some word processors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself, plus such\nfollowing pages as are needed to hold, legibly, the material this License\nrequires to appear in the title page. For works in formats which do not have\nany title page as such, \"Title Page\" means the text near the most prominent\nappearance of the work's title, preceding the beginning of the body of the text.\n\nThe \"publisher\" means any person or entity that distributes copies of the\nDocument to the public.\n\nA section \"Entitled XYZ\" means a named subunit of the Document whose title\neither is precisely XYZ or contains XYZ in parentheses following text that\ntranslates XYZ in another language. (Here XYZ stands for a specific section\nname mentioned below, such as \"Acknowledgements\", \"Dedications\",\n\"Endorsements\", or \"History\".) To \"Preserve the Title\" of such a section when\nyou modify the Document means that it remains a section \"Entitled XYZ\"\naccording to this definition.\n\nThe Document may include Warranty Disclaimers next to the notice which states\nthat this License applies to the Document. These Warranty Disclaimers are\nconsidered to be included by reference in this License, but only as regards\ndisclaiming warranties: any other implication that these Warranty Disclaimers\nmay have is void and has no effect on the meaning of this License.\n\n=== 2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either commercially or\nnoncommercially, provided that this License, the copyright notices, and the\nlicense notice saying this License applies to the Document are reproduced in\nall copies, and that you add no other conditions whatsoever to those of this\nLicense. You may not use technical measures to obstruct or control the reading\nor further copying of the copies you make or distribute. However, you may\naccept compensation in exchange for copies. If you distribute a large enough\nnumber of copies you must also follow the conditions in section 3.\n\nYou may also lend copies, under the same conditions stated above, and you may\npublicly display copies.\n\n=== 3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly have printed\ncovers) of the Document, numbering more than 100, and the Document's license\nnotice requires Cover Texts, you must enclose the copies in covers that carry,\nclearly and legibly, all these Cover Texts: Front-Cover Texts on the front\ncover, and Back-Cover Texts on the back cover. Both covers must also clearly\nand legibly identify you as the publisher of these copies. The front cover must\npresent the full title with all words of the title equally prominent and\nvisible. You may add other material on the covers in addition. Copying with\nchanges limited to the covers, as long as they preserve the title of the\nDocument and satisfy these conditions, can be treated as verbatim copying in\nother respects.\n\nIf the required texts for either cover are too voluminous to fit legibly, you\nshould put the first ones listed (as many as fit reasonably) on the actual\ncover, and continue the rest onto adjacent pages.\n\nIf you publish or distribute Opaque copies of the Document numbering more than\n100, you must either include a machine-readable Transparent copy along with\neach Opaque copy, or state in or with each Opaque copy a computer-network\nlocation from which the general network-using public has access to download\nusing public-standard network protocols a complete Transparent copy of the\nDocument, free of added material. If you use the latter option, you must take\nreasonably prudent steps, when you begin distribution of Opaque copies in\nquantity, to ensure that this Transparent copy will remain thus accessible at\nthe stated location until at least one year after the last time you distribute\nan Opaque copy (directly or through your agents or retailers) of that edition\nto the public.\n\nIt is requested, but not required, that you contact the authors of the Document\nwell before redistributing any large number of copies, to give them a chance to\nprovide you with an updated version of the Document.\n\n=== 4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document under the\nconditions of sections 2 and 3 above, provided that you release the Modified\nVersion under precisely this License, with the Modified Version filling the\nrole of the Document, thus licensing distribution and modification of the\nModified Version to whoever possesses a copy of it. In addition, you must do\nthese things in the Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title distinct from that\nof the Document, and from those of previous versions (which should, if there\nwere any, be listed in the History section of the Document). You may use the\nsame title as a previous version if the original publisher of that version\ngives permission.\n\nB. List on the Title Page, as authors, one or more persons or entities\nresponsible for authorship of the modifications in the Modified Version,\ntogether with at least five of the principal authors of the Document (all of\nits principal authors, if it has fewer than five), unless they release you from\nthis requirement.\n\nC. State on the Title page the name of the publisher of the Modified Version,\nas the publisher.\n\nD. Preserve all the copyright notices of the Document.\n\nE. Add an appropriate copyright notice for your modifications adjacent to the\nother copyright notices.\n\nF. Include, immediately after the copyright notices, a license notice giving\nthe public permission to use the Modified Version under the terms of this\nLicense, in the form shown in the Addendum below.\n\nG. Preserve in that license notice the full lists of Invariant Sections and\nrequired Cover Texts given in the Document's license notice.\n\nH. Include an unaltered copy of this License.\n\nI. Preserve the section Entitled \"History\", Preserve its Title, and add to it\nan item stating at least the title, year, new authors, and publisher of the\nModified Version as given on the Title Page. If there is no section Entitled\n\"History\" in the Document, create one stating the title, year, authors, and\npublisher of the Document as given on its Title Page, then add an item\ndescribing the Modified Version as stated in the previous sentence.\n\nJ. Preserve the network location, if any, given in the Document for public\naccess to a Transparent copy of the Document, and likewise the network\nlocations given in the Document for previous versions it was based on. These\nmay be placed in the \"History\" section. You may omit a network location for a\nwork that was published at least four years before the Document itself, or if\nthe original publisher of the version it refers to gives permission.\n\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\", Preserve the\nTitle of the section, and preserve in the section all the substance and tone of\neach of the contributor acknowledgements and/or dedications given therein.\n\nL. Preserve all the Invariant Sections of the Document, unaltered in their text\nand in their titles. Section numbers or the equivalent are not considered part\nof the section titles.\n\nM. Delete any section Entitled \"Endorsements\". Such a section may not be\nincluded in the Modified Version.\n\nN. Do not retitle any existing section to be Entitled \"Endorsements\" or to\nconflict in title with any Invariant Section.\n\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or appendices that\nqualify as Secondary Sections and contain no material copied from the Document,\nyou may at your option designate some or all of these sections as invariant. To\ndo this, add their titles to the list of Invariant Sections in the Modified\nVersion's license notice. These titles must be distinct from any other section\ntitles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains nothing but\nendorsements of your Modified Version by various parties—for example,\nstatements of peer review or that the text has been approved by an organization\nas the authoritative definition of a standard.\n\nYou may add a passage of up to five words as a Front-Cover Text, and a passage\nof up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts\nin the Modified Version. Only one passage of Front-Cover Text and one of\nBack-Cover Text may be added by (or through arrangements made by) any one\nentity. If the Document already includes a cover text for the same cover,\npreviously added by you or by arrangement made by the same entity you are\nacting on behalf of, you may not add another; but you may replace the old one,\non explicit permission from the previous publisher that added the old one.\n\nThe author(s) and publisher(s) of the Document do not by this License give\npermission to use their names for publicity for or to assert or imply\nendorsement of any Modified Version.\n\n=== 5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under this License,\nunder the terms defined in section 4 above for modified versions, provided that\nyou include in the combination all of the Invariant Sections of all of the\noriginal documents, unmodified, and list them all as Invariant Sections of your\ncombined work in its license notice, and that you preserve all their Warranty\nDisclaimers.\n\nThe combined work need only contain one copy of this License, and multiple\nidentical Invariant Sections may be replaced with a single copy. If there are\nmultiple Invariant Sections with the same name but different contents, make the\ntitle of each such section unique by adding at the end of it, in parentheses,\nthe name of the original author or publisher of that section if known, or else\na unique number. Make the same adjustment to the section titles in the list of\nInvariant Sections in the license notice of the combined work.\n\nIn the combination, you must combine any sections Entitled \"History\" in the\nvarious original documents, forming one section Entitled \"History\"; likewise\ncombine any sections Entitled \"Acknowledgements\", and any sections Entitled\n\"Dedications\". You must delete all sections Entitled \"Endorsements\".\n\n=== 6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other documents\nreleased under this License, and replace the individual copies of this License\nin the various documents with a single copy that is included in the collection,\nprovided that you follow the rules of this License for verbatim copying of each\nof the documents in all other respects.\n\nYou may extract a single document from such a collection, and distribute it\nindividually under this License, provided you insert a copy of this License\ninto the extracted document, and follow this License in all other respects\nregarding verbatim copying of that document.\n\n=== 7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other separate and\nindependent documents or works, in or on a volume of a storage or distribution\nmedium, is called an \"aggregate\" if the copyright resulting from the\ncompilation is not used to limit the legal rights of the compilation's users\nbeyond what the individual works permit. When the Document is included in an\naggregate, this License does not apply to the other works in the aggregate\nwhich are not themselves derivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these copies of the\nDocument, then if the Document is less than one half of the entire aggregate,\nthe Document's Cover Texts may be placed on covers that bracket the Document\nwithin the aggregate, or the electronic equivalent of covers if the Document is\nin electronic form. Otherwise they must appear on printed covers that bracket\nthe whole aggregate.\n\n=== 8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may distribute\ntranslations of the Document under the terms of section 4. Replacing Invariant\nSections with translations requires special permission from their copyright\nholders, but you may include translations of some or all Invariant Sections in\naddition to the original versions of these Invariant Sections. You may include\na translation of this License, and all the license notices in the Document, and\nany Warranty Disclaimers, provided that you also include the original English\nversion of this License and the original versions of those notices and\ndisclaimers. In case of a disagreement between the translation and the original\nversion of this License or a notice or disclaimer, the original version will\nprevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\", \"Dedications\", or\n\"History\", the requirement (section 4) to Preserve its Title (section 1) will\ntypically require changing the actual title.\n\n=== 9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document except as\nexpressly provided under this License. Any attempt otherwise to copy, modify,\nsublicense, or distribute it is void, and will automatically terminate your\nrights under this License.\n\nHowever, if you cease all violation of this License, then your license from a\nparticular copyright holder is reinstated (a) provisionally, unless and until\nthe copyright holder explicitly and finally terminates your license, and (b)\npermanently, if the copyright holder fails to notify you of the violation by\nsome reasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is reinstated\npermanently if the copyright holder notifies you of the violation by some\nreasonable means, this is the first time you have received notice of violation\nof this License (for any work) from that copyright holder, and you cure the\nviolation prior to 30 days after your receipt of the notice.\n\nTermination of your rights under this section does not terminate the licenses\nof parties who have received copies or rights from you under this License. If\nyour rights have been terminated and not permanently reinstated, receipt of a\ncopy of some or all of the same material does not give you any rights to use it.\n\n=== 10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions of the GNU Free\nDocumentation License from time to time. Such new versions will be similar in\nspirit to the present version, but may differ in detail to address new problems\nor concerns. See http://www.gnu.org/copyleft/.\n\nEach version of the License is given a distinguishing version number. If the\nDocument specifies that a particular numbered version of this License \"or any\nlater version\" applies to it, you have the option of following the terms and\nconditions either of that specified version or of any later version that has\nbeen published (not as a draft) by the Free Software Foundation. If the\nDocument does not specify a version number of this License, you may choose any\nversion ever published (not as a draft) by the Free Software Foundation. If the\nDocument specifies that a proxy can decide which future versions of this\nLicense can be used, that proxy's public statement of acceptance of a version\npermanently authorizes you to choose that version for the Document.\n\n=== 11. RELICENSING\n\n\"Massive Multiauthor Collaboration Site\" (or \"MMC Site\") means any World Wide\nWeb server that publishes copyrightable works and also provides prominent\nfacilities for anybody to edit those works. A public wiki that anybody can edit\nis an example of such a server. A \"Massive Multiauthor Collaboration\" (or\n\"MMC\") contained in the site means any set of copyrightable works thus\npublished on the MMC site.\n\n\"CC-BY-SA\" means the Creative Commons Attribution-Share Alike 3.0 license\npublished by Creative Commons Corporation, a not-for-profit corporation with a\nprincipal place of business in San Francisco, California, as well as future\ncopyleft versions of that license published by that same organization.\n\n\"Incorporate\" means to publish or republish a Document, in whole or in part, as\npart of another Document.\n\nAn MMC is \"eligible for relicensing\" if it is licensed under this License, and\nif all works that were first published under this License somewhere other than\nthis MMC, and subsequently incorporated in whole or in part into the MMC, (1)\nhad no cover texts or invariant sections, and (2) were thus incorporated prior\nto November 1, 2008.\n\nThe operator of an MMC Site may republish an MMC contained in the site under\nCC-BY-SA on the same site at any time before August 1, 2009, provided the MMC\nis eligible for relicensing.\n\n"
  },
  {
    "path": "dpkg/changelog.in",
    "content": "libfsntfs (@VERSION@-1) unstable; urgency=low\n\n  * Auto-generated\n\n -- Joachim Metz <joachim.metz@gmail.com>  @DPKG_DATE@\n"
  },
  {
    "path": "dpkg/compat",
    "content": "10\n"
  },
  {
    "path": "dpkg/control",
    "content": "Source: libfsntfs\nPriority: extra\nMaintainer: Joachim Metz <joachim.metz@gmail.com>\nBuild-Depends: debhelper (>= 9), dh-autoreconf, dh-python, pkg-config, libssl-dev, python3-dev, python3-setuptools, libfuse-dev\nStandards-Version: 4.1.4\nSection: libs\nHomepage: https://github.com/libyal/libfsntfs\nVcs-Git: https://github.com/libyal/libfsntfs.git\n\nPackage: libfsntfs\nArchitecture: any\nDepends: ${shlibs:Depends}, ${misc:Depends}\nConflicts: libfsntfs1\nReplaces: libfsntfs1\nSuggests: libfsntfs-dbg\nDescription: Library to access the New Technology File System (NTFS) format\n libfsntfs is a library to access the New Technology File System (NTFS) format.\n\nPackage: libfsntfs-dbg\nArchitecture: any\nSection: debug\nDepends: libfsntfs (= ${binary:Version}), ${misc:Depends}\nDescription: Debugging symbols for libfsntfs\n Debugging symbols for libfsntfs.\n\nPackage: libfsntfs-dev\nSection: libdevel\nArchitecture: any\nDepends: libfsntfs (= ${binary:Version}), ${misc:Depends}\nDescription: Header files and libraries for developing applications for libfsntfs\n Header files and libraries for developing applications for libfsntfs.\n\nPackage: libfsntfs-tools\nSection: utils\nArchitecture: any\nDepends: libfsntfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}\nConflicts: libfsntfs-utils\nReplaces: libfsntfs-utils\nDescription: Several tools for reading New Technology File System (NTFS) volumes\n Several tools for reading New Technology File System (NTFS) volumes.\n\nPackage: libfsntfs-tools-dbg\nSection: debug\nArchitecture: any\nDepends: libfsntfs-tools (= ${binary:Version}), ${misc:Depends}\nDescription: Debugging symbols for libfsntfs-tools\n Debugging symbols for libfsntfs-tools.\n\nPackage: libfsntfs-python3\nSection: python\nArchitecture: any\nDepends: libfsntfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}\nConflicts: python3-libfsntfs\nReplaces: python3-libfsntfs\nSuggests: libfsntfs-python3-dbg\nDescription: Python 3 bindings for libfsntfs\n Python 3 bindings for libfsntfs.\n\nPackage: libfsntfs-python3-dbg\nSection: debug\nArchitecture: any\nDepends: libfsntfs-python3 (= ${binary:Version}), ${misc:Depends}\nDescription: Debugging symbols for libfsntfs-python3\n Debugging symbols for libfsntfs-python3.\n\n"
  },
  {
    "path": "dpkg/copyright",
    "content": "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\nUpstream-Name: libfsntfs\nSource: https://github.com/libyal/libfsntfs\n\nFiles: *\nCopyright: 2010-2026, Joachim Metz <joachim.metz@gmail.com>\nLicense: LGPL-3.0+\n\nLicense: LGPL-3.0+\n This package is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 3 of the License, or (at your option) any later version.\n .\n This package is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n Lesser General Public License for more details.\n .\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n .\n On Debian systems, the complete text of the GNU Lesser General\n Public License can be found in \"/usr/share/common-licenses/LGPL-3\".\n\n"
  },
  {
    "path": "dpkg/libfsntfs-dev.install",
    "content": "usr/include/*\nusr/lib/*-*/lib*.a\nusr/lib/*-*/lib*.so\nusr/lib/*-*/pkgconfig/*\nusr/share/man/man3\n"
  },
  {
    "path": "dpkg/libfsntfs-python3.install",
    "content": "/usr/lib/python3*\n"
  },
  {
    "path": "dpkg/libfsntfs-tools.install",
    "content": "usr/bin\nusr/share/man/man1\n"
  },
  {
    "path": "dpkg/libfsntfs.install",
    "content": "usr/lib/*-*/lib*.so.*\n"
  },
  {
    "path": "dpkg/rules",
    "content": "#!/usr/bin/make -f\n# -*- makefile -*-\n\n# Uncomment for debhelper verbose output.\n# export DH_VERBOSE=1\n\nexport SKIP_PYTHON_TESTS=1\n\n%:\n\tdh $@ --buildsystem=autoconf --with=autoreconf,python3\n\n.PHONY: override_dh_auto_configure\noverride_dh_auto_configure:\n\tdh_auto_configure -- --enable-python CFLAGS=\"-g\"\n\n.PHONY: override_dh_install\noverride_dh_install:\n\tdh_install --fail-missing -X.la -X/pyfsntfs.a\n\n.PHONY: override_dh_missing\noverride_dh_missing:\n\tdh_missing -X.la -X/pyfsntfs.a --fail-missing\n\n.PHONY: override_dh_strip\noverride_dh_strip:\nifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))\n\tdh_strip -plibfsntfs --dbg-package=libfsntfs-dbg\n\tdh_strip -plibfsntfs-tools --dbg-package=libfsntfs-tools-dbg\n\tdh_strip -plibfsntfs-python3 --dbg-package=libfsntfs-python3-dbg\nendif\n\n"
  },
  {
    "path": "dpkg/source/format",
    "content": "3.0 (quilt)\n"
  },
  {
    "path": "fsntfstools/Makefile.am",
    "content": "AM_CPPFLAGS = \\\n\t-I../include -I$(top_srcdir)/include \\\n\t-I../common -I$(top_srcdir)/common \\\n\t@LIBCERROR_CPPFLAGS@ \\\n\t@LIBCDATA_CPPFLAGS@ \\\n\t@LIBCLOCALE_CPPFLAGS@ \\\n\t@LIBCNOTIFY_CPPFLAGS@ \\\n\t@LIBCSPLIT_CPPFLAGS@ \\\n\t@LIBUNA_CPPFLAGS@ \\\n\t@LIBCFILE_CPPFLAGS@ \\\n\t@LIBCPATH_CPPFLAGS@ \\\n\t@LIBBFIO_CPPFLAGS@ \\\n\t@LIBFCACHE_CPPFLAGS@ \\\n\t@LIBFDATA_CPPFLAGS@ \\\n\t@LIBFDATETIME_CPPFLAGS@ \\\n\t@LIBFGUID_CPPFLAGS@ \\\n\t@LIBFUSN_CPPFLAGS@ \\\n\t@LIBFWNT_CPPFLAGS@ \\\n\t@LIBHMAC_CPPFLAGS@ \\\n\t@LIBCRYPTO_CPPFLAGS@ \\\n\t@LIBFUSE_CPPFLAGS@ \\\n\t@PTHREAD_CPPFLAGS@ \\\n\t@LIBFSNTFS_DLL_IMPORT@\n\nAM_LDFLAGS = @STATIC_LDFLAGS@\n\nbin_PROGRAMS = \\\n\tfsntfsinfo \\\n\tfsntfsmount\n\nfsntfsinfo_SOURCES = \\\n\tbodyfile.c bodyfile.h \\\n\tdigest_hash.c digest_hash.h \\\n\tfsntfsinfo.c \\\n\tfsntfstools_getopt.c fsntfstools_getopt.h \\\n\tfsntfstools_i18n.h \\\n\tfsntfstools_libbfio.h \\\n\tfsntfstools_libcerror.h \\\n\tfsntfstools_libclocale.h \\\n\tfsntfstools_libcnotify.h \\\n\tfsntfstools_libfcache.h \\\n\tfsntfstools_libfdata.h \\\n\tfsntfstools_libfdatetime.h \\\n\tfsntfstools_libfguid.h \\\n\tfsntfstools_libfsntfs.h \\\n\tfsntfstools_libfusn.h \\\n\tfsntfstools_libfwnt.h \\\n\tfsntfstools_libhmac.h \\\n\tfsntfstools_libuna.h \\\n\tfsntfstools_output.c fsntfstools_output.h \\\n\tfsntfstools_signal.c fsntfstools_signal.h \\\n\tfsntfstools_unused.h \\\n\tinfo_handle.c info_handle.h \\\n\tpath_string.c path_string.h\n\nfsntfsinfo_LDADD = \\\n\t@LIBHMAC_LIBADD@ \\\n\t@LIBCRYPTO_LIBADD@ \\\n\t@LIBDL_LIBADD@ \\\n\t@LIBFWNT_LIBADD@ \\\n\t@LIBFUSN_LIBADD@ \\\n\t@LIBFGUID_LIBADD@ \\\n\t@LIBFDATETIME_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBINTL@\n\nfsntfsmount_SOURCES = \\\n\tfsntfsmount.c \\\n\tfsntfstools_getopt.c fsntfstools_getopt.h \\\n\tfsntfstools_i18n.h \\\n\tfsntfstools_libbfio.h \\\n\tfsntfstools_libcerror.h \\\n\tfsntfstools_libclocale.h \\\n\tfsntfstools_libcnotify.h \\\n\tfsntfstools_libcpath.h \\\n\tfsntfstools_libfsntfs.h \\\n\tfsntfstools_libuna.h \\\n\tfsntfstools_output.c fsntfstools_output.h \\\n\tfsntfstools_signal.c fsntfstools_signal.h \\\n\tfsntfstools_unused.h \\\n\tmount_dokan.c mount_dokan.h \\\n\tmount_file_entry.c mount_file_entry.h \\\n\tmount_file_system.c mount_file_system.h \\\n\tmount_fuse.c mount_fuse.h \\\n\tmount_handle.c mount_handle.h \\\n\tmount_path_string.c mount_path_string.h\n\nfsntfsmount_LDADD = \\\n\t@LIBFUSE_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBINTL@\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in\n\nsplint-local:\n\t@echo \"Running splint on fsntfsinfo ...\"\n\t-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(fsntfsinfo_SOURCES)\n\n"
  },
  {
    "path": "fsntfstools/bodyfile.c",
    "content": "/*\n * Bodyfile functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"bodyfile.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libuna.h\"\n\n/* Copies the path from a comparable file entry path\n * Returns 1 if successful or -1 on error\n */\nint bodyfile_path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *safe_path                = NULL;\n\tstatic char *function                        = \"bodyfile_path_string_copy_from_file_entry_path\";\n\tlibuna_unicode_character_t unicode_character = 0;\n\tsystem_character_t escape_character          = 0;\n\tsize_t file_entry_path_index                 = 0;\n\tsize_t path_index                            = 0;\n\tsize_t safe_path_size                        = 0;\n\tint print_count                              = 0;\n\tint result                                   = 0;\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( file_entry_path_length == 0 )\n\t || ( file_entry_path_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry path length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Note that there is a worst-case of a 1 to 10 ratio for each escaped character.\n\t */\n\tif( file_entry_path_length > (size_t) ( ( SSIZE_MAX - 1 ) / ( sizeof( system_character_t ) * 10 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid value string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_path_size = ( file_entry_path_length * 10 ) + 1;\n\n\tsafe_path = system_string_allocate(\n\t             safe_path_size );\n\n\tif( safe_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tescape_character = (system_character_t) '\\\\';\n\n\t/* Using UCS-2 or RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\twhile( file_entry_path_index < file_entry_path_length )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_from_ucs2(\n\t\t          &unicode_character,\n\t\t          (libuna_utf16_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_from_utf8_rfc2279(\n\t\t          &unicode_character,\n\t\t          (libuna_utf8_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character from value string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t/* Replace by \\x##:\n\t\t *   Control characters ([U+0-U+1f, U+7f-U+9f])\n\t\t */\n\t\tif( ( unicode_character <= 0x1f )\n\t\t || ( ( unicode_character >= 0x7f )\n\t\t  &&  ( unicode_character <= 0x9f ) ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"x%02\" PRIx32 \"\" ),\n\t\t\t               escape_character,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace by \\U########:\n\t\t *   Unicode surrogate characters ([U+d800-U+dfff])\n\t\t *   Undefined Unicode characters ([\n\t\t *       U+fdd0-U+fddf, U+fffe-U+ffff, U+1fffe-U+1ffff, U+2fffe-U+2ffff,\n\t\t *       U+3fffe-U+3ffff, U+4fffe-U+4ffff, U+5fffe-U+5ffff, U+6fffe-U+6ffff,\n\t\t *       U+7fffe-U+7ffff, U+8fffe-U+8ffff, U+9fffe-U+9ffff, U+afffe-U+affff,\n\t\t *       U+bfffe-U+bffff, U+cfffe-U+cffff, U+dfffe-U+dffff, U+efffe-U+effff,\n\t\t *       U+ffffe-U+fffff, U+10fffe-U+ffffffff])\n\t\t *   Observed unprintable characters ([\n\t\t *       U+2028, U+2029, U+e000, U+f8ff, U+f0000, U+ffffd, U+100000, U+10fffd])\n\t\t */\n\t\telse if( ( ( unicode_character >= 0x00002028UL )\n\t\t       &&  ( unicode_character <= 0x00002029UL ) )\n\t\t      || ( ( unicode_character >= 0x0000d800UL )\n\t\t       &&  ( unicode_character <= 0x0000dfffUL ) )\n\t\t      || ( unicode_character == 0x0000e000UL )\n\t\t      || ( unicode_character == 0x0000f8ffUL )\n\t\t      || ( ( unicode_character >= 0x0000fdd0UL )\n\t\t       &&  ( unicode_character <= 0x0000fddfUL ) )\n\t\t      || ( ( ( unicode_character & 0x0000ffffUL ) >= 0x0000fffeUL )\n\t\t       &&  ( ( unicode_character & 0x0000ffffUL ) <= 0x0000ffffUL ) )\n\t\t      || ( unicode_character == 0x000f0000UL )\n\t\t      || ( unicode_character == 0x000ffffdUL )\n\t\t      || ( unicode_character == 0x00100000UL )\n\t\t      || ( unicode_character >= 0x0010fffdUL ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"U%08\" PRIx32 \"\" ),\n\t\t\t               escape_character,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace:\n\t\t *   Escape character (\\) by \\\\\n\t\t *   Bodyfile value seperator (|) by \\|\n\t\t */\n                else if( ( unicode_character == (libuna_unicode_character_t) escape_character )\n                      || ( unicode_character == '|' ) )\n\t\t{\n\t\t\tif( ( path_index + 2 ) > safe_path_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tsafe_path[ path_index++ ] = escape_character;\n\t\t\tsafe_path[ path_index++ ] = (system_character_t) unicode_character;\n\t\t}\n\t\telse\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_unicode_character_copy_to_utf16(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf16_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_unicode_character_copy_to_utf8(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf8_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tsafe_path[ path_index ] = 0;\n\n\t*path      = safe_path;\n\t*path_size = safe_path_size;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_path );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/bodyfile.h",
    "content": "/*\n * Bodyfile functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _BODYFILE_H )\n#define _BODYFILE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint bodyfile_path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _BODYFILE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/digest_hash.c",
    "content": "/*\n * Crypographic digest hash\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"digest_hash.h\"\n#include \"fsntfstools_libcerror.h\"\n\n/* Converts the digest hash to a printable string\n * Returns 1 if successful or -1 on error\n */\nint digest_hash_copy_to_string(\n     const uint8_t *digest_hash,\n     size_t digest_hash_size,\n     char *string,\n     size_t string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function       = \"digest_hash_copy_to_string\";\n\tsize_t string_iterator      = 0;\n\tsize_t digest_hash_iterator = 0;\n\tuint8_t digest_digit        = 0;\n\n\tif( digest_hash == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid digest hash.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( digest_hash_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid digest hash size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* The string requires space for 2 characters per digest hash digit and a end of string\n\t */\n\tif( string_size < ( ( 2 * digest_hash_size ) + 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: string too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( digest_hash_iterator = 0;\n\t     digest_hash_iterator < digest_hash_size;\n\t     digest_hash_iterator++ )\n\t{\n\t\tdigest_digit = digest_hash[ digest_hash_iterator ] / 16;\n\n\t\tif( digest_digit <= 9 )\n\t\t{\n\t\t\tstring[ string_iterator++ ] = (char) ( (uint8_t) '0' + digest_digit );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring[ string_iterator++ ] = (char) ( (uint8_t) 'a' + ( digest_digit - 10 ) );\n\t\t}\n\t\tdigest_digit = digest_hash[ digest_hash_iterator ] % 16;\n\n\t\tif( digest_digit <= 9 )\n\t\t{\n\t\t\tstring[ string_iterator++ ] = (char) ( (uint8_t) '0' + digest_digit );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring[ string_iterator++ ] = (char) ( (uint8_t) 'a' + ( digest_digit - 10 ) );\n\t\t}\n\t}\n\tstring[ string_iterator ] = 0;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/digest_hash.h",
    "content": "/*\n * Crypographic digest hash\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _DIGEST_HASH_H )\n#define _DIGEST_HASH_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint digest_hash_copy_to_string(\n     const uint8_t *digest_hash,\n     size_t digest_hash_size,\n     char *string,\n     size_t string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _DIGEST_HASH_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfsinfo.c",
    "content": "/*\n * Shows information obtained from a New Technology File System (NTFS) volume.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include <stdio.h>\n\n#if defined( HAVE_IO_H ) || defined( WINAPI )\n#include <io.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_UNISTD_H )\n#include <unistd.h>\n#endif\n\n#include \"fsntfstools_getopt.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libclocale.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_output.h\"\n#include \"fsntfstools_signal.h\"\n#include \"fsntfstools_unused.h\"\n#include \"info_handle.h\"\n\nenum FSNTFSINFO_MODES\n{\n\tFSNTFSINFO_MODE_FILE_ENTRY,\n\tFSNTFSINFO_MODE_FILE_SYSTEM_HIERARCHY,\n\tFSNTFSINFO_MODE_MFT_ENTRY,\n\tFSNTFSINFO_MODE_USN_CHANGE_JOURNAL,\n\tFSNTFSINFO_MODE_VOLUME\n};\n\ninfo_handle_t *fsntfsinfo_info_handle = NULL;\nint fsntfsinfo_abort                  = 0;\n\n/* Prints usage information\n */\nvoid usage_fprint(\n      FILE *stream )\n{\n\tif( stream == NULL )\n\t{\n\t\treturn;\n\t}\n\tfprintf( stream, \"Use fsntfsinfo to determine information about a New\\n\"\n\t                 \" Technology File System (NTFS) volume.\\n\\n\" );\n\n\tfprintf( stream, \"Usage: fsntfsinfo [ -B bodyfile ] [ -E mft_entry_index ] [ -F path ]\\n\"\n\t                 \"                  [ -o offset ] [ -dhHUvV ] source\\n\\n\" );\n\n\tfprintf( stream, \"\\tsource: the source file or device\\n\\n\" );\n\n\tfprintf( stream, \"\\t-B:     output file system hierarchy as a bodyfile\\n\" );\n\tfprintf( stream, \"\\t-d:     calculate a MD5 hash of a file entry to include in the bodyfile\\n\" );\n\tfprintf( stream, \"\\t-E:     show information about a specific MFT entry index\\n\"\n\t                 \"\\t        or \\\"all\\\".\\n\" );\n\tfprintf( stream, \"\\t-F:     show information about a specific file entry path.\\n\" );\n\tfprintf( stream, \"\\t-h:     shows this help\\n\" );\n\tfprintf( stream, \"\\t-H:     shows the file system hierarchy\\n\" );\n\tfprintf( stream, \"\\t-o:     specify the volume offset\\n\" );\n\tfprintf( stream, \"\\t-U:     shows information from the USN change journal ($UsnJrnl)\\n\" );\n\tfprintf( stream, \"\\t-v:     verbose output to stderr\\n\" );\n\tfprintf( stream, \"\\t-V:     print version\\n\" );\n}\n\n/* Signal handler for fsntfsinfo\n */\nvoid fsntfsinfo_signal_handler(\n      fsntfstools_signal_t signal FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"fsntfsinfo_signal_handler\";\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( signal )\n\n\tfsntfsinfo_abort = 1;\n\n\tif( fsntfsinfo_info_handle != NULL )\n\t{\n\t\tif( info_handle_signal_abort(\n\t\t     fsntfsinfo_info_handle,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unable to signal info handle to abort.\\n\",\n\t\t\t function );\n\n\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t error );\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\t/* Force stdin to close otherwise any function reading it will remain blocked\n\t */\n#if defined( WINAPI ) && !defined( __CYGWIN__ )\n\tif( _close(\n\t     0 ) != 0 )\n#else\n\tif( close(\n\t     0 ) != 0 )\n#endif\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: unable to close stdin.\\n\",\n\t\t function );\n\t}\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain( int argc, wchar_t * const argv[] )\n#else\nint main( int argc, char * const argv[] )\n#endif\n{\n\tlibcerror_error_t *error                   = NULL;\n\tsystem_character_t *option_bodyfile        = NULL;\n\tsystem_character_t *option_file_entry      = NULL;\n\tsystem_character_t *option_mft_entry_index = NULL;\n\tsystem_character_t *option_volume_offset   = NULL;\n\tsystem_character_t *source                 = NULL;\n\tchar *program                              = \"fsntfsinfo\";\n\tsystem_integer_t option                    = 0;\n\tsize_t string_length                       = 0;\n\tuint64_t mft_entry_index                   = 0;\n\tuint8_t calculate_md5                      = 0;\n\tint option_mode                            = FSNTFSINFO_MODE_VOLUME;\n\tint result                                 = 0;\n\tint verbose                                = 0;\n\n\tlibcnotify_stream_set(\n\t stderr,\n\t NULL );\n\tlibcnotify_verbose_set(\n\t 1 );\n\n\tif( libclocale_initialize(\n\t     \"fsntfstools\",\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize locale values.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( fsntfstools_output_initialize(\n\t     _IONBF,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize output settings.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfsntfstools_output_version_fprint(\n\t stdout,\n\t program );\n\n\twhile( ( option = fsntfstools_getopt(\n\t                   argc,\n\t                   argv,\n\t                   _SYSTEM_STRING( \"B:dE:F:hHo:UvV\" ) ) ) != (system_integer_t) -1 )\n\t{\n\t\tswitch( option )\n\t\t{\n\t\t\tcase (system_integer_t) '?':\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Invalid argument: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t\t argv[ optind - 1 ] );\n\n\t\t\t\tusage_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_FAILURE );\n\n\t\t\tcase (system_integer_t) 'B':\n\t\t\t\toption_bodyfile = optarg;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'd':\n\t\t\t\tcalculate_md5 = 1;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'E':\n\t\t\t\toption_mode            = FSNTFSINFO_MODE_MFT_ENTRY;\n\t\t\t\toption_mft_entry_index = optarg;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'F':\n\t\t\t\toption_mode       = FSNTFSINFO_MODE_FILE_ENTRY;\n\t\t\t\toption_file_entry = optarg;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'h':\n\t\t\t\tusage_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_SUCCESS );\n\n\t\t\tcase (system_integer_t) 'H':\n\t\t\t\toption_mode = FSNTFSINFO_MODE_FILE_SYSTEM_HIERARCHY;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'o':\n\t\t\t\toption_volume_offset = optarg;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'U':\n\t\t\t\toption_mode = FSNTFSINFO_MODE_USN_CHANGE_JOURNAL;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'v':\n\t\t\t\tverbose = 1;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'V':\n\t\t\t\tfsntfstools_output_copyright_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_SUCCESS );\n\t\t}\n\t}\n\tif( optind == argc )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Missing source file or device.\\n\" );\n\n\t\tusage_fprint(\n\t\t stdout );\n\n\t\treturn( EXIT_FAILURE );\n\t}\n\tsource = argv[ optind ];\n\n\tlibcnotify_verbose_set(\n\t verbose );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n\tlibfsntfs_notify_set_verbose(\n\t verbose );\n\n\tif( info_handle_initialize(\n\t     &fsntfsinfo_info_handle,\n\t     calculate_md5,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize info handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( option_bodyfile != NULL )\n\t{\n\t\tif( info_handle_set_bodyfile(\n\t\t     fsntfsinfo_info_handle,\n\t\t     option_bodyfile,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to set bodyfile.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( option_volume_offset != NULL )\n\t{\n\t\tif( info_handle_set_volume_offset(\n\t\t     fsntfsinfo_info_handle,\n\t\t     option_volume_offset,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t error );\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unsupported volume offset defaulting to: %\" PRIi64 \".\\n\",\n\t\t\t fsntfsinfo_info_handle->volume_offset );\n\t\t}\n\t}\n/* TODO check for BDE */\n\tif( info_handle_open_input(\n\t     fsntfsinfo_info_handle,\n\t     source,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to open: %\" PRIs_SYSTEM \".\\n\",\n\t\t source );\n\n\t\tgoto on_error;\n\t}\n\tswitch( option_mode )\n\t{\n\t\tcase FSNTFSINFO_MODE_FILE_ENTRY:\n\t\t\tif( fsntfsinfo_info_handle->input_volume == NULL )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print file entry information.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_file_entry_fprint_by_path(\n\t\t\t     fsntfsinfo_info_handle,\n\t\t\t     option_file_entry,\n\t\t\t     &error ) != 1 )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print file entry information.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase FSNTFSINFO_MODE_FILE_SYSTEM_HIERARCHY:\n\t\t\tif( info_handle_file_system_hierarchy_fprint(\n\t\t\t     fsntfsinfo_info_handle,\n\t\t\t     &error ) != 1 )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print file system hierarchy.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase FSNTFSINFO_MODE_MFT_ENTRY:\n\t\t\tif( option_mft_entry_index == NULL )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Mising MFT entry index string.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tstring_length = system_string_length(\n\t\t\t\t\t option_mft_entry_index );\n\n\t\t\tif( ( string_length == 3 )\n\t\t\t && ( system_string_compare(\n\t\t\t       option_mft_entry_index,\n\t\t\t       _SYSTEM_STRING( \"all\" ),\n\t\t\t       3 ) == 0 ) )\n\t\t\t{\n\t\t\t\tif( info_handle_mft_entries_fprint(\n\t\t\t\t     fsntfsinfo_info_handle,\n\t\t\t\t     &error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tfprintf(\n\t\t\t\t\t stderr,\n\t\t\t\t\t \"Unable to print MFT entries.\\n\" );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( fsntfstools_system_string_copy_decimal_to_integer_64_bit(\n\t\t\t          option_mft_entry_index,\n\t\t\t          string_length + 1,\n\t\t\t          &mft_entry_index,\n\t\t\t          &error ) == 1 )\n\t\t\t{\n\t\t\t\tif( mft_entry_index > (uint64_t) INT64_MAX )\n\t\t\t\t{\n\t\t\t\t\tfprintf(\n\t\t\t\t\t stderr,\n\t\t\t\t\t \"Invalid MFT entry index value out of bounds.\" );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tresult = info_handle_mft_entry_fprint(\n\t\t\t\t          fsntfsinfo_info_handle,\n\t\t\t\t          mft_entry_index,\n\t\t\t\t          &error );\n\n\t\t\t\tif( result == -1 )\n\t\t\t\t{\n\t\t\t\t\tfprintf(\n\t\t\t\t\t stderr,\n\t\t\t\t\t \"Error printing MFT entry: %\" PRIu64 \".\\n\",\n\t\t\t\t\t mft_entry_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\telse if( result == 0 )\n\t\t\t\t{\n\t\t\t\t\tfprintf(\n\t\t\t\t\t stderr,\n\t\t\t\t\t \"Unable to print MFT entry: %\" PRIu64 \".\\n\",\n\t\t\t\t\t mft_entry_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to copy MFT entry index string to 64-bit decimal.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase FSNTFSINFO_MODE_USN_CHANGE_JOURNAL:\n\t\t\tif( fsntfsinfo_info_handle->input_volume == NULL )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print USN change journal ($UsnJrnl) information.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_usn_change_journal_fprint(\n\t\t\t     fsntfsinfo_info_handle,\n\t\t\t     &error ) != 1 )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print USN change journal ($UsnJrnl) information.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase FSNTFSINFO_MODE_VOLUME:\n\t\tdefault:\n\t\t\tif( info_handle_volume_fprint(\n\t\t\t     fsntfsinfo_info_handle,\n\t\t\t     &error ) != 1 )\n\t\t\t{\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Unable to print volume information.\\n\" );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\tif( info_handle_close_input(\n\t     fsntfsinfo_info_handle,\n\t     &error ) != 0 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to close info handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_free(\n\t     &fsntfsinfo_info_handle,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to free info handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\treturn( EXIT_SUCCESS );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( fsntfsinfo_info_handle != NULL )\n\t{\n\t\tinfo_handle_free(\n\t\t &fsntfsinfo_info_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "fsntfstools/fsntfsmount.c",
    "content": "/*\n * Mounts a New Technology File System (NTFS) volume.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <system_string.h>\n#include <types.h>\n\n#include <stdio.h>\n\n#if defined( HAVE_IO_H ) || defined( WINAPI )\n#include <io.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_UNISTD_H )\n#include <unistd.h>\n#endif\n\n#include \"fsntfstools_getopt.h\"\n#include \"fsntfstools_i18n.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libclocale.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_output.h\"\n#include \"fsntfstools_signal.h\"\n#include \"fsntfstools_unused.h\"\n#include \"mount_dokan.h\"\n#include \"mount_fuse.h\"\n#include \"mount_handle.h\"\n\nmount_handle_t *fsntfsmount_mount_handle = NULL;\nint fsntfsmount_abort                    = 0;\n\n/* Prints usage information\n */\nvoid usage_fprint(\n      FILE *stream )\n{\n\tif( stream == NULL )\n\t{\n\t\treturn;\n\t}\n\tfprintf( stream, \"Use fsntfsmount to mount a New Technology File System (NTFS) volume\\n\\n\" );\n\n\tfprintf( stream, \"Usage: fsntfsmount [ -o offset ] [ -X extended_options ] [ -hvV ] volume\\n\"\n\t                 \"                   mount_point\\n\\n\" );\n\n\tfprintf( stream, \"\\tvolume:      a New Technology File System (NTFS) volume\\n\\n\" );\n\tfprintf( stream, \"\\tmount_point: the directory to serve as mount point\\n\\n\" );\n\n\tfprintf( stream, \"\\t-h:          shows this help\\n\" );\n\tfprintf( stream, \"\\t-o:          specify the volume offset in bytes\\n\" );\n\tfprintf( stream, \"\\t-v:          verbose output to stderr, while fsntfsmount will remain running in the\\n\"\n\t                 \"\\t             foreground\\n\" );\n\tfprintf( stream, \"\\t-V:          print version\\n\" );\n\tfprintf( stream, \"\\t-X:          extended options to pass to sub system\\n\" );\n}\n\n/* Signal handler for fsntfsmount\n */\nvoid fsntfsmount_signal_handler(\n      fsntfstools_signal_t signal FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"fsntfsmount_signal_handler\";\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( signal )\n\n\tfsntfsmount_abort = 1;\n\n\tif( fsntfsmount_mount_handle != NULL )\n\t{\n\t\tif( mount_handle_signal_abort(\n\t\t     fsntfsmount_mount_handle,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unable to signal mount handle to abort.\\n\",\n\t\t\t function );\n\n\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t error );\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\t/* Force stdin to close otherwise any function reading it will remain blocked\n\t */\n#if defined( WINAPI ) && !defined( __CYGWIN__ )\n\tif( _close(\n\t     0 ) != 0 )\n#else\n\tif( close(\n\t     0 ) != 0 )\n#endif\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: unable to close stdin.\\n\",\n\t\t function );\n\t}\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain( int argc, wchar_t * const argv[] )\n#else\nint main( int argc, char * const argv[] )\n#endif\n{\n\tlibfsntfs_error_t *error                    = NULL;\n\tsystem_character_t *mount_point             = NULL;\n\tsystem_character_t *option_extended_options = NULL;\n\tsystem_character_t *option_offset           = NULL;\n\tsystem_character_t *source                  = NULL;\n\tchar *program                               = \"fsntfsmount\";\n\tsystem_integer_t option                     = 0;\n\tint result                                  = 0;\n\tint verbose                                 = 0;\n\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\tstruct fuse_operations fsntfsmount_fuse_operations;\n\n#if defined( HAVE_LIBFUSE3 )\n\t/* Need to set this to 1 even if there no arguments, otherwise this causes\n\t * fuse: empty argv passed to fuse_session_new()\n\t */\n\tchar *fuse_argv[ 2 ]                        = { program, NULL };\n\tstruct fuse_args fsntfsmount_fuse_arguments = FUSE_ARGS_INIT(1, fuse_argv);\n#else\n\tstruct fuse_args fsntfsmount_fuse_arguments = FUSE_ARGS_INIT(0, NULL);\n\tstruct fuse_chan *fsntfsmount_fuse_channel  = NULL;\n#endif\n\tstruct fuse *fsntfsmount_fuse_handle        = NULL;\n\n#elif defined( HAVE_LIBDOKAN )\n\tDOKAN_OPERATIONS fsntfsmount_dokan_operations;\n\tDOKAN_OPTIONS fsntfsmount_dokan_options;\n#endif\n\n\tlibcnotify_stream_set(\n\t stderr,\n\t NULL );\n\tlibcnotify_verbose_set(\n\t 1 );\n\n\tif( libclocale_initialize(\n\t     \"fsntfstools\",\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize locale values.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( fsntfstools_output_initialize(\n\t     _IONBF,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize output settings.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfsntfstools_output_version_fprint(\n\t stdout,\n\t program );\n\n\twhile( ( option = fsntfstools_getopt(\n\t                   argc,\n\t                   argv,\n\t                   _SYSTEM_STRING( \"ho:vVX:\" ) ) ) != (system_integer_t) -1 )\n\t{\n\t\tswitch( option )\n\t\t{\n\t\t\tcase (system_integer_t) '?':\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Invalid argument: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t\t argv[ optind - 1 ] );\n\n\t\t\t\tusage_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_FAILURE );\n\n\t\t\tcase (system_integer_t) 'h':\n\t\t\t\tusage_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_SUCCESS );\n\n\t\t\tcase (system_integer_t) 'o':\n\t\t\t\toption_offset = optarg;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'v':\n\t\t\t\tverbose = 1;\n\n\t\t\t\tbreak;\n\n\t\t\tcase (system_integer_t) 'V':\n\t\t\t\tfsntfstools_output_copyright_fprint(\n\t\t\t\t stdout );\n\n\t\t\t\treturn( EXIT_SUCCESS );\n\n\t\t\tcase (system_integer_t) 'X':\n\t\t\t\toption_extended_options = optarg;\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif( optind == argc )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Missing source volume.\\n\" );\n\n\t\tusage_fprint(\n\t\t stdout );\n\n\t\treturn( EXIT_FAILURE );\n\t}\n\tsource = argv[ optind++ ];\n\n\tif( optind == argc )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Missing mount point.\\n\" );\n\n\t\tusage_fprint(\n\t\t stdout );\n\n\t\treturn( EXIT_FAILURE );\n\t}\n\tmount_point = argv[ optind ];\n\n\tlibcnotify_verbose_set(\n\t verbose );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n\tlibfsntfs_notify_set_verbose(\n\t verbose );\n\n\tif( mount_handle_initialize(\n\t     &fsntfsmount_mount_handle,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to initialize mount handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( option_offset != NULL )\n\t{\n\t\tif( mount_handle_set_offset(\n\t\t     fsntfsmount_mount_handle,\n\t\t     option_offset,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to set volume offset.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( mount_handle_open(\n\t     fsntfsmount_mount_handle,\n\t     source,\n\t     &error ) != 1 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to open source volume\\n\" );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\tif( option_extended_options != NULL )\n\t{\n#if defined( HAVE_LIBFUSE3 )\n\t\t// fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed.\n\t\tfsntfsmount_fuse_arguments.argc = 0;\n\t\tfsntfsmount_fuse_arguments.argv = NULL;\n#endif\n\t\t/* This argument is required but ignored\n\t\t */\n\t\tif( fuse_opt_add_arg(\n\t\t     &fsntfsmount_fuse_arguments,\n\t\t     \"\" ) != 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable add fuse arguments.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( fuse_opt_add_arg(\n\t\t     &fsntfsmount_fuse_arguments,\n\t\t     \"-o\" ) != 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable add fuse arguments.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( fuse_opt_add_arg(\n\t\t     &fsntfsmount_fuse_arguments,\n\t\t     option_extended_options ) != 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable add fuse arguments.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( memory_set(\n\t     &fsntfsmount_fuse_operations,\n\t     0,\n\t     sizeof( struct fuse_operations ) ) == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to clear fuse operations.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfsntfsmount_fuse_operations.open       = &mount_fuse_open;\n\tfsntfsmount_fuse_operations.read       = &mount_fuse_read;\n\tfsntfsmount_fuse_operations.release    = &mount_fuse_release;\n\tfsntfsmount_fuse_operations.opendir    = &mount_fuse_opendir;\n\tfsntfsmount_fuse_operations.readdir    = &mount_fuse_readdir;\n\tfsntfsmount_fuse_operations.releasedir = &mount_fuse_releasedir;\n\tfsntfsmount_fuse_operations.getattr    = &mount_fuse_getattr;\n\tfsntfsmount_fuse_operations.readlink   = &mount_fuse_readlink;\n\tfsntfsmount_fuse_operations.destroy    = &mount_fuse_destroy;\n\n#if defined( HAVE_LIBFUSE3 )\n\tfsntfsmount_fuse_handle = fuse_new(\n\t                           &fsntfsmount_fuse_arguments,\n\t                           &fsntfsmount_fuse_operations,\n\t                           sizeof( struct fuse_operations ),\n\t                           fsntfsmount_mount_handle );\n\n\tif( fsntfsmount_fuse_handle == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to create fuse handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tresult = fuse_mount(\n\t          fsntfsmount_fuse_handle,\n\t          mount_point );\n\n\tif( result != 0 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to fuse mount file system.\\n\" );\n\n\t\tgoto on_error;\n\t}\n#else\n\tfsntfsmount_fuse_channel = fuse_mount(\n\t                            mount_point,\n\t                            &fsntfsmount_fuse_arguments );\n\n\tif( fsntfsmount_fuse_channel == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to create fuse channel.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfsntfsmount_fuse_handle = fuse_new(\n\t                           fsntfsmount_fuse_channel,\n\t                           &fsntfsmount_fuse_arguments,\n\t                           &fsntfsmount_fuse_operations,\n\t                           sizeof( struct fuse_operations ),\n\t                           fsntfsmount_mount_handle );\n\n\tif( fsntfsmount_fuse_handle == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to create fuse handle.\\n\" );\n\n\t\tgoto on_error;\n\t}\n#endif /* defined( HAVE_LIBFUSE3 ) */\n\n\tif( verbose == 0 )\n\t{\n\t\tif( fuse_daemonize(\n\t\t     0 ) != 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to daemonize fuse.\\n\" );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = fuse_loop(\n\t          fsntfsmount_fuse_handle );\n\n\tif( result != 0 )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to run fuse loop.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfuse_destroy(\n\t fsntfsmount_fuse_handle );\n\n\tfuse_opt_free_args(\n\t &fsntfsmount_fuse_arguments );\n\n\treturn( EXIT_SUCCESS );\n\n#elif defined( HAVE_LIBDOKAN )\n\tif( memory_set(\n\t     &fsntfsmount_dokan_operations,\n\t     0,\n\t     sizeof( DOKAN_OPERATIONS ) ) == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to clear dokan operations.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     &fsntfsmount_dokan_options,\n\t     0,\n\t     sizeof( DOKAN_OPTIONS ) ) == NULL )\n\t{\n\t\tfprintf(\n\t\t stderr,\n\t\t \"Unable to clear dokan options.\\n\" );\n\n\t\tgoto on_error;\n\t}\n\tfsntfsmount_dokan_options.Version    = DOKAN_VERSION;\n\tfsntfsmount_dokan_options.MountPoint = mount_point;\n\n#if DOKAN_MINIMUM_COMPATIBLE_VERSION >= 200\n\tfsntfsmount_dokan_options.SingleThread = TRUE;\n#else\n\tfsntfsmount_dokan_options.ThreadCount  = 0;\n#endif\n\tif( verbose != 0 )\n\t{\n\t\tfsntfsmount_dokan_options.Options |= DOKAN_OPTION_STDERR;\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tfsntfsmount_dokan_options.Options |= DOKAN_OPTION_DEBUG;\n#endif\n\t}\n/* This will only affect the drive properties\n\tfsntfsmount_dokan_options.Options |= DOKAN_OPTION_REMOVABLE;\n*/\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\n\tfsntfsmount_dokan_options.Options |= DOKAN_OPTION_KEEP_ALIVE;\n\n\tfsntfsmount_dokan_operations.CreateFile           = &mount_dokan_CreateFile;\n\tfsntfsmount_dokan_operations.OpenDirectory        = &mount_dokan_OpenDirectory;\n\tfsntfsmount_dokan_operations.CreateDirectory      = NULL;\n\tfsntfsmount_dokan_operations.Cleanup              = NULL;\n\tfsntfsmount_dokan_operations.CloseFile            = &mount_dokan_CloseFile;\n\tfsntfsmount_dokan_operations.ReadFile             = &mount_dokan_ReadFile;\n\tfsntfsmount_dokan_operations.WriteFile            = NULL;\n\tfsntfsmount_dokan_operations.FlushFileBuffers     = NULL;\n\tfsntfsmount_dokan_operations.GetFileInformation   = &mount_dokan_GetFileInformation;\n\tfsntfsmount_dokan_operations.FindFiles            = &mount_dokan_FindFiles;\n\tfsntfsmount_dokan_operations.FindFilesWithPattern = NULL;\n\tfsntfsmount_dokan_operations.SetFileAttributes    = NULL;\n\tfsntfsmount_dokan_operations.SetFileTime          = NULL;\n\tfsntfsmount_dokan_operations.DeleteFile           = NULL;\n\tfsntfsmount_dokan_operations.DeleteDirectory      = NULL;\n\tfsntfsmount_dokan_operations.MoveFile             = NULL;\n\tfsntfsmount_dokan_operations.SetEndOfFile         = NULL;\n\tfsntfsmount_dokan_operations.SetAllocationSize    = NULL;\n\tfsntfsmount_dokan_operations.LockFile             = NULL;\n\tfsntfsmount_dokan_operations.UnlockFile           = NULL;\n\tfsntfsmount_dokan_operations.GetFileSecurity      = NULL;\n\tfsntfsmount_dokan_operations.SetFileSecurity      = NULL;\n\tfsntfsmount_dokan_operations.GetDiskFreeSpace     = NULL;\n\tfsntfsmount_dokan_operations.GetVolumeInformation = &mount_dokan_GetVolumeInformation;\n\tfsntfsmount_dokan_operations.Unmount              = &mount_dokan_Unmount;\n\n#else\n\tfsntfsmount_dokan_operations.ZwCreateFile         = &mount_dokan_ZwCreateFile;\n\tfsntfsmount_dokan_operations.Cleanup              = NULL;\n\tfsntfsmount_dokan_operations.CloseFile            = &mount_dokan_CloseFile;\n\tfsntfsmount_dokan_operations.ReadFile             = &mount_dokan_ReadFile;\n\tfsntfsmount_dokan_operations.WriteFile            = NULL;\n\tfsntfsmount_dokan_operations.FlushFileBuffers     = NULL;\n\tfsntfsmount_dokan_operations.GetFileInformation   = &mount_dokan_GetFileInformation;\n\tfsntfsmount_dokan_operations.FindFiles            = &mount_dokan_FindFiles;\n\tfsntfsmount_dokan_operations.FindFilesWithPattern = NULL;\n\tfsntfsmount_dokan_operations.SetFileAttributes    = NULL;\n\tfsntfsmount_dokan_operations.SetFileTime          = NULL;\n\tfsntfsmount_dokan_operations.DeleteFile           = NULL;\n\tfsntfsmount_dokan_operations.DeleteDirectory      = NULL;\n\tfsntfsmount_dokan_operations.MoveFile             = NULL;\n\tfsntfsmount_dokan_operations.SetEndOfFile         = NULL;\n\tfsntfsmount_dokan_operations.SetAllocationSize    = NULL;\n\tfsntfsmount_dokan_operations.LockFile             = NULL;\n\tfsntfsmount_dokan_operations.UnlockFile           = NULL;\n\tfsntfsmount_dokan_operations.GetFileSecurity      = NULL;\n\tfsntfsmount_dokan_operations.SetFileSecurity      = NULL;\n\tfsntfsmount_dokan_operations.GetDiskFreeSpace     = NULL;\n\tfsntfsmount_dokan_operations.GetVolumeInformation = &mount_dokan_GetVolumeInformation;\n\tfsntfsmount_dokan_operations.Unmounted            = NULL;\n\tfsntfsmount_dokan_operations.FindStreams          = NULL;\n\tfsntfsmount_dokan_operations.Mounted              = NULL;\n\n#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */\n\n#if DOKAN_MINIMUM_COMPATIBLE_VERSION >= 200\n\tDokanInit();\n#endif\n\tresult = DokanMain(\n\t          &fsntfsmount_dokan_options,\n\t          &fsntfsmount_dokan_operations );\n\n#if DOKAN_MINIMUM_COMPATIBLE_VERSION >= 200\n\tDokanShutdown();\n#endif\n\tswitch( result )\n\t{\n\t\tcase DOKAN_SUCCESS:\n\t\t\tbreak;\n\n\t\tcase DOKAN_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: generic error\\n\" );\n\t\t\tbreak;\n\n\t\tcase DOKAN_DRIVE_LETTER_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: bad drive letter\\n\" );\n\t\t\tbreak;\n\n\t\tcase DOKAN_DRIVER_INSTALL_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: unable to load driver\\n\" );\n\t\t\tbreak;\n\n\t\tcase DOKAN_START_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: driver error\\n\" );\n\t\t\tbreak;\n\n\t\tcase DOKAN_MOUNT_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: unable to assign drive letter\\n\" );\n\t\t\tbreak;\n\n\t\tcase DOKAN_MOUNT_POINT_ERROR:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: mount point error\\n\" );\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tfprintf(\n\t\t\t stderr,\n\t\t\t \"Unable to run dokan main: unknown error: %d\\n\",\n\t\t\t result );\n\t\t\tbreak;\n\t}\n\treturn( EXIT_SUCCESS );\n\n#else\n\tfprintf(\n\t stderr,\n\t \"No sub system to mount New Technology File System (NTFS) format.\\n\" );\n\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE ) */\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\tif( fsntfsmount_fuse_handle != NULL )\n\t{\n\t\tfuse_destroy(\n\t\t fsntfsmount_fuse_handle );\n\t}\n\tfuse_opt_free_args(\n\t &fsntfsmount_fuse_arguments );\n#endif\n\tif( fsntfsmount_mount_handle != NULL )\n\t{\n\t\tmount_handle_free(\n\t\t &fsntfsmount_mount_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_getopt.c",
    "content": "/*\n * GetOpt functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfstools_getopt.h\"\n#include \"fsntfstools_libcnotify.h\"\n\n#if !defined( HAVE_GETOPT )\n\n/* The option index\n * Start with argument 1 (argument 0 is the program name)\n */\nint optind = 1;\n\n/* The current option argument\n */\nsystem_character_t *optarg = NULL;\n\n/* Value to indicate the current option\n */\nsystem_integer_t optopt = 0;\n\n/* The next option in a group\n */\nsystem_character_t *next_option = NULL;\n\n/* Get the program options\n * Function for platforms that do not have the getopt function\n * Returns the option character processed, or -1 on error,\n * ? if the option was not in the options string, : if the option argument was missing\n */\nsystem_integer_t fsntfstools_getopt(\n                  int argument_count,\n                  system_character_t * const argument_values[],\n                  const system_character_t *options_string )\n{\n\tsystem_character_t *argument_value = NULL;\n\tsystem_character_t *option_value   = NULL;\n\tstatic char *function              = \"fsntfstools_getopt\";\n\tsize_t options_string_length       = 0;\n\n\tif( next_option != NULL )\n\t{\n\t\targument_value = next_option;\n\t\tnext_option    = NULL;\n\t}\n\telse if( optind >= argument_count )\n\t{\n\t\treturn( (system_integer_t) -1 );\n\t}\n\telse\n\t{\n\t\targument_value = argument_values[ optind ];\n\n\t\t/* Check if the argument value is not an empty string\n\t\t */\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t\t/* Check if the first character is a option marker '-'\n\t\t */\n\t\tif( *argument_value != (system_character_t) '-' )\n\t\t{\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t\targument_value++;\n\n\t\t/* Check if long options are provided '--'\n\t\t */\n\t\tif( *argument_value == (system_character_t) '-' )\n\t\t{\n\t\t\toptind++;\n\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t}\n\toptions_string_length = system_string_length(\n\t                         options_string );\n\n\toptopt       = *argument_value;\n\toption_value = system_string_search_character(\n\t                options_string,\n\t                optopt,\n\t                options_string_length );\n\n\targument_value++;\n\n\t/* Check if an argument was specified or that the option was not found\n\t * in the option string\n\t */\n\tif( ( optopt == (system_integer_t) ':' )\n\t || ( option_value == NULL ) )\n\t{\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\toptind++;\n\t\t}\n\t\tif( ( *options_string != (system_character_t) ':' )\n\t\t && ( optopt != (system_integer_t) '?' ) )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: no such option: %\" PRIc_SYSTEM \".\\n\",\n\t\t\t function,\n\t\t\t optopt );\n\t\t}\n\t\treturn( (system_integer_t) '?' );\n\t}\n\toption_value++;\n\n\t/* Check if no option argument is required\n\t */\n\tif( *option_value != (system_character_t) ':' )\n\t{\n\t\toptarg = NULL;\n\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\toptind++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Multiple options are grouped\n\t\t\t */\n\t\t\tnext_option = argument_value;\n\t\t}\n\t}\n\t/* Check if the argument is right after the option flag with no space in between\n\t */\n\telse if( *argument_value != (system_character_t) '\\0' )\n\t{\n\t\toptarg = argument_value;\n\n\t\toptind++;\n\t}\n\telse\n\t{\n\t\toptind++;\n\n\t\t/* Check if the argument was provided as the next argument value\n\t\t */\n\t\tif( argument_count <= optind )\n\t\t{\n\t\t\tif( *option_value == ':' )\n\t\t\t{\n\t\t\t\treturn( (system_integer_t) ':' );\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: option: %\" PRIc_SYSTEM \" requires an argument.\\n\",\n\t\t\t function,\n\t\t\t optopt );\n\n\t\t\treturn( (system_integer_t) '?' );\n\t\t}\n\t\toptarg = argument_values[ optind ];\n\n\t\toptind++;\n\t}\n\treturn( optopt );\n}\n\n#endif /* !defined( HAVE_GETOPT ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_getopt.h",
    "content": "/*\n * GetOpt functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_GETOPT_H )\n#define _FSNTFSTOOLS_GETOPT_H\n\n#include <common.h>\n#include <types.h>\n\n/* unistd.h is included here to export getopt, optarg, optind and optopt\n */\n#if defined( HAVE_UNISTD_H )\n#include <unistd.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_GETOPT )\n#define fsntfstools_getopt( argument_count, argument_values, options_string ) \\\n\tgetopt( argument_count, argument_values, options_string )\n\n#else\n\n#if !defined( __CYGWIN__ )\nextern int optind;\nextern system_character_t *optarg;\nextern system_integer_t optopt;\n\n#else\nint optind;\nsystem_character_t *optarg;\nsystem_integer_t optopt;\n\n#endif /* !defined( __CYGWIN__ ) */\n\nsystem_integer_t fsntfstools_getopt(\n                  int argument_count,\n                  system_character_t * const argument_values[],\n                  const system_character_t *options_string );\n\n#endif /* defined( HAVE_GETOPT ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFSTOOLS_GETOPT_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_i18n.h",
    "content": "/*\n * Internationalization (i18n) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_I18N_H )\n#define _FSNTFSTOOLS_I18N_H\n\n#include <common.h>\n\n#if defined( HAVE_LIBINTL_H )\n#include <libintl.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* TODO for now do nothing i18n-like\n#define\t_( string ) \\\n\tgettext( string )\n*/\n\n#define\t_( string ) \\\n\tstring\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFSTOOLS_I18N_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libbfio.h",
    "content": "/*\n * The libbfio header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBBFIO_H )\n#define _FSNTFSTOOLS_LIBBFIO_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBBFIO for local use of libbfio\n */\n#if defined( HAVE_LOCAL_LIBBFIO )\n\n#include <libbfio_definitions.h>\n#include <libbfio_file.h>\n#include <libbfio_file_pool.h>\n#include <libbfio_file_range.h>\n#include <libbfio_handle.h>\n#include <libbfio_memory_range.h>\n#include <libbfio_pool.h>\n#include <libbfio_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT\n * before including libbfio.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBBFIO_DLL_IMPORT\n#endif\n\n#include <libbfio.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT )\n#error Multi-threading support requires libbfio with multi-threading support\n#endif\n\n#endif /* defined( HAVE_LOCAL_LIBBFIO ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBBFIO_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libcerror.h",
    "content": "/*\n * The libcerror header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBCERROR_H )\n#define _FSNTFSTOOLS_LIBCERROR_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCERROR for local use of libcerror\n */\n#if defined( HAVE_LOCAL_LIBCERROR )\n\n#include <libcerror_definitions.h>\n#include <libcerror_error.h>\n#include <libcerror_system.h>\n#include <libcerror_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT\n * before including libcerror.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBCERROR_DLL_IMPORT\n#endif\n\n#include <libcerror.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCERROR ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBCERROR_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libclocale.h",
    "content": "/*\n * The libclocale header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBCLOCALE_H )\n#define _FSNTFSTOOLS_LIBCLOCALE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale\n */\n#if defined( HAVE_LOCAL_LIBCLOCALE )\n\n#include <libclocale_codepage.h>\n#include <libclocale_definitions.h>\n#include <libclocale_locale.h>\n#include <libclocale_support.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT\n * before including libclocale.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBCLOCALE_DLL_IMPORT\n#endif\n\n#include <libclocale.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBCLOCALE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libcnotify.h",
    "content": "/*\n * The libcnotify header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBCNOTIFY_H )\n#define _FSNTFSTOOLS_LIBCNOTIFY_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify\n */\n#if defined( HAVE_LOCAL_LIBCNOTIFY )\n\n#include <libcnotify_definitions.h>\n#include <libcnotify_print.h>\n#include <libcnotify_stream.h>\n#include <libcnotify_verbose.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT\n * before including libcnotify.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBCNOTIFY_DLL_IMPORT\n#endif\n\n#include <libcnotify.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBCNOTIFY_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libcpath.h",
    "content": "/*\n * The libcpath header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBCPATH_H )\n#define _FSNTFSTOOLS_LIBCPATH_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCPATH for local use of libcpath\n */\n#if defined( HAVE_LOCAL_LIBCPATH )\n\n#include <libcpath_definitions.h>\n#include <libcpath_path.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT\n * before including libcpath.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBCPATH_DLL_IMPORT\n#endif\n\n#include <libcpath.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCPATH ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBCPATH_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfcache.h",
    "content": "/*\n * The libfcache header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFCACHE_H )\n#define _FSNTFSTOOLS_LIBFCACHE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache\n */\n#if defined( HAVE_LOCAL_LIBFCACHE )\n\n#include <libfcache_cache.h>\n#include <libfcache_date_time.h>\n#include <libfcache_definitions.h>\n#include <libfcache_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT\n * before including libfcache.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFCACHE_DLL_IMPORT\n#endif\n\n#include <libfcache.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFCACHE ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFCACHE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfdata.h",
    "content": "/*\n * The libfdata header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFDATA_H )\n#define _FSNTFSTOOLS_LIBFDATA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFDATA for local use of libfdata\n */\n#if defined( HAVE_LOCAL_LIBFDATA )\n\n#include <libfdata_area.h>\n#include <libfdata_definitions.h>\n#include <libfdata_list.h>\n#include <libfdata_list_element.h>\n#include <libfdata_range_list.h>\n#include <libfdata_stream.h>\n#include <libfdata_types.h>\n#include <libfdata_vector.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFDATA_DLL_IMPORT\n * before including libfdata.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFDATA_DLL_IMPORT\n#endif\n\n#include <libfdata.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFDATA ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFDATA_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfdatetime.h",
    "content": "/*\n * The libfdatetime header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFDATETIME_H )\n#define _FSNTFSTOOLS_LIBFDATETIME_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime\n */\n#if defined( HAVE_LOCAL_LIBFDATETIME )\n\n#include <libfdatetime_date_time_values.h>\n#include <libfdatetime_definitions.h>\n#include <libfdatetime_fat_date_time.h>\n#include <libfdatetime_filetime.h>\n#include <libfdatetime_floatingtime.h>\n#include <libfdatetime_hfs_time.h>\n#include <libfdatetime_nsf_timedate.h>\n#include <libfdatetime_posix_time.h>\n#include <libfdatetime_systemtime.h>\n#include <libfdatetime_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT\n * before including libfdatetime.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFDATETIME_DLL_IMPORT\n#endif\n\n#include <libfdatetime.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFDATETIME ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFDATETIME_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfguid.h",
    "content": "/*\n * The libfguid header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFGUID_H )\n#define _FSNTFSTOOLS_LIBFGUID_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFGUID for local use of libfguid\n */\n#if defined( HAVE_LOCAL_LIBFGUID )\n\n#include <libfguid_definitions.h>\n#include <libfguid_identifier.h>\n#include <libfguid_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT\n * before including libfguid.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFGUID_DLL_IMPORT\n#endif\n\n#include <libfguid.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFGUID ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFGUID_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfsntfs.h",
    "content": "/*\n * The libfsntfs header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFSNTFS_H )\n#define _FSNTFSTOOLS_LIBFSNTFS_H\n\n#include <common.h>\n\n#include <libfsntfs.h>\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFSNTFS_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfusn.h",
    "content": "/*\n * The libfusn header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFUSN_H )\n#define _FSNTFSTOOLS_LIBFUSN_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFUSN for local use of libfusn\n */\n#if defined( HAVE_LOCAL_LIBFUSN )\n\n#include <libfusn_definitions.h>\n#include <libfusn_record.h>\n#include <libfusn_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFUSN_DLL_IMPORT\n * before including libfusn.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFUSN_DLL_IMPORT\n#endif\n\n#include <libfusn.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFUSN ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFUSN_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libfwnt.h",
    "content": "/*\n * The libfwnt header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBFWNT_H )\n#define _FSNTFSTOOLS_LIBFWNT_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt\n */\n#if defined( HAVE_LOCAL_LIBFWNT )\n\n#include <libfwnt_access_control_entry.h>\n#include <libfwnt_access_control_list.h>\n#include <libfwnt_bit_stream.h>\n#include <libfwnt_definitions.h>\n#include <libfwnt_huffman_tree.h>\n#include <libfwnt_locale_identifier.h>\n#include <libfwnt_lznt1.h>\n#include <libfwnt_lzx.h>\n#include <libfwnt_lzxpress.h>\n#include <libfwnt_security_descriptor.h>\n#include <libfwnt_security_identifier.h>\n#include <libfwnt_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFWNT_DLL_IMPORT\n * before including libfwnt.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBFWNT_DLL_IMPORT\n#endif\n\n#include <libfwnt.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFWNT ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBFWNT_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libhmac.h",
    "content": "/*\n * The libhmac header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBHMAC_H )\n#define _FSNTFSTOOLS_LIBHMAC_H\n\n#include <common.h>\n\n#if defined( HAVE_LOCAL_LIBHMAC )\n\n#include <libhmac_definitions.h>\n#include <libhmac_md5.h>\n#include <libhmac_sha1.h>\n#include <libhmac_sha256.h>\n#include <libhmac_sha512.h>\n#include <libhmac_support.h>\n#include <libhmac_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBHMAC_DLL_IMPORT\n * before including libhmac.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBHMAC_DLL_IMPORT\n#endif\n\n#include <libhmac.h>\n\n#endif /* defined( HAVE_LOCAL_LIBHMAC ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBHMAC_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_libuna.h",
    "content": "/*\n * The libuna header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_LIBUNA_H )\n#define _FSNTFSTOOLS_LIBUNA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBUNA for local use of libuna\n */\n#if defined( HAVE_LOCAL_LIBUNA )\n\n#include <libuna_base16_stream.h>\n#include <libuna_base32_stream.h>\n#include <libuna_base64_stream.h>\n#include <libuna_byte_stream.h>\n#include <libuna_unicode_character.h>\n#include <libuna_url_stream.h>\n#include <libuna_utf16_stream.h>\n#include <libuna_utf16_string.h>\n#include <libuna_utf32_stream.h>\n#include <libuna_utf32_string.h>\n#include <libuna_utf7_stream.h>\n#include <libuna_utf8_stream.h>\n#include <libuna_utf8_string.h>\n#include <libuna_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT\n * before including libuna.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBUNA_DLL_IMPORT\n#endif\n\n#include <libuna.h>\n\n#endif /* defined( HAVE_LOCAL_LIBUNA ) */\n\n#endif /* !defined( _FSNTFSTOOLS_LIBUNA_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_output.c",
    "content": "/*\n * Common output functions for the fsntfstools\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"fsntfstools_i18n.h\"\n#include \"fsntfstools_libbfio.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libclocale.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libfcache.h\"\n#include \"fsntfstools_libfdata.h\"\n#include \"fsntfstools_libfdatetime.h\"\n#include \"fsntfstools_libfguid.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libfusn.h\"\n#include \"fsntfstools_libfwnt.h\"\n#include \"fsntfstools_libuna.h\"\n#include \"fsntfstools_output.h\"\n\n/* Initializes output settings\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_output_initialize(\n     int stdio_mode,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfstools_output_initialize\";\n\n\tif( ( stdio_mode != _IOFBF )\n\t && ( stdio_mode != _IOLBF )\n\t && ( stdio_mode != _IONBF ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported standard IO mode.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if !defined( __BORLANDC__ )\n\tif( setvbuf(\n\t     stdout,\n\t     NULL,\n\t     stdio_mode,\n\t     0 ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set IO mode of stdout.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( setvbuf(\n\t     stderr,\n\t     NULL,\n\t     stdio_mode,\n\t     0 ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set IO mode of stderr.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif /* !defined( __BORLANDC__ ) */\n\n\treturn( 1 );\n}\n\n/* Prints the copyright information\n */\nvoid fsntfstools_output_copyright_fprint(\n      FILE *stream )\n{\n\tif( stream == NULL )\n\t{\n\t\treturn;\n\t}\n\t/* TRANSLATORS: This is a proper name.\n\t */\n\tfprintf(\n\t stream,\n\t _( \"Copyright (C) 2010-2026, %s.\\n\" ),\n\t _( \"Joachim Metz\" ) );\n\n\tfprintf(\n\t stream,\n\t _( \"This is free software; see the source for copying conditions. There is NO\\n\"\n\t    \"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\\n\" ) );\n\n\t/* TRANSLATORS: The placeholder indicates the bug-reporting address\n\t * for this package.  Please add _another line_ saying\n\t * \"Report translation bugs to <...>\\n\" with the address for translation\n\t * bugs (typically your translation team's web or email address).\n\t */\n\tfprintf(\n\t stream,\n\t _( \"Report bugs to <%s>.\\n\" ),\n\t PACKAGE_BUGREPORT );\n}\n\n/* Prints the version information\n */\nvoid fsntfstools_output_version_fprint(\n      FILE *stream,\n      const char *program )\n{\n\tif( stream == NULL )\n\t{\n\t\treturn;\n\t}\n\tif( program == NULL )\n\t{\n\t\treturn;\n\t}\n        fprintf(\n\t stream,\n\t \"%s %s\\n\\n\",\n         program,\n\t LIBFSNTFS_VERSION_STRING );\n}\n\n/* Prints the detailed version information\n */\nvoid fsntfstools_output_version_detailed_fprint(\n      FILE *stream,\n      const char *program )\n{\n\tif( stream == NULL )\n\t{\n\t\treturn;\n\t}\n\tif( program == NULL )\n\t{\n\t\treturn;\n\t}\n        fprintf(\n\t stream,\n\t \"%s %s (libfsntfs %s\",\n         program,\n\t LIBFSNTFS_VERSION_STRING,\n\t LIBFSNTFS_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libuna %s\",\n\t LIBUNA_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libbfio %s\",\n\t LIBBFIO_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfcache %s\",\n\t LIBFCACHE_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfdata %s\",\n\t LIBFDATA_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfdatetime %s\",\n\t LIBFDATETIME_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfguid %s\",\n\t LIBFGUID_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfusn %s\",\n\t LIBFUSN_VERSION_STRING );\n\n\tfprintf(\n\t stream,\n\t \", libfwnt %s\",\n\t LIBFWNT_VERSION_STRING );\n\n        fprintf(\n\t stream,\n\t \")\\n\\n\" );\n}\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_output.h",
    "content": "/*\n * Common output functions for the fsntfstools\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_OUTPUT_H )\n#define _FSNTFSTOOLS_OUTPUT_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint fsntfstools_output_initialize(\n     int stdio_mode,\n     libcerror_error_t **error );\n\nvoid fsntfstools_output_copyright_fprint(\n      FILE *stream );\n\nvoid fsntfstools_output_version_fprint(\n      FILE *stream,\n      const char *program );\n\nvoid fsntfstools_output_version_detailed_fprint(\n      FILE *stream,\n      const char *program );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFSTOOLS_OUTPUT_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_signal.c",
    "content": "/*\n * Signal handling functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_SIGNAL_H )\n#include <signal.h>\n#endif\n\n#if defined( _MSC_VER )\n#include <crtdbg.h>\n#endif\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_signal.h\"\n\n#if defined( WINAPI )\n\nvoid (*fsntfstools_signal_signal_handler)( fsntfstools_signal_t ) = NULL;\n\n/* Signal handler for Ctrl+C or Ctrl+Break signals\n */\nBOOL WINAPI fsntfstools_signal_handler(\n             fsntfstools_signal_t signal )\n{\n\tstatic char *function = \"fsntfstools_signal_handler\";\n\n\tswitch( signal )\n\t{\n\t\t/* use Ctrl+C or Ctrl+Break to simulate SERVICE_CONTROL_STOP in debug mode\n\t\t */\n\t\tcase CTRL_BREAK_EVENT:\n\t\tcase CTRL_C_EVENT:\n\t\t\tif( fsntfstools_signal_signal_handler != NULL )\n\t\t\t{\n\t\t\t\tfsntfstools_signal_signal_handler(\n\t\t\t\t signal );\n\t\t\t}\n\t\t\treturn( TRUE );\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn( FALSE );\n}\n\n#if defined( _MSC_VER )\n\n/* Initialize memory usage and leakage debugging\n */\nvoid fsntfstools_signal_initialize_memory_debug(\n      void )\n{\n\tint flag = 0;\n\n\t/* Get the current state of the flag and store it in a temporary variable\n\t */\n\tflag = _CrtSetDbgFlag(\n\t         _CRTDBG_REPORT_FLAG );\n\n\t/* Turn on client block identifiers and automatic leak detection\n\t */\n\tflag |= ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );\n\n\t/* Set the new state for the flag\n\t */\n\t_CrtSetDbgFlag(\n\t flag );\n}\n\n#endif /* defined( _MSC_VER ) */\n\n/* Attaches a signal handler for Ctrl+C or Ctrl+Break signals\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_signal_attach(\n     void (*signal_handler)( fsntfstools_signal_t ),\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfstools_signal_attach\";\n\n\tif( signal_handler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfsntfstools_signal_signal_handler = signal_handler;\n\n\tif( SetConsoleCtrlHandler(\n\t     (PHANDLER_ROUTINE) fsntfstools_signal_handler,\n\t     TRUE ) == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to attach signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( SetConsoleCtrlHandler(\n\t     NULL,\n\t     FALSE ) == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to attach break signal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( _MSC_VER )\n\tfsntfstools_signal_initialize_memory_debug();\n#endif\n\n\tSetErrorMode(\n\t SEM_FAILCRITICALERRORS );\n\n#if defined( LOCALE_SUPPORT )\n\t/* Allow subsequent threads to have their own locale.\n\t * If the application is single threaded this call has\n\t * no practical effect.\n\t */\n\t_configthreadlocale(\n\t  _ENABLE_PER_THREAD_LOCALE );\n\n\t/* Set the current thread locale to the user default\n\t * ANSI code page.\n\t */\n\tsetlocale(\n\t LC_ALL,\n\t \"\" );\n\n\t/* Set the the code page used by multibyte functions\n\t * to use the same code page as the previous call to setlocale.\n\t */\n\t_setmbcp(\n\t  _MB_CP_LOCALE );\n\n#endif /* defined( LOCALE_SUPPORT ) */\n\n\treturn( 1 );\n}\n\n/* Detaches a signal handler for Ctrl+C or Ctrl+Break signals\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_signal_detach(\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfstools_signal_detach\";\n\n\tif( SetConsoleCtrlHandler(\n\t     (PHANDLER_ROUTINE) fsntfstools_signal_handler,\n\t     FALSE ) == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to detach signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfsntfstools_signal_signal_handler = NULL;\n\n\treturn( 1 );\n}\n\n#else\n\n/* Attaches a signal handler for SIGINT\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_signal_attach(\n     void (*signal_handler)( fsntfstools_signal_t ),\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfstools_signal_attach\";\n\n\tif( signal_handler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( signal(\n\t     SIGINT,\n\t     signal_handler ) == SIG_ERR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to attach signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Detaches a signal handler for SIGINT\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_signal_detach(\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfstools_signal_detach\";\n\n\tif( signal(\n\t     SIGINT,\n\t     SIG_DFL ) == SIG_ERR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to detach signal handler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n#endif /* defined( WINAPI ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_signal.h",
    "content": "/*\n * Signal handling functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_SIGNAL_H )\n#define _FSNTFSTOOLS_SIGNAL_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if !defined( HAVE_SIGNAL_H ) && !defined( WINAPI )\n#error missing signal functions\n#endif\n\n#if defined( WINAPI )\ntypedef unsigned long fsntfstools_signal_t;\n\n#else\ntypedef int fsntfstools_signal_t;\n\n#endif /* defined( WINAPI ) */\n\n#if defined( WINAPI )\n\nBOOL WINAPI fsntfstools_signal_handler(\n             fsntfstools_signal_t signal );\n\n#if defined( _MSC_VER )\n\nvoid fsntfstools_signal_initialize_memory_debug(\n      void );\n\n#endif /* defined( _MSC_VER ) */\n\n#endif /* defined( WINAPI ) */\n\nint fsntfstools_signal_attach(\n     void (*signal_handler)( fsntfstools_signal_t ),\n     libcerror_error_t **error );\n\nint fsntfstools_signal_detach(\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFSTOOLS_SIGNAL_H ) */\n\n"
  },
  {
    "path": "fsntfstools/fsntfstools_unused.h",
    "content": "/*\n * Definitions to silence compiler warnings about unused function attributes/parameters.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFSTOOLS_UNUSED_H )\n#define _FSNTFSTOOLS_UNUSED_H\n\n#include <common.h>\n\n#if !defined( FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n\n#if defined( __GNUC__ ) && __GNUC__ >= 3\n#define FSNTFSTOOLS_ATTRIBUTE_UNUSED\t__attribute__ ((__unused__))\n\n#else\n#define FSNTFSTOOLS_ATTRIBUTE_UNUSED\n\n#endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */\n\n#endif /* !defined( FSNTFSTOOLS_ATTRIBUTE_UNUSED ) */\n\n#if defined( _MSC_VER )\n#define FSNTFSTOOLS_UNREFERENCED_PARAMETER( parameter ) \\\n\tUNREFERENCED_PARAMETER( parameter );\n\n#else\n#define FSNTFSTOOLS_UNREFERENCED_PARAMETER( parameter ) \\\n\t/* parameter */\n\n#endif /* defined( _MSC_VER ) */\n\n#endif /* !defined( _FSNTFSTOOLS_UNUSED_H ) */\n\n"
  },
  {
    "path": "fsntfstools/info_handle.c",
    "content": "/*\n * Info handle\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"bodyfile.h\"\n#include \"digest_hash.h\"\n#include \"fsntfstools_libbfio.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libclocale.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libcpath.h\"\n#include \"fsntfstools_libfdatetime.h\"\n#include \"fsntfstools_libfguid.h\"\n#include \"fsntfstools_libfwnt.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libfusn.h\"\n#include \"fsntfstools_libhmac.h\"\n#include \"fsntfstools_libuna.h\"\n#include \"info_handle.h\"\n#include \"path_string.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nextern \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nextern \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error );\n\nextern \\\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n#define DIGEST_HASH_STRING_SIZE_MD5\t33\n#define INFO_HANDLE_NOTIFY_STREAM\tstdout\n\n/* Copies a string of a decimal value to a 64-bit value\n * Returns 1 if successful or -1 on error\n */\nint fsntfstools_system_string_copy_decimal_to_integer_64_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function              = \"fsntfstools_system_string_copy_decimal_to_integer_64_bit\";\n\tsystem_character_t character_value = 0;\n\tsize_t string_index                = 0;\n\tuint64_t safe_value_64bit          = 0;\n\tuint8_t maximum_string_index       = 20;\n\tint8_t sign                        = 1;\n\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( string_size == 0 )\n\t || ( string_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid string size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_64bit == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value 64-bit.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string[ string_index ] == (system_character_t) '-' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\n\t\tsign = -1;\n\t}\n\telse if( string[ string_index ] == (system_character_t) '+' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\t}\n\twhile( string_index < string_size )\n\t{\n\t\tif( string[ string_index ] == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( string_index > (size_t) maximum_string_index )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE,\n\t\t\t \"%s: string too large.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tsafe_value_64bit *= 10;\n\n\t\tcharacter_value = string[ string_index ];\n\n\t\tif( ( character_value >= (system_character_t) '0' )\n\t\t && ( character_value <= (system_character_t) '9' ) )\n\t\t{\n\t\t\tsafe_value_64bit += (uint8_t) ( character_value - (system_character_t) '0' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported character value: %\" PRIc_SYSTEM \" at index: %d.\",\n\t\t\t function,\n\t\t\t character_value,\n\t\t\t string_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tstring_index++;\n\t}\n\tif( sign == -1 )\n\t{\n\t\tsafe_value_64bit *= (uint64_t) -1;\n\t}\n\t*value_64bit = safe_value_64bit;\n\n\treturn( 1 );\n}\n\n/* Prints the file attribute flags to the notify stream\n */\nvoid info_handle_file_attribute_flags_fprint(\n      uint32_t file_attribute_flags,\n      FILE *notify_stream )\n{\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs read-only (FILE_ATTRIBUTE_READ_ONLY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs hidden (FILE_ATTRIBUTE_HIDDEN)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs system (FILE_ATTRIBUTE_SYSTEM)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs directory (FILE_ATTRIBUTE_DIRECTORY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs device (FILE_ATTRIBUTE_DEVICE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs normal (FILE_ATTRIBUTE_NORMAL)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs temporary (FILE_ATTRIBUTE_TEMPORARY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs a sparse file (FILE_ATTRIBUTE_SPARSE_FILE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs a reparse point or symbolic link (FILE_ATTRIBUTE_FLAG_REPARSE_POINT)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs compressed (FILE_ATTRIBUTE_COMPRESSED)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs offline (FILE_ATTRIBUTE_OFFLINE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs encrypted (FILE_ATTRIBUTE_ENCRYPTED)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs virtual (FILE_ATTRIBUTE_VIRTUAL)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & 0x10000000UL ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tUnknown (0x10000000)\\n\" );\n\t}\n\tif( ( file_attribute_flags & 0x20000000UL ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\tIs index view (0x20000000)\\n\" );\n\t}\n}\n\n/* Prints the volume information flags to the notify stream\n */\nvoid info_handle_volume_information_flags_fprint(\n      uint16_t volume_information_flags,\n      FILE *notify_stream )\n{\n\tif( ( volume_information_flags & 0x0001 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_IS_DIRTY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0002 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_RESIZE_LOG_FILE)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0004 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_UPGRADE_ON_MOUNT)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0008 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_MOUNTED_ON_NT4)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0010 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_DELETE_USN_UNDERWAY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0020 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_REPAIR_OBJECT_ID)\\n\" );\n\t}\n\n\tif( ( volume_information_flags & 0x4000 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_CHKDSK_UNDERWAY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x8000 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(VOLUME_MODIFIED_BY_CHKDSK)\\n\" );\n\t}\n}\n\n/* Retrieves a string containing the access control entry type\n */\nconst char *info_handle_get_access_control_entry_type(\n             uint8_t entry_type )\n{\n\tswitch( entry_type )\n\t{\n\t\tcase 0x00:\n\t\tcase 0x04:\n\t\tcase 0x05:\n\t\tcase 0x09:\n\t\tcase 0x0b:\n\t\t\treturn( \"Access allowed\" );\n\n\t\tcase 0x01:\n\t\tcase 0x06:\n\t\tcase 0x0a:\n\t\tcase 0x0c:\n\t\t\treturn( \"Access denied\" );\n\n\t\tcase 0x02:\n\t\tcase 0x07:\n\t\tcase 0x0d:\n\t\tcase 0x0f:\n\t\t\treturn( \"System-audit\" );\n\n\t\tcase 0x03:\n\t\tcase 0x08:\n\t\tcase 0x0e:\n\t\tcase 0x10:\n\t\t\treturn( \"System-alarm\" );\n\n\t\tcase 0x11:\n\t\t\treturn( \"Mandatory label\" );\n\t}\n\treturn( \"UNKNOWN\" );\n}\n\n/* Retrieves the attribute type description\n */\nconst char *info_handle_get_attribute_type_description(\n             uint32_t attribute_type )\n{\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_UNUSED:\n\t\t\treturn( \"Unused\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n\t\t\treturn( \"$STANDARD_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST:\n\t\t\treturn( \"$ATTRIBUTE_LIST\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\treturn( \"$FILE_NAME\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER:\n\t\t\treturn( \"$OBJECT_ID\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\treturn( \"$SECURITY_DESCRIPTOR\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\treturn( \"$VOLUME_NAME\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\treturn( \"$VOLUME_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_DATA:\n\t\t\treturn( \"$DATA\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\t\treturn( \"$INDEX_ROOT\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION:\n\t\t\treturn( \"$INDEX_ALLOCATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\t\treturn( \"$BITMAP\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\treturn( \"$REPARSE_POINT\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION:\n\t\t\treturn( \"$EA_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED:\n\t\t\treturn( \"$EA\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET:\n\t\t\treturn( \"$PROPERTY_SET\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM:\n\t\t\treturn( \"$LOGGED_UTILITY_STREAM\" );\n\t}\n\treturn( \"Unknown\" );\n}\n\n/* Creates an info handle\n * Make sure the value info_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint info_handle_initialize(\n     info_handle_t **info_handle,\n     uint8_t calculate_md5,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_initialize\";\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *info_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid info handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*info_handle = memory_allocate_structure(\n\t                info_handle_t );\n\n\tif( *info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create info handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *info_handle,\n\t     0,\n\t     sizeof( info_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear info handle.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *info_handle );\n\n\t\t*info_handle = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_file_range_initialize(\n\t     &( ( *info_handle )->input_file_io_handle ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize input file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *info_handle )->calculate_md5 = calculate_md5;\n\t( *info_handle )->notify_stream = INFO_HANDLE_NOTIFY_STREAM;\n\n\treturn( 1 );\n\non_error:\n\tif( *info_handle != NULL )\n\t{\n\t\tif( ( *info_handle )->input_file_io_handle != NULL )\n\t\t{\n\t\t\tlibbfio_handle_free(\n\t\t\t &( ( *info_handle )->input_file_io_handle ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *info_handle );\n\n\t\t*info_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an info handle\n * Returns 1 if successful or -1 on error\n */\nint info_handle_free(\n     info_handle_t **info_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_free\";\n\tint result            = 1;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *info_handle != NULL )\n\t{\n\t\tif( ( *info_handle )->bodyfile_stream != NULL )\n\t\t{\n\t\t\tif( file_stream_close(\n\t\t\t     ( *info_handle )->bodyfile_stream ) != 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t\t \"%s: unable to close bodyfile stream.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t\t( *info_handle )->bodyfile_stream = NULL;\n\t\t}\n\t\tif( ( *info_handle )->input_volume != NULL )\n\t\t{\n\t\t\tif( libfsntfs_volume_free(\n\t\t\t     &( ( *info_handle )->input_volume ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free input volume.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *info_handle )->input_mft_metadata_file != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_metadata_file_free(\n\t\t\t     &( ( *info_handle )->input_mft_metadata_file ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free input MFT metadata file.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( libbfio_handle_free(\n\t\t     &( ( *info_handle )->input_file_io_handle ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free input file IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *info_handle );\n\n\t\t*info_handle = NULL;\n\t}\n\treturn( result );\n}\n\n/* Signals the info handle to abort\n * Returns 1 if successful or -1 on error\n */\nint info_handle_signal_abort(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_signal_abort\";\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinfo_handle->abort = 1;\n\n\tif( info_handle->input_volume != NULL )\n\t{\n\t\tif( libfsntfs_volume_signal_abort(\n\t\t     info_handle->input_volume,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to signal input volume to abort.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Sets the bodyfile\n * Returns 1 if successful or -1 on error\n */\nint info_handle_set_bodyfile(\n     info_handle_t *info_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_set_bodyfile\";\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle->bodyfile_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid info handle - bodyfile stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tinfo_handle->bodyfile_stream = file_stream_open_wide(\n\t                                filename,\n\t                                L\"wb\" );\n#else\n\tinfo_handle->bodyfile_stream = file_stream_open(\n\t                                filename,\n\t                                \"wb\" );\n#endif\n\tif( info_handle->bodyfile_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open bodyfile stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Sets the volume offset\n * Returns 1 if successful or -1 on error\n */\nint info_handle_set_volume_offset(\n     info_handle_t *info_handle,\n     const system_character_t *string,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_set_volume_offset\";\n\tsize_t string_length  = 0;\n\tuint64_t value_64bit  = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstring_length = system_string_length(\n\t                 string );\n\n\tif( fsntfstools_system_string_copy_decimal_to_integer_64_bit(\n\t     string,\n\t     string_length + 1,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy string of decimal to 64-bit integer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinfo_handle->volume_offset = (off64_t) value_64bit;\n\n\treturn( 1 );\n}\n\n/* Opens the input\n * Returns 1 if successful or -1 on error\n */\nint info_handle_open_input(\n     info_handle_t *info_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error )\n{\n\tstatic char *function  = \"info_handle_open_input\";\n\tsize_t filename_length = 0;\n\tint result             = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = system_string_length(\n\t                   filename );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tif( libbfio_file_range_set_name_wide(\n\t     info_handle->input_file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n#else\n\tif( libbfio_file_range_set_name(\n\t     info_handle->input_file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set file name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_range_set(\n\t     info_handle->input_file_io_handle,\n\t     info_handle->volume_offset,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set range.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          info_handle->input_file_io_handle,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to check volume signature.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_initialize(\n\t\t     &( info_handle->input_volume ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to initialize input volume.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_volume_open_file_io_handle(\n\t\t     info_handle->input_volume,\n\t\t     info_handle->input_file_io_handle,\n\t\t     LIBFSNTFS_OPEN_READ,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open input volume.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( libbfio_file_range_set(\n\t\t     info_handle->input_file_io_handle,\n\t\t     0,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set range.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_metadata_file_initialize(\n\t\t     &( info_handle->input_mft_metadata_file ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to initialize input MFT metadata file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_metadata_file_open_file_io_handle(\n\t\t     info_handle->input_mft_metadata_file,\n\t\t     info_handle->input_file_io_handle,\n\t\t     LIBFSNTFS_OPEN_READ,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open input MFT metadata file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t &( info_handle->input_mft_metadata_file ),\n\t\t NULL );\n\t}\n\tif( info_handle->input_volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &( info_handle->input_volume ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Closes the input\n * Returns the 0 if succesful or -1 on error\n */\nint info_handle_close_input(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_close_input\";\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle->input_volume != NULL )\n\t{\n\t\tif( libfsntfs_volume_close(\n\t\t     info_handle->input_volume,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close input volume.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tif( libfsntfs_mft_metadata_file_close(\n\t\t     info_handle->input_mft_metadata_file,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close input MFT metadata file.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 0 );\n}\n\n/* Calculates the MD5 of the contents of a file entry\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_entry_calculate_md5(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     char *md5_string,\n     size_t md5_string_size,\n     libcerror_error_t **error )\n{\n\tuint8_t md5_hash[ LIBHMAC_MD5_HASH_SIZE ];\n\tuint8_t read_buffer[ 4096 ];\n\n\tlibhmac_md5_context_t *md5_context = NULL;\n\tstatic char *function              = \"info_handle_file_entry_calculate_md5\";\n\tsize64_t data_size                 = 0;\n\tsize_t read_size                   = 0;\n\tssize_t read_count                 = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_size(\n\t     file_entry,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_entry_seek_offset(\n\t     file_entry,\n\t     0,\n\t     SEEK_SET,\n\t     error ) == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek offset: 0 in file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libhmac_md5_initialize(\n\t     &md5_context,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize MD5 context.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( data_size > 0 )\n\t{\n\t\tread_size = 4096;\n\n\t\tif( (size64_t) read_size > data_size )\n\t\t{\n\t\t\tread_size = (size_t) data_size;\n\t\t}\n\t\tread_count = libfsntfs_file_entry_read_buffer(\n\t\t              file_entry,\n\t\t              read_buffer,\n\t\t              read_size,\n\t\t              error );\n\n\t\tif( read_count != (ssize_t) read_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read from file entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_size -= read_size;\n\n\t\tif( libhmac_md5_update(\n\t\t     md5_context,\n\t\t     read_buffer,\n\t\t     read_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to update MD5 hash.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libhmac_md5_finalize(\n\t     md5_context,\n\t     md5_hash,\n\t     LIBHMAC_MD5_HASH_SIZE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to finalize MD5 hash.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libhmac_md5_free(\n\t     &md5_context,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free MD5 context.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( digest_hash_copy_to_string(\n\t     md5_hash,\n\t     LIBHMAC_MD5_HASH_SIZE,\n\t     md5_string,\n\t     md5_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set MD5 hash string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( md5_context != NULL )\n\t{\n\t\tlibhmac_md5_free(\n\t\t &md5_context,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a file entry or data stream name\n * Returns 1 if successful or -1 on error\n */\nint info_handle_name_value_fprint(\n     info_handle_t *info_handle,\n     const system_character_t *value_string,\n     size_t value_string_length,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *escaped_value_string = NULL;\n\tstatic char *function                    = \"info_handle_name_value_fprint\";\n\tsize_t escaped_value_string_size         = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_string_copy_from_file_entry_path(\n\t     &escaped_value_string,\n\t     &escaped_value_string_size,\n\t     value_string,\n\t     value_string_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy path from file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( escaped_value_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing escaped value string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"%\" PRIs_SYSTEM \"\",\n\t escaped_value_string );\n\n\tmemory_free(\n\t escaped_value_string );\n\n\treturn( 1 );\n\non_error:\n\tif( escaped_value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t escaped_value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a FILETIME value\n * Returns 1 if successful or -1 on error\n */\nint info_handle_filetime_value_fprint(\n     info_handle_t *info_handle,\n     const char *value_name,\n     uint64_t value_64bit,\n     libcerror_error_t **error )\n{\n\tsystem_character_t date_time_string[ 48 ];\n\n\tlibfdatetime_filetime_t *filetime = NULL;\n\tstatic char *function             = \"info_handle_filetime_value_fprint\";\n\tint result                        = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_64bit == 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"%s: Not set (0)\\n\",\n\t\t value_name );\n\t}\n\telse\n\t{\n\t\tif( libfdatetime_filetime_initialize(\n\t\t     &filetime,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create FILETIME.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdatetime_filetime_copy_from_64bit(\n\t\t     filetime,\n\t\t     value_64bit,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy 64-bit value to FILETIME.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfdatetime_filetime_copy_to_utf16_string(\n\t\t\t  filetime,\n\t\t\t  (uint16_t *) date_time_string,\n\t\t\t  48,\n\t\t\t  LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t\t  error );\n#else\n\t\tresult = libfdatetime_filetime_copy_to_utf8_string(\n\t\t\t  filetime,\n\t\t\t  (uint8_t *) date_time_string,\n\t\t\t  48,\n\t\t\t  LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t\t  error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy FILETIME to string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"%s: %\" PRIs_SYSTEM \" UTC\\n\",\n\t\t value_name,\n\t\t date_time_string );\n\n\t\tif( libfdatetime_filetime_free(\n\t\t     &filetime,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free FILETIME.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( filetime != NULL )\n\t{\n\t\tlibfdatetime_filetime_free(\n\t\t &filetime,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a security descriptor\n * Returns 1 if successful or -1 on error\n */\nint info_handle_security_descriptor_fprint(\n     info_handle_t *info_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfwnt_access_control_entry_t *access_control_entry = NULL;\n\tlibfwnt_access_control_list_t *access_control_list   = NULL;\n\tlibfwnt_security_descriptor_t *security_descriptor   = NULL;\n\tlibfwnt_security_identifier_t *security_identifier   = NULL;\n\tsystem_character_t *value_string                     = NULL;\n\tstatic char *function                                = \"info_handle_security_descriptor_fprint\";\n\tsize_t value_string_size                             = 0;\n\tuint32_t access_mask                                 = 0;\n\tuint8_t access_control_entry_flags                   = 0;\n\tuint8_t access_control_entry_type                    = 0;\n\tint entry_index                                      = 0;\n\tint number_of_entries                                = 0;\n\tint result                                           = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfwnt_security_descriptor_initialize(\n\t     &security_descriptor,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create security descriptor.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfwnt_security_descriptor_copy_from_byte_stream(\n\t     security_descriptor,\n\t     data,\n\t     data_size,\n\t     LIBFWNT_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy security descriptor from byte stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tSecurity descriptor:\\n\" );\n\n\tresult = libfwnt_security_descriptor_get_owner(\n\t\t  security_descriptor,\n\t\t  &security_identifier,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve owner SID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfwnt_security_identifier_get_string_size(\n\t\t     security_identifier,\n\t\t     &value_string_size,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve owner SID string size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( value_string_size > 0 )\n\t\t{\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t\t\tvalue_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create owner SID string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfwnt_security_identifier_copy_to_utf16_string(\n\t\t\t\t  security_identifier,\n\t\t\t\t  (uint16_t *) value_string,\n\t\t\t\t  value_string_size,\n\t\t\t\t  0,\n\t\t\t\t  error );\n#else\n\t\t\tresult = libfwnt_security_identifier_copy_to_utf8_string(\n\t\t\t\t  security_identifier,\n\t\t\t\t  (uint8_t *) value_string,\n\t\t\t\t  value_string_size,\n\t\t\t\t  0,\n\t\t\t\t  error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve owner SID string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfwnt_security_identifier_free(\n\t\t\t     &security_identifier,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free owner SID.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\t\\tOwner SID\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t value_string );\n\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n\t}\n\tresult = libfwnt_security_descriptor_get_group(\n\t\t  security_descriptor,\n\t\t  &security_identifier,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve group SID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfwnt_security_identifier_get_string_size(\n\t\t     security_identifier,\n\t\t     &value_string_size,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve group SID string size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( value_string_size > 0 )\n\t\t{\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t\t\tvalue_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create group SID string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfwnt_security_identifier_copy_to_utf16_string(\n\t\t\t\t  security_identifier,\n\t\t\t\t  (uint16_t *) value_string,\n\t\t\t\t  value_string_size,\n\t\t\t\t  0,\n\t\t\t\t  error );\n#else\n\t\t\tresult = libfwnt_security_identifier_copy_to_utf8_string(\n\t\t\t\t  security_identifier,\n\t\t\t\t  (uint8_t *) value_string,\n\t\t\t\t  value_string_size,\n\t\t\t\t  0,\n\t\t\t\t  error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve group SID string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfwnt_security_identifier_free(\n\t\t\t     &security_identifier,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free group SID.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\t\\tGroup SID\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t value_string );\n\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n\t}\n\tresult = libfwnt_security_descriptor_get_discretionary_acl(\n\t\t  security_descriptor,\n\t\t  &access_control_list,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve discretionary access control list (ACL).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tDiscretionary ACL:\\n\" );\n\n\t\tif( libfwnt_access_control_list_get_number_of_entries(\n\t\t     access_control_list,\n\t\t     &number_of_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of discretionary access control entries (ACE).\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( entry_index = 0;\n\t\t     entry_index < number_of_entries;\n\t\t     entry_index++ )\n\t\t{\n\t\t\tif( libfwnt_access_control_list_get_entry_by_index(\n\t\t\t     access_control_list,\n\t\t\t     entry_index,\n\t\t\t     &access_control_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve discretionary access control entry (ACE): %d.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n/* TODO print ACE */\n\t\t\tif( libfwnt_access_control_entry_free(\n\t\t\t     &access_control_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free discretionary access control entry (ACE): %d.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( libfwnt_access_control_list_free(\n\t\t     &access_control_list,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free discretionary access control list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfwnt_security_descriptor_get_system_acl(\n\t\t  security_descriptor,\n\t\t  &access_control_list,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve system access control list (ACL).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tSystem ACL:\\n\" );\n\n\t\tif( libfwnt_access_control_list_get_number_of_entries(\n\t\t     access_control_list,\n\t\t     &number_of_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of system access control entries (ACE).\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( entry_index = 0;\n\t\t     entry_index < number_of_entries;\n\t\t     entry_index++ )\n\t\t{\n\t\t\tif( libfwnt_access_control_list_get_entry_by_index(\n\t\t\t     access_control_list,\n\t\t\t     entry_index,\n\t\t\t     &access_control_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve system access control entry (ACE): %d.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfwnt_access_control_entry_get_type(\n\t\t\t     access_control_entry,\n\t\t\t     &access_control_entry_type,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve system access control entry (ACE): %d type.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfwnt_access_control_entry_get_flags(\n\t\t\t     access_control_entry,\n\t\t\t     &access_control_entry_flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve system access control entry (ACE): %d flags.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tresult = libfwnt_access_control_entry_get_access_mask(\n\t\t\t          access_control_entry,\n\t\t\t          &access_mask,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve access mask.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n/* TODO ignore ACE without access mask? */\n\t\t\tresult = libfwnt_access_control_entry_get_security_identifier(\n\t\t\t          access_control_entry,\n\t\t\t          &security_identifier,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve security identifier.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result != 0 )\n\t\t\t{\n\t\t\t\tif( libfwnt_security_identifier_get_string_size(\n\t\t\t\t     security_identifier,\n\t\t\t\t     &value_string_size,\n\t\t\t\t     0,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve security identifier string size.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( value_string_size > 0 )\n\t\t\t\t{\n\t\t\t\t\tvalue_string = system_string_allocate(\n\t\t\t\t\t\t\tvalue_string_size );\n\n\t\t\t\t\tif( value_string == NULL )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t\t\t \"%s: unable to create security identifier string.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\t\t\tresult = libfwnt_security_identifier_copy_to_utf16_string(\n\t\t\t\t\t\t  security_identifier,\n\t\t\t\t\t\t  (uint16_t *) value_string,\n\t\t\t\t\t\t  value_string_size,\n\t\t\t\t\t\t  0,\n\t\t\t\t\t\t  error );\n#else\n\t\t\t\t\tresult = libfwnt_security_identifier_copy_to_utf8_string(\n\t\t\t\t\t\t  security_identifier,\n\t\t\t\t\t\t  (uint8_t *) value_string,\n\t\t\t\t\t\t  value_string_size,\n\t\t\t\t\t\t  0,\n\t\t\t\t\t\t  error );\n#endif\n\t\t\t\t\tif( result != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve security identifier string.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tif( libfwnt_security_identifier_free(\n\t\t\t\t\t     &security_identifier,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t\t \"%s: unable to free security identifier.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tfprintf(\n\t\t\t\t\t info_handle->notify_stream,\n\t\t\t\t\t \"\\t\\t\\t%s, flags: 0x%\" PRIx8 \", access mask: 0x%04\" PRIx32 \", SID: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t\t\t info_handle_get_access_control_entry_type(\n\t\t\t\t\t  access_control_entry_type ),\n\t\t\t\t\t access_control_entry_flags,\n\t\t\t\t\t access_mask,\n\t\t\t\t\t value_string );\n\n\t\t\t\t\tmemory_free(\n\t\t\t\t\t value_string );\n\n\t\t\t\t\tvalue_string = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( libfwnt_access_control_entry_free(\n\t\t\t     &access_control_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free system access control entry (ACE): %d.\",\n\t\t\t\t function,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( libfwnt_access_control_list_free(\n\t\t     &access_control_list,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free system access control list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfwnt_security_descriptor_free(\n\t     &security_descriptor,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free security descriptor.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\tif( access_control_entry != NULL )\n\t{\n\t\tlibfwnt_access_control_entry_free(\n\t\t &access_control_entry,\n\t\t NULL );\n\t}\n\tif( access_control_list != NULL )\n\t{\n\t\tlibfwnt_access_control_list_free(\n\t\t &access_control_list,\n\t\t NULL );\n\t}\n\tif( security_identifier != NULL )\n\t{\n\t\tlibfwnt_security_identifier_free(\n\t\t &security_identifier,\n\t\t NULL );\n\t}\n\tif( security_descriptor != NULL )\n\t{\n\t\tlibfwnt_security_descriptor_free(\n\t\t &security_descriptor,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     int attribute_index,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_attribute_fprint\";\n\tsize_t value_string_size         = 0;\n\tuint32_t attribute_type          = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"Attribute: %d\\n\",\n\t attribute_index + 1 );\n\n\tif( libfsntfs_attribute_get_type(\n\t     attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tAttribute type\\t\\t\\t: %s (0x%08\" PRIx32 \")\\n\",\n\t info_handle_get_attribute_type_description(\n\t  attribute_type ),\n\t attribute_type );\n\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_DATA:\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\tbreak;\n\n\t\tdefault:\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t\t          attribute,\n\t\t          &value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t\t          attribute,\n\t\t          &value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( value_string_size > 0 )\n\t\t{\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t                value_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_attribute_get_utf16_name(\n\t\t\t          attribute,\n\t\t\t          (uint16_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_attribute_get_utf8_name(\n\t\t\t          attribute,\n\t\t\t          (uint8_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tAttribute name\\t\\t\\t: \" );\n\n\t\t\tif( info_handle_name_value_fprint(\n\t\t\t     info_handle,\n\t\t\t     value_string,\n\t\t\t     value_string_size - 1,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print attribute name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\n\" );\n\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n\t\tbreak;\n\t}\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST:\n\t\t\tif( info_handle_attribute_list_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print attribute list attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\t\tif( info_handle_bitmap_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print bitmap attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_DATA:\n\t\t\tif( info_handle_data_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print data attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\tif( info_handle_file_name_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print file name attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION:\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM:\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER:\n\t\t\tif( info_handle_object_identifier_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print object identifier attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\tif( info_handle_reparse_point_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print reparse point attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\tif( info_handle_security_descriptor_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print security descriptor attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n\t\t\tif( info_handle_standard_information_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print standard information attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\tif( info_handle_volume_information_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print volume information attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\tif( info_handle_volume_name_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print volume name attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tif( ( info_handle->input_mft_metadata_file != NULL )\n\t && ( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME ) )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tPath hint\\t\\t: \" );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_entry_get_utf16_path_hint_size(\n\t\t          file_entry,\n\t\t          attribute_index,\n\t\t          &value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_entry_get_utf8_path_hint_size(\n\t\t          file_entry,\n\t\t          attribute_index,\n\t\t          &value_string_size,\n\t\t          error );\n#endif\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve path hint string size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( result != 0 )\n\t\t && ( value_string_size > 0 ) )\n\t\t{\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t                value_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create path hint string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_file_entry_get_utf16_path_hint(\n\t\t\t          file_entry,\n\t\t\t          attribute_index,\n\t\t\t          (uint16_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_file_entry_get_utf8_path_hint(\n\t\t\t          file_entry,\n\t\t\t          attribute_index,\n\t\t\t          (uint8_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve path hint string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_name_value_fprint(\n\t\t\t     info_handle,\n\t\t\t     value_string,\n\t\t\t     value_string_size - 1,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $ATTRIBUTE_LIST attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_attribute_list_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_list_entry_t *attribute_list_entry = NULL;\n\tsystem_character_t *value_string                       = NULL;\n\tstatic char *function                                  = \"info_handle_attribute_list_attribute_fprint\";\n\tsize64_t data_size                                     = 0;\n\tsize_t value_string_size                               = 0;\n\tuint64_t data_first_vcn                                = 0;\n\tuint64_t data_last_vcn                                 = 0;\n\tuint64_t file_reference                                = 0;\n\tuint32_t attribute_type                                = 0;\n\tint entry_index                                        = 0;\n\tint number_of_entries                                  = 0;\n\tint result                                             = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data VCN range.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( ( data_first_vcn == data_last_vcn )\n\t\t || ( data_last_vcn == 0xffffffffffffffffUL ) )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN range\\t\\t\\t: %\" PRIu64 \" - %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn,\n\t\t\t data_last_vcn );\n\t\t}\n\t}\n\tif( data_first_vcn == 0 )\n\t{\n\t\tif( libfsntfs_attribute_get_data_size(\n\t\t     attribute,\n\t\t     &data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tData size\\t\\t\\t: %\" PRIu64 \" bytes\\n\",\n\t\t data_size );\n\t}\n\tif( libfsntfs_attribute_list_attribute_get_number_of_entries(\n\t     attribute,\n\t     &number_of_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attribute list entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tNumber of entries\\t\\t: %d\\n\",\n\t number_of_entries );\n\n\tfor( entry_index = 0;\n\t     entry_index < number_of_entries;\n\t     entry_index++ )\n\t{\n\t\tif( libfsntfs_attribute_list_attribute_get_entry_by_index(\n\t\t     attribute,\n\t\t     entry_index,\n\t\t     &attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_attribute_list_entry_get_attribute_type(\n\t\t     attribute_list_entry,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_attribute_list_entry_get_file_reference(\n\t\t     attribute_list_entry,\n\t\t     &file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file reference.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_attribute_list_entry_get_utf16_name_size(\n\t\t          attribute_list_entry,\n\t\t          &value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_attribute_list_entry_get_utf8_name_size(\n\t\t          attribute_list_entry,\n\t\t          &value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( value_string_size > 0 )\n\t\t{\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t                value_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t\t\t          attribute_list_entry,\n\t\t\t          (uint16_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t\t\t          attribute_list_entry,\n\t\t\t          (uint8_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tEntry: %d\\t\\t\\t: %s (0x%08\" PRIx32 \")\",\n\t\t entry_index,\n\t\t info_handle_get_attribute_type_description(\n\t\t  attribute_type ),\n\t\t attribute_type );\n\n\t\tif( value_string != NULL )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \" \" );\n\n\t\t\tif( info_handle_name_value_fprint(\n\t\t\t     info_handle,\n\t\t\t     value_string,\n\t\t\t     value_string_size - 1,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \" in file reference: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t file_reference & 0xffffffffffffUL,\n\t\t file_reference >> 48 );\n\n\t\tif( libfsntfs_attribute_list_entry_free(\n\t\t     &attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\tif( attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_attribute_list_entry_free(\n\t\t &attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $BITMAP attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_bitmap_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_bitmap_attribute_fprint\";\n\tsize64_t data_size               = 0;\n\tsize_t value_string_size         = 0;\n\tuint64_t data_first_vcn          = 0;\n\tuint64_t data_last_vcn           = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data VCN range.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( ( data_first_vcn == data_last_vcn )\n\t\t || ( data_last_vcn == 0xffffffffffffffffUL ) )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN range\\t\\t\\t: %\" PRIu64 \" - %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn,\n\t\t\t data_last_vcn );\n\t\t}\n\t}\n\tif( data_first_vcn == 0 )\n\t{\n\t\tif( libfsntfs_attribute_get_data_size(\n\t\t     attribute,\n\t\t     &data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tData size\\t\\t\\t: %\" PRIu64 \" bytes\\n\",\n\t\t data_size );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_string_size > 0 )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_attribute_get_utf16_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_attribute_get_utf8_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tAttribute name\\t\\t\\t: \" );\n\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     value_string,\n\t\t     value_string_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $DATA attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_data_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_data_attribute_fprint\";\n\tsize64_t data_size               = 0;\n\tsize_t value_string_size         = 0;\n\tuint64_t data_first_vcn          = 0;\n\tuint64_t data_last_vcn           = 0;\n\tuint16_t data_flags              = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data VCN range.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( ( data_first_vcn == data_last_vcn )\n\t\t || ( data_last_vcn == 0xffffffffffffffffUL ) )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tData VCN range\\t\\t\\t: %\" PRIu64 \" - %\" PRIu64 \"\\n\",\n\t\t\t data_first_vcn,\n\t\t\t data_last_vcn );\n\t\t}\n\t}\n\tif( data_first_vcn == 0 )\n\t{\n\t\tif( libfsntfs_attribute_get_data_size(\n\t\t     attribute,\n\t\t     &data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tData size\\t\\t\\t: %\" PRIu64 \" bytes\\n\",\n\t\t data_size );\n\t}\n\tif( libfsntfs_attribute_get_data_flags(\n\t     attribute,\n\t     &data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tData flags\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t data_flags );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_string_size > 0 )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_attribute_get_utf16_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_attribute_get_utf8_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tName\\t\\t\\t\\t: \" );\n\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     value_string,\n\t\t     value_string_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $FILE_NAME attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_file_name_attribute_fprint\";\n\tsize_t value_string_size         = 0;\n\tuint64_t value_64bit             = 0;\n\tuint32_t value_32bit             = 0;\n\tuint8_t value_8bit               = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_parent_file_reference(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_64bit == 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tParent file reference\\t\\t: %\" PRIu64 \"\\n\",\n\t\t value_64bit );\n\t}\n\telse\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tParent file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t value_64bit & 0xffffffffffffUL,\n\t\t value_64bit >> 48 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_creation_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tCreation time\\t\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_attribute_get_modification_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tModification time\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_attribute_get_access_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tAccess time\\t\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_attribute_get_entry_modification_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tEntry modification time\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t     attribute,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFile attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\tinfo_handle_file_attribute_flags_fprint(\n\t value_32bit,\n\t info_handle->notify_stream );\n\n\tif( libfsntfs_file_name_attribute_get_name_space(\n\t     attribute,\n\t     &value_8bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name space.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tName space\\t\\t\\t: \" );\n\n\tswitch( value_8bit )\n\t{\n\t\tcase 0:\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"POSIX (%\" PRIu8 \")\",\n\t\t\t value_8bit );\n\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"Windows (%\" PRIu8 \")\",\n\t\t\t value_8bit );\n\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"DOS (%\" PRIu8 \")\",\n\t\t\t value_8bit );\n\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"DOS and Windows (%\" PRIu8 \")\",\n\t\t\t value_8bit );\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"%\" PRIu8 \"\",\n\t\t\t value_8bit );\n\n\t\t\tbreak;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_string_size > 0 )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tName\\t\\t\\t\\t: \" );\n\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     value_string,\n\t\t     value_string_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $OBJECT_ID attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_object_identifier_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t guid_data[ 16 ];\n\n\tsystem_character_t guid_string[ 48 ];\n\n\tlibfguid_identifier_t *guid = NULL;\n\tstatic char *function       = \"info_handle_object_identifier_attribute_fprint\";\n\tint result                  = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfguid_identifier_initialize(\n\t     &guid,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_object_identifier_attribute_get_droid_file_identifier(\n\t     attribute,\n\t     guid_data,\n\t     16,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve droid file identifier.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_copy_from_byte_stream(\n\t     guid,\n\t     guid_data,\n\t     16,\n\t     LIBFGUID_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfguid_identifier_copy_to_utf16_string(\n\t\t  guid,\n\t\t  (uint16_t *) guid_string,\n\t\t  48,\n\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t  error );\n#else\n\tresult = libfguid_identifier_copy_to_utf8_string(\n\t\t  guid,\n\t\t  (uint8_t *) guid_string,\n\t\t  48,\n\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t  error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy GUID to string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tDroid file identifier\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t guid_string );\n\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n\t          attribute,\n\t          guid_data,\n\t          16,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve birth droid volume identifier.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfguid_identifier_copy_from_byte_stream(\n\t\t     guid,\n\t\t     guid_data,\n\t\t     16,\n\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfguid_identifier_copy_to_utf16_string(\n\t\t\t  guid,\n\t\t\t  (uint16_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#else\n\t\tresult = libfguid_identifier_copy_to_utf8_string(\n\t\t\t  guid,\n\t\t\t  (uint8_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy GUID to string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tBirth droid volume identifier\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t guid_string );\n\t}\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n\t          attribute,\n\t          guid_data,\n\t          16,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve birth droid file identifier.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfguid_identifier_copy_from_byte_stream(\n\t\t     guid,\n\t\t     guid_data,\n\t\t     16,\n\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfguid_identifier_copy_to_utf16_string(\n\t\t\t  guid,\n\t\t\t  (uint16_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#else\n\t\tresult = libfguid_identifier_copy_to_utf8_string(\n\t\t\t  guid,\n\t\t\t  (uint8_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy GUID to string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tBirth droid file identifier\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t guid_string );\n\t}\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n\t          attribute,\n\t          guid_data,\n\t          16,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve birth droid domain identifier.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfguid_identifier_copy_from_byte_stream(\n\t\t     guid,\n\t\t     guid_data,\n\t\t     16,\n\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfguid_identifier_copy_to_utf16_string(\n\t\t\t  guid,\n\t\t\t  (uint16_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#else\n\t\tresult = libfguid_identifier_copy_to_utf8_string(\n\t\t\t  guid,\n\t\t\t  (uint8_t *) guid_string,\n\t\t\t  48,\n\t\t\t  LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t  error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy GUID to string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tBirth droid domain identifier\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t guid_string );\n\t}\n\tif( libfguid_identifier_free(\n\t     &guid,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( guid != NULL )\n\t{\n\t\tlibfguid_identifier_free(\n\t\t &guid,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $REPARSE_POINT attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_reparse_point_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_reparse_point_attribute_fprint\";\n\tsize_t value_string_size         = 0;\n\tuint32_t value_32bit             = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_reparse_point_attribute_get_tag(\n\t     attribute,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve tag.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tTag\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\n\tresult = libfsntfs_reparse_point_attribute_get_compression_method(\n\t          attribute,\n\t          &value_32bit,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compression method.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tCompression method\\t\\t: \" );\n\n\t\tswitch( value_32bit )\n\t\t{\n\t\t\tcase 0:\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"XPRESS4K (%\" PRIu32 \")\",\n\t\t\t\t value_32bit );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"LZX (%\" PRIu32 \")\",\n\t\t\t\t value_32bit );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"XPRESS8K (%\" PRIu32 \")\",\n\t\t\t\t value_32bit );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"XPRESS16K (%\" PRIu32 \")\",\n\t\t\t\t value_32bit );\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"%\" PRIu32 \"\",\n\t\t\t\t value_32bit );\n\n\t\t\t\tbreak;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n/* TODO sanitize substitute name ? */\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve substitute name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( result != 0 )\n\t && ( value_string_size > 0 ) )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create substitute name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve substitute name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tSubstitute name\\t\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t value_string );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve print name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( result != 0 )\n\t && ( value_string_size > 0 ) )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tPrint name\\t\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t value_string );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $SECURITY_DESCRIPTOR attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_security_descriptor_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_security_descriptor_attribute_fprint\";\n\tuint8_t *data         = NULL;\n\tsize_t data_size      = 0;\n\tint result            = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_security_descriptor_attribute_get_security_descriptor_size(\n\t          attribute,\n\t          &data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tdata = (uint8_t *) memory_allocate(\n\t\t                    sizeof( uint8_t ) * data_size );\n\n\t\tif( data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_attribute_get_security_descriptor(\n\t\t     attribute,\n\t\t     data,\n\t\t     data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( info_handle_security_descriptor_fprint(\n\t\t     info_handle,\n\t\t     data,\n\t\t     data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t data );\n\n\t\tdata = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( data != NULL )\n\t{\n\t\tmemory_free(\n\t\t data );\n\t}\n\treturn( -1 );\n}\n\n/* Prints $STANDARD_INFORMATION attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_standard_information_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_standard_information_attribute_fprint\";\n\tuint64_t value_64bit  = 0;\n\tuint32_t value_32bit  = 0;\n\tint result            = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_standard_information_attribute_get_creation_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tCreation time\\t\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_standard_information_attribute_get_modification_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tModification time\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_standard_information_attribute_get_access_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tAccess time\\t\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_standard_information_attribute_get_entry_modification_time(\n\t     attribute,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tEntry modification time\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_standard_information_attribute_get_owner_identifier(\n\t          attribute,\n\t          &value_32bit,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve owner identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tOwner identifier\\t\\t: %\" PRIu32 \"\\n\",\n\t\t value_32bit );\n\t}\n\tresult = libfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n\t          attribute,\n\t          &value_32bit,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tSecurity descriptor identifier\\t: %\" PRIu32 \"\\n\",\n\t\t value_32bit );\n\t}\n\tresult = libfsntfs_standard_information_attribute_get_update_sequence_number(\n\t          attribute,\n\t          &value_64bit,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve update sequence number.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tUpdate sequence number\\t\\t: %\" PRIu64 \"\\n\",\n\t\t value_64bit );\n\t}\n\tif( libfsntfs_standard_information_attribute_get_file_attribute_flags(\n\t     attribute,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFile attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\tinfo_handle_file_attribute_flags_fprint(\n\t value_32bit,\n\t info_handle->notify_stream );\n\n\treturn( 1 );\n}\n\n/* Prints $VOLUME_INFORMATION attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_volume_information_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"info_handle_volume_information_attribute_fprint\";\n\tuint16_t value_16bit  = 0;\n\tuint8_t major_version = 0;\n\tuint8_t minor_version = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_information_attribute_get_version(\n\t     attribute,\n\t     &major_version,\n\t     &minor_version,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve version.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tVersion\\t\\t\\t\\t: %\" PRIu8 \".%\" PRIu8 \"\\n\",\n\t major_version,\n\t minor_version );\n\n\tif( libfsntfs_volume_information_attribute_get_flags(\n\t     attribute,\n\t     &value_16bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFlags\\t\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t value_16bit );\n\tinfo_handle_volume_information_flags_fprint(\n\t value_16bit,\n\t info_handle->notify_stream );\n\n\treturn( 1 );\n}\n\n/* Prints $VOLUME_NAME attribute information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_volume_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_volume_name_attribute_fprint\";\n\tsize_t value_string_size         = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_string_size > 0 )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t\t          attribute,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t\t          attribute,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tName\\t\\t\\t\\t: \" );\n\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     value_string,\n\t\t     value_string_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a file entry value\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint info_handle_file_entry_value_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *file_entry_name  = NULL;\n\tuint8_t *security_descriptor_data    = NULL;\n\tstatic char *function                = \"info_handle_file_entry_value_fprint\";\n\tsize64_t size                        = 0;\n\tsize_t file_entry_name_size          = 0;\n\tuint64_t access_time                 = 0;\n\tuint64_t creation_time               = 0;\n\tuint64_t entry_modification_time     = 0;\n\tuint64_t file_reference              = 0;\n\tuint64_t modification_time           = 0;\n\tuint64_t parent_file_reference       = 0;\n\tuint32_t file_attribute_flags        = 0;\n\tint result                           = 0;\n\n#ifdef TODO\n\tsize_t security_descriptor_data_size = 0;\n#endif\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_file_reference(\n\t     file_entry,\n\t     &file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFile reference\\t\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t file_reference & 0xffffffffffffUL,\n\t file_reference >> 48 );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( result == 1 )\n\t && ( file_entry_name_size > 0 ) )\n\t{\n\t\tfile_entry_name = system_string_allocate(\n\t\t                   file_entry_name_size );\n\n\t\tif( file_entry_name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_entry_get_utf16_name(\n\t\t          file_entry,\n\t\t          (uint16_t *) file_entry_name,\n\t\t          file_entry_name_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_entry_get_utf8_name(\n\t\t          file_entry,\n\t\t          (uint8_t *) file_entry_name,\n\t\t          file_entry_name_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tName\\t\\t\\t\\t: \" );\n\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     file_entry_name,\n\t\t     file_entry_name_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          file_entry,\n\t          &parent_file_reference,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tParent file reference\\t\\t: \" );\n\n\t\tif( parent_file_reference == 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"Not set (0)\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"%\" PRIu64 \"-%\" PRIu64 \"\",\n\t\t\t parent_file_reference & 0xffffffffffffUL,\n\t\t\t parent_file_reference >> 48 );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n\tif( libfsntfs_file_entry_get_size(\n\t     file_entry,\n\t     &size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tSize\\t\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t size );\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( info_handle_filetime_value_fprint(\n\t\t     info_handle,\n\t\t     \"\\tCreation time\\t\\t\\t\",\n\t\t     creation_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( info_handle_filetime_value_fprint(\n\t\t     info_handle,\n\t\t     \"\\tModification time\\t\\t\",\n\t\t     modification_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( info_handle_filetime_value_fprint(\n\t\t     info_handle,\n\t\t     \"\\tAccess time\\t\\t\\t\",\n\t\t     access_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( info_handle_filetime_value_fprint(\n\t\t     info_handle,\n\t\t     \"\\tEntry modification time\\t\\t\",\n\t\t     entry_modification_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tFile attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t file_attribute_flags );\n\t\tinfo_handle_file_attribute_flags_fprint(\n\t\t file_attribute_flags,\n\t\t info_handle->notify_stream );\n\t}\n#ifdef TODO\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          file_entry,\n\t          &security_descriptor_data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tsecurity_descriptor_data = (uint8_t *) memory_allocate(\n\t\t                                        sizeof( uint8_t ) * security_descriptor_data_size );\n\n\t\tif( security_descriptor_data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create security descriptor data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_entry_get_security_descriptor(\n\t\t     file_entry,\n\t\t     security_descriptor_data,\n\t\t     security_descriptor_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( info_handle_security_descriptor_fprint(\n\t\t     info_handle,\n\t\t     security_descriptor_data,\n\t\t     security_descriptor_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t security_descriptor_data );\n\n\t\tsecurity_descriptor_data = NULL;\n\t}\n#endif\n/* TODO print attributes + ADS ? */\n\n\tif( file_entry_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_name );\n\n\t\tfile_entry_name = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( security_descriptor_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t security_descriptor_data );\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_name );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a file entry or data stream name to a bodyfile\n * Returns 1 if successful or -1 on error\n */\nint info_handle_bodyfile_name_value_fprint(\n     info_handle_t *info_handle,\n     const system_character_t *value_string,\n     size_t value_string_length,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *escaped_value_string = NULL;\n\tstatic char *function                    = \"info_handle_bodyfile_name_value_fprint\";\n\tsize_t escaped_value_string_size         = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( bodyfile_path_string_copy_from_file_entry_path(\n\t     &escaped_value_string,\n\t     &escaped_value_string_size,\n\t     value_string,\n\t     value_string_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy path from file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( escaped_value_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing escaped value string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"%\" PRIs_SYSTEM \"\",\n\t escaped_value_string );\n\n\tmemory_free(\n\t escaped_value_string );\n\n\treturn( 1 );\n\non_error:\n\tif( escaped_value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t escaped_value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a $FILE_NAME attribute to a bodyfile\n * Returns 1 if successful or -1 on error\n */\nint info_handle_bodyfile_file_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     libcerror_error_t **error )\n{\n\tchar file_mode_string[ 11 ]      = { '-', 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x', 0 };\n\n\tstatic char *function            = \"info_handle_bodyfile_file_name_attribute_fprint\";\n\tsize64_t size                    = 0;\n\tuint64_t access_time             = 0;\n\tuint64_t creation_time           = 0;\n\tuint64_t entry_modification_time = 0;\n\tuint64_t file_reference          = 0;\n\tuint64_t modification_time       = 0;\n\tint64_t posix_access_time        = 0;\n\tint64_t posix_creation_time      = 0;\n\tint64_t posix_inode_change_time  = 0;\n\tint64_t posix_modification_time  = 0;\n\tuint32_t file_attribute_flags    = 0;\n\tuint32_t group_identifier        = 0;\n\tuint32_t owner_identifier        = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_file_reference(\n\t     file_entry,\n\t     &file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_creation_time(\n\t     attribute,\n\t     &creation_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_modification_time(\n\t     attribute,\n\t     &modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_access_time(\n\t     attribute,\n\t     &access_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_entry_modification_time(\n\t     attribute,\n\t     &entry_modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t     attribute,\n\t     &file_attribute_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_attribute_get_data_size(\n\t     attribute,\n\t     &size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_file_entry_is_symbolic_link(\n\t          file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is a symbolic link.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfile_mode_string[ 0 ] = 'l';\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t\t\t  file_entry,\n\t\t\t  error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tfile_mode_string[ 0 ] = 'd';\n\t\t}\n\t}\n\tif( ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t || ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 ) )\n\t{\n\t\tfile_mode_string[ 2 ] = '-';\n\t\tfile_mode_string[ 5 ] = '-';\n\t\tfile_mode_string[ 8 ] = '-';\n\t}\n\t/* Colums in a Sleuthkit 3.x and later bodyfile\n\t * MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime\n\t */\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"0|\" );\n\n\tif( path != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     path,\n\t\t     path_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print path string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     file_entry_name,\n\t\t     file_entry_name_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tposix_access_time       = (int64_t) access_time - 116444736000000000L;\n\tposix_creation_time     = (int64_t) creation_time - 116444736000000000L;\n\tposix_inode_change_time = (int64_t) entry_modification_time - 116444736000000000L;\n\tposix_modification_time = (int64_t) modification_time - 116444736000000000L;\n\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \" ($FILE_NAME)|%\" PRIu64 \"-%\" PRIu64 \"|%s|%\" PRIu32 \"|%\" PRIu32 \"|%\" PRIu64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"\\n\",\n\t file_reference & 0xffffffffffffUL,\n\t file_reference >> 48,\n\t file_mode_string,\n\t owner_identifier,\n\t group_identifier,\n\t size,\n\t posix_access_time / 10000000,\n\t posix_access_time - ( ( posix_access_time / 10000000 ) * 10000000 ),\n\t posix_modification_time / 10000000,\n\t posix_modification_time - ( ( posix_modification_time / 10000000 ) * 10000000 ),\n\t posix_inode_change_time / 10000000,\n\t posix_inode_change_time - ( ( posix_inode_change_time / 10000000 ) * 10000000 ),\n\t posix_creation_time / 10000000,\n\t posix_creation_time - ( ( posix_creation_time / 10000000 ) * 10000000 ) );\n\n\treturn( 1 );\n}\n\n/* Prints a $I30 entry to a bodyfile\n * Returns 1 if successful or -1 on error\n */\nint info_handle_bodyfile_i30_entry_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     libcerror_error_t **error )\n{\n\tchar file_mode_string[ 11 ]      = { '-', 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x', 0 };\n\n\tstatic char *function            = \"info_handle_bodyfile_i30_entry_fprint\";\n\tsize64_t size                    = 0;\n\tuint64_t access_time             = 0;\n\tuint64_t creation_time           = 0;\n\tuint64_t entry_modification_time = 0;\n\tuint64_t file_reference          = 0;\n\tuint64_t modification_time       = 0;\n\tint64_t posix_access_time        = 0;\n\tint64_t posix_creation_time      = 0;\n\tint64_t posix_inode_change_time  = 0;\n\tint64_t posix_modification_time  = 0;\n\tuint32_t file_attribute_flags    = 0;\n\tuint32_t group_identifier        = 0;\n\tuint32_t owner_identifier        = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_file_entry_has_i30_entry(\n\t          file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry has a $I30 entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_file_reference(\n\t     file_entry,\n\t     &file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_creation_time(\n\t     file_entry,\n\t     &creation_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_modification_time(\n\t     file_entry,\n\t     &modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_access_time(\n\t     file_entry,\n\t     &access_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_entry_modification_time(\n\t     file_entry,\n\t     &entry_modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_file_attribute_flags(\n\t     file_entry,\n\t     &file_attribute_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_i30_size(\n\t     file_entry,\n\t     &size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_file_entry_is_symbolic_link(\n\t          file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is a symbolic link.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfile_mode_string[ 0 ] = 'l';\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t\t\t  file_entry,\n\t\t\t  error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tfile_mode_string[ 0 ] = 'd';\n\t\t}\n\t}\n\tif( ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t || ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 ) )\n\t{\n\t\tfile_mode_string[ 2 ] = '-';\n\t\tfile_mode_string[ 5 ] = '-';\n\t\tfile_mode_string[ 8 ] = '-';\n\t}\n\t/* Colums in a Sleuthkit 3.x and later bodyfile\n\t * MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime\n\t */\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"0|\" );\n\n\tif( path != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     path,\n\t\t     path_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print path string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     file_entry_name,\n\t\t     file_entry_name_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tposix_access_time       = (int64_t) access_time - 116444736000000000L;\n\tposix_creation_time     = (int64_t) creation_time - 116444736000000000L;\n\tposix_inode_change_time = (int64_t) entry_modification_time - 116444736000000000L;\n\tposix_modification_time = (int64_t) modification_time - 116444736000000000L;\n\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \" ($I30)|%\" PRIu64 \"-%\" PRIu64 \"|%s|%\" PRIu32 \"|%\" PRIu32 \"|%\" PRIu64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"\\n\",\n\t file_reference & 0xffffffffffffUL,\n\t file_reference >> 48,\n\t file_mode_string,\n\t owner_identifier,\n\t group_identifier,\n\t size,\n\t posix_access_time / 10000000,\n\t posix_access_time - ( ( posix_access_time / 10000000 ) * 10000000 ),\n\t posix_modification_time / 10000000,\n\t posix_modification_time - ( ( posix_modification_time / 10000000 ) * 10000000 ),\n\t posix_inode_change_time / 10000000,\n\t posix_inode_change_time - ( ( posix_inode_change_time / 10000000 ) * 10000000 ),\n\t posix_creation_time / 10000000,\n\t posix_creation_time - ( ( posix_creation_time / 10000000 ) * 10000000 ) );\n\n\treturn( 1 );\n}\n\n/* Prints a $INDEX_ROOT attribute to a bodyfile\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint info_handle_bodyfile_index_root_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     const system_character_t *attribute_name,\n     size_t attribute_name_size,\n     libcerror_error_t **error )\n{\n\tchar file_mode_string[ 11 ]              = { '-', 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x', 0 };\n\n\tsystem_character_t *symbolic_link_target = NULL;\n\tstatic char *function                    = \"info_handle_bodyfile_index_root_attribute_fprint\";\n\tsize64_t size                            = 0;\n\tsize_t symbolic_link_target_length       = 0;\n\tsize_t symbolic_link_target_size         = 0;\n\tuint64_t access_time                     = 0;\n\tuint64_t creation_time                   = 0;\n\tuint64_t entry_modification_time         = 0;\n\tuint64_t file_reference                  = 0;\n\tuint64_t modification_time               = 0;\n\tint64_t posix_access_time                = 0;\n\tint64_t posix_creation_time              = 0;\n\tint64_t posix_inode_change_time          = 0;\n\tint64_t posix_modification_time          = 0;\n\tuint32_t file_attribute_flags            = 0;\n\tuint32_t group_identifier                = 0;\n\tuint32_t owner_identifier                = 0;\n\tint result                               = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_file_reference(\n\t     file_entry,\n\t     &file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &symbolic_link_target_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &symbolic_link_target_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve symbolic link target string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tsymbolic_link_target = system_string_allocate(\n\t\t                        symbolic_link_target_size );\n\n\t\tif( symbolic_link_target == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create symbolic link target string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t\t          file_entry,\n\t\t          (uint16_t *) symbolic_link_target,\n\t\t          symbolic_link_target_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t\t          file_entry,\n\t\t          (uint8_t *) symbolic_link_target,\n\t\t          symbolic_link_target_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve symbolic link target string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsymbolic_link_target_length = symbolic_link_target_size - 1;\n\t}\n\tif( libfsntfs_attribute_get_data_size(\n\t     attribute,\n\t     &size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_is_symbolic_link(\n\t          file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is a symbolic link.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfile_mode_string[ 0 ] = 'l';\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t\t\t  file_entry,\n\t\t\t  error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tfile_mode_string[ 0 ] = 'd';\n\t\t}\n\t}\n\tif( ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t || ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 ) )\n\t{\n\t\tfile_mode_string[ 2 ] = '-';\n\t\tfile_mode_string[ 5 ] = '-';\n\t\tfile_mode_string[ 8 ] = '-';\n\t}\n\t/* Colums in a Sleuthkit 3.x and later bodyfile\n\t * MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime\n\t */\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"0|\" );\n\n\tif( path != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     path,\n\t\t     path_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print path string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     file_entry_name,\n\t\t     file_entry_name_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( ( attribute_name != NULL )\n         && ( ( attribute_name_size != 5 )\n\t  ||  ( narrow_string_compare(\n\t       attribute_name,\n\t       \"$I30\",\n\t       4 ) != 0 ) ) )\n\t{\n\t\tfprintf(\n\t\t info_handle->bodyfile_stream,\n\t\t \":%\" PRIs_SYSTEM \"\",\n\t\t attribute_name );\n\t}\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->bodyfile_stream,\n\t\t \" -> \" );\n\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     symbolic_link_target,\n\t\t     symbolic_link_target_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tposix_access_time       = (int64_t) access_time - 116444736000000000L;\n\tposix_creation_time     = (int64_t) creation_time - 116444736000000000L;\n\tposix_inode_change_time = (int64_t) entry_modification_time - 116444736000000000L;\n\tposix_modification_time = (int64_t) modification_time - 116444736000000000L;\n\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"|%\" PRIu64 \"-%\" PRIu64 \"|%s|%\" PRIu32 \"|%\" PRIu32 \"|%\" PRIu64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"\\n\",\n\t file_reference & 0xffffffffffffUL,\n\t file_reference >> 48,\n\t file_mode_string,\n\t owner_identifier,\n\t group_identifier,\n\t size,\n\t posix_access_time / 10000000,\n\t posix_access_time - ( ( posix_access_time / 10000000 ) * 10000000 ),\n\t posix_modification_time / 10000000,\n\t posix_modification_time - ( ( posix_modification_time / 10000000 ) * 10000000 ),\n\t posix_inode_change_time / 10000000,\n\t posix_inode_change_time - ( ( posix_inode_change_time / 10000000 ) * 10000000 ),\n\t posix_creation_time / 10000000,\n\t posix_creation_time - ( ( posix_creation_time / 10000000 ) * 10000000 ) );\n\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tmemory_free(\n\t\t symbolic_link_target );\n\n\t\tsymbolic_link_target = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tmemory_free(\n\t\t symbolic_link_target );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a file entry value to a bodyfile\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint info_handle_bodyfile_file_entry_value_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_data_stream_t *alternate_data_stream,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     const system_character_t *data_stream_name,\n     libcerror_error_t **error )\n{\n\tchar md5_string[ DIGEST_HASH_STRING_SIZE_MD5 ] = {\n\t\t'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',\n\t\t'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',\n\t\t0 };\n\n\tchar file_mode_string[ 11 ]              = { '-', 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x', 0 };\n\n\tsystem_character_t *symbolic_link_target = NULL;\n\tstatic char *function                    = \"info_handle_bodyfile_file_entry_value_fprint\";\n\tsize64_t size                            = 0;\n\tsize_t symbolic_link_target_length       = 0;\n\tsize_t symbolic_link_target_size         = 0;\n\tuint64_t access_time                     = 0;\n\tuint64_t creation_time                   = 0;\n\tuint64_t entry_modification_time         = 0;\n\tuint64_t file_reference                  = 0;\n\tuint64_t mft_entry_index                 = 0;\n\tuint64_t modification_time               = 0;\n\tint64_t posix_access_time                = 0;\n\tint64_t posix_creation_time              = 0;\n\tint64_t posix_inode_change_time          = 0;\n\tint64_t posix_modification_time          = 0;\n\tuint32_t file_attribute_flags            = 0;\n\tuint32_t group_identifier                = 0;\n\tuint32_t owner_identifier                = 0;\n\tint has_default_data_stream              = 0;\n\tint result                               = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_file_reference(\n\t     file_entry,\n\t     &file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmft_entry_index = file_reference & 0xffffffffffffUL;\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &symbolic_link_target_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &symbolic_link_target_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve symbolic link target string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tsymbolic_link_target = system_string_allocate(\n\t\t                        symbolic_link_target_size );\n\n\t\tif( symbolic_link_target == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create symbolic link target string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t\t          file_entry,\n\t\t          (uint16_t *) symbolic_link_target,\n\t\t          symbolic_link_target_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t\t          file_entry,\n\t\t          (uint8_t *) symbolic_link_target,\n\t\t          symbolic_link_target_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve symbolic link target string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsymbolic_link_target_length = symbolic_link_target_size - 1;\n\t}\n\tif( alternate_data_stream != NULL )\n\t{\n\t\tif( libfsntfs_data_stream_get_size(\n\t\t     alternate_data_stream,\n\t\t     &size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_file_entry_get_size(\n\t\t     file_entry,\n\t\t     &size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t\t  file_entry,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\thas_default_data_stream = result;\n\n\tresult = libfsntfs_file_entry_is_symbolic_link(\n\t          file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is a symbolic link.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfile_mode_string[ 0 ] = 'l';\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t\t\t  file_entry,\n\t\t\t  error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tfile_mode_string[ 0 ] = 'd';\n\t\t}\n\t}\n\tif( ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t || ( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 ) )\n\t{\n\t\tfile_mode_string[ 2 ] = '-';\n\t\tfile_mode_string[ 5 ] = '-';\n\t\tfile_mode_string[ 8 ] = '-';\n\t}\n\tif( ( info_handle->calculate_md5 == 0 )\n\t || ( has_default_data_stream == 0 ) )\n\t{\n\t\tmd5_string[ 1 ] = 0;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tif( info_handle_file_entry_calculate_md5(\n\t\t     info_handle,\n\t\t     file_entry,\n\t\t     md5_string,\n\t\t     DIGEST_HASH_STRING_SIZE_MD5,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"Error calculating MD5 of MFT entry: %\" PRIu64 \"\\n\",\n\t\t\t mft_entry_index );\n\n\t\t\tif( ( error != NULL )\n\t\t\t && ( *error != NULL ) )\n\t\t\t{\n\t\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t\t *error );\n\t\t\t}\n\t\t\tlibcerror_error_free(\n\t\t\t error );\n\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\n\" );\n\t\t}\n\t}\n\t/* Colums in a Sleuthkit 3.x and later bodyfile\n\t * MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime\n\t */\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"%s|\",\n\t md5_string );\n\n\tif( path != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     path,\n\t\t     path_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print path string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     file_entry_name,\n\t\t     file_entry_name_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( data_stream_name != NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->bodyfile_stream,\n\t\t \":%\" PRIs_SYSTEM \"\",\n\t\t data_stream_name );\n\t}\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->bodyfile_stream,\n\t\t \" -> \" );\n\n\t\tif( info_handle_bodyfile_name_value_fprint(\n\t\t     info_handle,\n\t\t     symbolic_link_target,\n\t\t     symbolic_link_target_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tposix_access_time       = (int64_t) access_time - 116444736000000000L;\n\tposix_creation_time     = (int64_t) creation_time - 116444736000000000L;\n\tposix_inode_change_time = (int64_t) entry_modification_time - 116444736000000000L;\n\tposix_modification_time = (int64_t) modification_time - 116444736000000000L;\n\n\tfprintf(\n\t info_handle->bodyfile_stream,\n\t \"|%\" PRIu64 \"-%\" PRIu64 \"|%s|%\" PRIu32 \"|%\" PRIu32 \"|%\" PRIu64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"|%\" PRIi64 \".%07\" PRIi64 \"\\n\",\n\t mft_entry_index,\n\t file_reference >> 48,\n\t file_mode_string,\n\t owner_identifier,\n\t group_identifier,\n\t size,\n\t posix_access_time / 10000000,\n\t posix_access_time - ( ( posix_access_time / 10000000 ) * 10000000 ),\n\t posix_modification_time / 10000000,\n\t posix_modification_time - ( ( posix_modification_time / 10000000 ) * 10000000 ),\n\t posix_inode_change_time / 10000000,\n\t posix_inode_change_time - ( ( posix_inode_change_time / 10000000 ) * 10000000 ),\n\t posix_creation_time / 10000000,\n\t posix_creation_time - ( ( posix_creation_time / 10000000 ) * 10000000 ) );\n\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tmemory_free(\n\t\t symbolic_link_target );\n\n\t\tsymbolic_link_target = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( symbolic_link_target != NULL )\n\t{\n\t\tmemory_free(\n\t\t symbolic_link_target );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the MFT entry to a bodyfile\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint info_handle_bodyfile_mft_entry_fprint(\n     info_handle_t *info_handle,\n     uint64_t mft_entry_index,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute    = NULL;\n\tlibfsntfs_file_entry_t *file_entry  = NULL;\n\tsystem_character_t *path_hint       = NULL;\n\tstatic char *function               = \"info_handle_bodyfile_mft_entry_fprint\";\n\tsize_t path_hint_size               = 0;\n\tuint64_t base_record_file_reference = 0;\n\tuint32_t attribute_type             = 0;\n\tint attribute_index                 = 0;\n\tint is_empty                        = 0;\n\tint number_of_attributes            = 0;\n\tint result                          = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_file_entry_by_index(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          mft_entry_index,\n\t\t          &file_entry,\n\t\t          error );\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t\t          info_handle->input_volume,\n\t\t          mft_entry_index,\n\t\t          &file_entry,\n\t\t          error );\n\t}\n\tif( result != 1 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"Error reading MFT entry: %\" PRIu64 \"\\n\",\n\t\t mft_entry_index );\n\n\t\tif( ( error != NULL )\n\t\t && ( *error != NULL ) )\n\t\t{\n\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t *error );\n\t\t}\n\t\tlibcerror_error_free(\n\t\t error );\n\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\treturn( 0 );\n\t}\n\tis_empty = libfsntfs_file_entry_is_empty(\n\t            file_entry,\n\t            error );\n\n\tif( is_empty == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is empty.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( is_empty == 0 )\n\t{\n\t\tif( libfsntfs_file_entry_get_base_record_file_reference(\n\t\t     file_entry,\n\t\t     &base_record_file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( base_record_file_reference == 0 )\n\t\t{\n\t\t\tif( libfsntfs_file_entry_get_number_of_attributes(\n\t\t\t     file_entry,\n\t\t\t     &number_of_attributes,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfor( attribute_index = 0;\n\t\t\t     attribute_index < number_of_attributes;\n\t\t\t     attribute_index++ )\n\t\t\t{\n\t\t\t\tif( libfsntfs_file_entry_get_attribute_by_index(\n\t\t\t\t     file_entry,\n\t\t\t\t     attribute_index,\n\t\t\t\t     &attribute,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_attribute_get_type(\n\t\t\t\t     attribute,\n\t\t\t\t     &attribute_type,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve attribute type.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t\t\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\t\t\tresult = libfsntfs_file_entry_get_utf16_path_hint_size(\n\t\t\t\t\t          file_entry,\n\t\t\t\t\t          attribute_index,\n\t\t\t\t\t          &path_hint_size,\n\t\t\t\t\t          error );\n#else\n\t\t\t\t\tresult = libfsntfs_file_entry_get_utf8_path_hint_size(\n\t\t\t\t\t          file_entry,\n\t\t\t\t\t          attribute_index,\n\t\t\t\t\t          &path_hint_size,\n\t\t\t\t\t          error );\n#endif\n\t\t\t\t\tif( result == -1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve path hint string size.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tif( ( result != 0 )\n\t\t\t\t\t && ( path_hint_size > 0 ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tpath_hint = system_string_allocate(\n\t\t\t\t\t\t             path_hint_size );\n\n\t\t\t\t\t\tif( path_hint == NULL )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t\t\t\t \"%s: unable to create path hint string.\",\n\t\t\t\t\t\t\t function );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\t\t\t\tresult = libfsntfs_file_entry_get_utf16_path_hint(\n\t\t\t\t\t\t          file_entry,\n\t\t\t\t\t\t          attribute_index,\n\t\t\t\t\t\t          (uint16_t *) path_hint,\n\t\t\t\t\t\t          path_hint_size,\n\t\t\t\t\t\t          error );\n#else\n\t\t\t\t\t\tresult = libfsntfs_file_entry_get_utf8_path_hint(\n\t\t\t\t\t\t          file_entry,\n\t\t\t\t\t\t          attribute_index,\n\t\t\t\t\t\t          (uint8_t *) path_hint,\n\t\t\t\t\t\t          path_hint_size,\n\t\t\t\t\t\t          error );\n#endif\n\t\t\t\t\t\tif( result != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to retrieve path hint string.\",\n\t\t\t\t\t\t\t function );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( info_handle_file_entry_fprint(\n\t\t\t\t\t     info_handle,\n\t\t\t\t\t     file_entry,\n\t\t\t\t\t     attribute,\n\t\t\t\t\t     path_hint,\n\t\t\t\t\t     NULL,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t\t \"%s: unable to print file entry.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tif( path_hint != NULL )\n\t\t\t\t\t{\n\t\t\t\t\t\tmemory_free(\n\t\t\t\t\t\t path_hint );\n\n\t\t\t\t\t\tpath_hint = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_attribute_free(\n\t\t\t\t     &attribute,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free attribute: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif( libfsntfs_file_entry_free(\n\t     &file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( path_hint != NULL )\n\t{\n\t\tmemory_free(\n\t\t path_hint );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_attribute_free(\n\t\t &attribute,\n\t\t NULL );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints file entry as part of the file system hierarchy or to a bodyfile\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_entry_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *file_name_attribute,\n     const system_character_t *path,\n     const system_character_t *file_entry_name,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute               = NULL;\n\tlibfsntfs_data_stream_t *alternate_data_stream = NULL;\n\tsystem_character_t *attribute_name             = NULL;\n\tsystem_character_t *data_stream_name           = NULL;\n\tstatic char *function                          = \"info_handle_file_entry_fprint\";\n\tsize_t attribute_name_size                     = 0;\n\tsize_t data_stream_name_size                   = 0;\n\tsize_t file_entry_name_length                  = 0;\n\tsize_t path_length                             = 0;\n\tuint32_t attribute_type                        = 0;\n\tint alternate_data_stream_index                = 0;\n\tint attribute_index                            = 0;\n\tint has_default_data_stream                    = 0;\n\tint has_index_root_attributes                  = 0;\n\tint number_of_alternate_data_streams           = 0;\n\tint number_of_attributes                       = 0;\n\tint result                                     = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tpath_length = system_string_length(\n\t               path );\n\n\tif( file_entry_name != NULL )\n\t{\n\t\tfile_entry_name_length = system_string_length(\n\t\t                          file_entry_name );\n\t}\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t\t  file_entry,\n\t\t  error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\thas_default_data_stream = result;\n\n\tif( libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t     file_entry,\n\t     &number_of_alternate_data_streams,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of alternate data streams.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_entry_get_number_of_attributes(\n\t     file_entry,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( attribute_index = 0;\n\t     attribute_index < number_of_attributes;\n\t     attribute_index++ )\n\t{\n\t\tif( libfsntfs_file_entry_get_attribute_by_index(\n\t\t     file_entry,\n\t\t     attribute_index,\n\t\t     &attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_attribute_get_type(\n\t\t     attribute,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT )\n\t\t{\n\t\t\t/* Mimic Sleuthkit behavior printing indexes\n\t\t\t */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t\t\t          attribute,\n\t\t\t          &attribute_name_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t\t\t          attribute,\n\t\t\t          &attribute_name_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute name string size.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_name_size > 0 )\n\t\t\t{\n\t\t\t\tattribute_name = system_string_allocate(\n\t\t\t\t                  attribute_name_size );\n\n\t\t\t\tif( attribute_name == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t\t \"%s: unable to create name string.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\t\tresult = libfsntfs_attribute_get_utf16_name(\n\t\t\t\t          attribute,\n\t\t\t\t          (uint16_t *) attribute_name,\n\t\t\t\t          attribute_name_size,\n\t\t\t\t          error );\n#else\n\t\t\t\tresult = libfsntfs_attribute_get_utf8_name(\n\t\t\t\t          attribute,\n\t\t\t\t          (uint8_t *) attribute_name,\n\t\t\t\t          attribute_name_size,\n\t\t\t\t          error );\n#endif\n\t\t\t\tif( result != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve attribute name string.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( info_handle->bodyfile_stream != NULL )\n\t\t\t{\n\t\t\t\tif( info_handle_bodyfile_index_root_attribute_fprint(\n\t\t\t\t     info_handle,\n\t\t\t\t     file_entry,\n\t\t\t\t     attribute,\n\t\t\t\t     path,\n\t\t\t\t     path_length,\n\t\t\t\t     file_entry_name,\n\t\t\t\t     file_entry_name_length,\n\t\t\t\t     attribute_name,\n\t\t\t\t     attribute_name_size,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t \"%s: unable to print file entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t     info_handle,\n\t\t\t\t     path,\n\t\t\t\t     path_length,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t \"%s: unable to print path string.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( file_entry_name != NULL )\n\t\t\t\t{\n\t\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t\t     info_handle,\n\t\t\t\t\t     file_entry_name,\n\t\t\t\t\t     file_entry_name_length,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( ( attribute_name != NULL )\n\t\t\t\t && ( ( attribute_name_size != 5 )\n\t\t\t\t  ||  ( narrow_string_compare(\n\t\t\t\t       attribute_name,\n\t\t\t\t       \"$I30\",\n\t\t\t\t       4 ) != 0 ) ) )\n\t\t\t\t{\n\t\t\t\t\tfprintf(\n\t\t\t\t\t info_handle->notify_stream,\n\t\t\t\t\t \":%\" PRIs_SYSTEM \"\",\n\t\t\t\t\t attribute_name );\n\t\t\t\t}\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"\\n\" );\n\t\t\t}\n\t\t\tif( attribute_name != NULL )\n\t\t\t{\n\t\t\t\tmemory_free(\n\t\t\t\t attribute_name );\n\n\t\t\t\tattribute_name = NULL;\n\t\t\t}\n\t\t\thas_index_root_attributes = 1;\n\t\t}\n\t\tif( libfsntfs_attribute_free(\n\t\t     &attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\t/* Do not print the name of file entries that have an ADS but no default data stream\n\t * and file entries that have $INDEX_ROOT attributes.\n\t */\n\tif( ( has_index_root_attributes == 0 )\n\t && ( ( has_default_data_stream != 0 )\n\t  ||  ( number_of_alternate_data_streams == 0 ) ) )\n\t{\n\t\tif( info_handle->bodyfile_stream != NULL )\n\t\t{\n\t\t\tif( info_handle_bodyfile_file_entry_value_fprint(\n\t\t\t     info_handle,\n\t\t\t     file_entry,\n\t\t\t     NULL,\n\t\t\t     path,\n\t\t\t     path_length,\n\t\t\t     file_entry_name,\n\t\t\t     file_entry_name_length,\n\t\t\t     NULL,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print file entry.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( info_handle_name_value_fprint(\n\t\t\t     info_handle,\n\t\t\t     path,\n\t\t\t     path_length,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print path string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( file_entry_name != NULL )\n\t\t\t{\n\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t     info_handle,\n\t\t\t\t     file_entry_name,\n\t\t\t\t     file_entry_name_length,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\n\" );\n\t\t}\n\t}\n\tfor( alternate_data_stream_index = 0;\n\t     alternate_data_stream_index < number_of_alternate_data_streams;\n\t     alternate_data_stream_index++ )\n\t{\n\t\tif( libfsntfs_file_entry_get_alternate_data_stream_by_index(\n\t\t     file_entry,\n\t\t     alternate_data_stream_index,\n\t\t     &alternate_data_stream,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve alternate data stream: %d.\",\n\t\t\t function,\n\t\t\t alternate_data_stream_index );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t\t          alternate_data_stream,\n\t\t          &data_stream_name_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t\t          alternate_data_stream,\n\t\t          &data_stream_name_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve alternate data stream: %d name string size.\",\n\t\t\t function,\n\t\t\t alternate_data_stream_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( data_stream_name_size > 0 )\n\t\t{\n\t\t\tdata_stream_name = system_string_allocate(\n\t\t\t                    data_stream_name_size );\n\n\t\t\tif( data_stream_name == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create alternate data stream: %d name string.\",\n\t\t\t\t function,\n\t\t\t\t alternate_data_stream_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_data_stream_get_utf16_name(\n\t\t\t\t  alternate_data_stream,\n\t\t\t\t  (uint16_t *) data_stream_name,\n\t\t\t\t  data_stream_name_size,\n\t\t\t\t  error );\n#else\n\t\t\tresult = libfsntfs_data_stream_get_utf8_name(\n\t\t\t\t  alternate_data_stream,\n\t\t\t\t  (uint8_t *) data_stream_name,\n\t\t\t\t  data_stream_name_size,\n\t\t\t\t  error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve alternate data stream: %d name string.\",\n\t\t\t\t function,\n\t\t\t\t alternate_data_stream_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle->bodyfile_stream != NULL )\n\t\t\t{\n\t\t\t\tif( info_handle_bodyfile_file_entry_value_fprint(\n\t\t\t\t     info_handle,\n\t\t\t\t     file_entry,\n\t\t\t\t     alternate_data_stream,\n\t\t\t\t     path,\n\t\t\t\t     path_length,\n\t\t\t\t     file_entry_name,\n\t\t\t\t     file_entry_name_length,\n\t\t\t\t     data_stream_name,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t \"%s: unable to print file entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t     info_handle,\n\t\t\t\t     path,\n\t\t\t\t     path_length,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t \"%s: unable to print path string.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( file_entry_name != NULL )\n\t\t\t\t{\n\t\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t\t     info_handle,\n\t\t\t\t\t     file_entry_name,\n\t\t\t\t\t     file_entry_name_length,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t\t \"%s: unable to print file entry name string.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tfprintf(\n\t\t\t\t\t info_handle->notify_stream,\n\t\t\t\t\t \":\" );\n\n\t\t\t\t\tif( info_handle_name_value_fprint(\n\t\t\t\t\t     info_handle,\n\t\t\t\t\t     data_stream_name,\n\t\t\t\t\t     data_stream_name_size - 1,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t\t \"%s: unable to print data stream name string.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfprintf(\n\t\t\t\t info_handle->notify_stream,\n\t\t\t\t \"\\n\" );\n\t\t\t}\n\t\t\tmemory_free(\n\t\t\t data_stream_name );\n\n\t\t\tdata_stream_name = NULL;\n\t\t}\n\t\tif( libfsntfs_data_stream_free(\n\t\t     &alternate_data_stream,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free alternate data stream: %d.\",\n\t\t\t function,\n\t\t\t alternate_data_stream );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( info_handle->bodyfile_stream != NULL )\n\t{\n\t\tif( file_name_attribute != NULL )\n\t\t{\n\t\t\tif( info_handle_bodyfile_file_name_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     file_entry,\n\t\t\t     file_name_attribute,\n\t\t\t     path,\n\t\t\t     path_length,\n\t\t\t     file_entry_name,\n\t\t\t     file_entry_name_length,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print $FILE_NAME attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( info_handle_bodyfile_i30_entry_fprint(\n\t\t     info_handle,\n\t\t     file_entry,\n\t\t     path,\n\t\t     path_length,\n\t\t     file_entry_name,\n\t\t     file_entry_name_length,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print $I30 entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_attribute_free(\n\t\t &attribute,\n\t\t NULL );\n\t}\n\tif( data_stream_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t data_stream_name );\n\t}\n\tif( alternate_data_stream != NULL )\n\t{\n\t\tlibfsntfs_data_stream_free(\n\t\t &alternate_data_stream,\n\t\t NULL );\n\t}\n\tif( attribute_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t attribute_name );\n\t}\n\treturn( -1 );\n}\n\n/* Prints file entry information as part of the file system hierarchy\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_system_hierarchy_fprint_file_entry(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     const system_character_t *path,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *file_name_attribute = NULL;\n\tlibfsntfs_file_entry_t *sub_file_entry     = NULL;\n\tsystem_character_t *file_entry_name        = NULL;\n\tsystem_character_t *sub_path               = NULL;\n\tstatic char *function                      = \"info_handle_file_system_hierarchy_fprint_file_entry\";\n\tsize_t file_entry_name_size                = 0;\n\tsize_t path_length                         = 0;\n\tsize_t sub_path_size                       = 0;\n\tint name_attribute_index                   = 0;\n\tint number_of_sub_file_entries             = 0;\n\tint result                                 = 0;\n\tint sub_file_entry_index                   = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tpath_length = system_string_length(\n\t               path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( result == 1 )\n\t && ( file_entry_name_size > 0 ) )\n\t{\n\t\tfile_entry_name = system_string_allocate(\n\t\t                   file_entry_name_size );\n\n\t\tif( file_entry_name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_file_entry_get_utf16_name(\n\t\t          file_entry,\n\t\t          (uint16_t *) file_entry_name,\n\t\t          file_entry_name_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_file_entry_get_utf8_name(\n\t\t          file_entry,\n\t\t          (uint8_t *) file_entry_name,\n\t\t          file_entry_name_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file entry name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( info_handle->bodyfile_stream != NULL )\n\t{\n\t\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t\t          file_entry,\n\t\t          &name_attribute_index,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name attribute index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tif( libfsntfs_file_entry_get_attribute_by_index(\n\t\t\t     file_entry,\n\t\t\t     name_attribute_index,\n\t\t\t     &file_name_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve $FILE_NAME attribute: %d.\",\n\t\t\t\t function,\n\t\t\t\t name_attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( ( info_handle->bodyfile_stream != NULL )\n\t || ( file_entry_name != NULL ) )\n\t{\n\t\tif( info_handle_file_entry_fprint(\n\t\t     info_handle,\n\t\t     file_entry,\n\t\t     file_name_attribute,\n\t\t     path,\n\t\t     file_entry_name,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print file entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_name_attribute != NULL )\n\t{\n\t\tif( libfsntfs_attribute_free(\n\t\t     &file_name_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free attribute: %d.\",\n\t\t\t function,\n\t\t\t name_attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t     file_entry,\n\t     &number_of_sub_file_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( number_of_sub_file_entries > 0 )\n\t{\n\t\tsub_path_size = path_length + 1;\n\n\t\tif( file_entry_name != NULL )\n\t\t{\n\t\t\tsub_path_size += file_entry_name_size;\n\t\t}\n\t\tsub_path = system_string_allocate(\n\t\t            sub_path_size );\n\n\t\tif( sub_path == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create sub path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( system_string_copy(\n\t\t     sub_path,\n\t\t     path,\n\t\t     path_length ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy path to sub path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( file_entry_name != NULL )\n\t\t{\n\t\t\tif( system_string_copy(\n\t\t\t     &( sub_path[ path_length ] ),\n\t\t\t     file_entry_name,\n\t\t\t     file_entry_name_size - 1 ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy file entry name to sub path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tsub_path[ sub_path_size - 2 ] = (system_character_t) LIBFSNTFS_SEPARATOR;\n\t\t}\n\t\tsub_path[ sub_path_size - 1 ] = (system_character_t) 0;\n\n\t\tfor( sub_file_entry_index = 0;\n\t\t     sub_file_entry_index < number_of_sub_file_entries;\n\t\t     sub_file_entry_index++ )\n\t\t{\n\t\t\tif( libfsntfs_file_entry_get_sub_file_entry_by_index(\n\t\t\t     file_entry,\n\t\t\t     sub_file_entry_index,\n\t\t\t     &sub_file_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve sub file entry: %d.\",\n\t\t\t\t function,\n\t\t\t\t sub_file_entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_file_system_hierarchy_fprint_file_entry(\n\t\t\t     info_handle,\n\t\t\t     sub_file_entry,\n\t\t\t     sub_path,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print file entry: %d information.\",\n\t\t\t\t function,\n\t\t\t\t sub_file_entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_file_entry_free(\n\t\t\t     &sub_file_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free sub file entry: %d.\",\n\t\t\t\t function,\n\t\t\t\t sub_file_entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( sub_path != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t sub_path );\n\n\t\t\tsub_path = NULL;\n\t\t}\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_name );\n\n\t\tfile_entry_name = NULL;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( sub_file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &sub_file_entry,\n\t\t NULL );\n\t}\n\tif( sub_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t sub_path );\n\t}\n\tif( file_name_attribute != NULL )\n\t{\n\t\tlibfsntfs_attribute_free(\n\t\t &file_name_attribute,\n\t\t NULL );\n\t}\n\tif( file_entry_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_name );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the MFT entry information\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint info_handle_mft_entry_fprint(\n     info_handle_t *info_handle,\n     uint64_t mft_entry_index,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute    = NULL;\n\tlibfsntfs_file_entry_t *file_entry  = NULL;\n\tstatic char *function               = \"info_handle_mft_entry_fprint\";\n\tuint64_t base_record_file_reference = 0;\n\tuint64_t value_64bit                = 0;\n\tint attribute_index                 = 0;\n\tint is_allocated                    = 0;\n\tint is_corrupted                    = 0;\n\tint is_empty                        = 0;\n\tint number_of_attributes            = 0;\n\tint result                          = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_file_entry_by_index(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          mft_entry_index,\n\t\t          &file_entry,\n\t\t          error );\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t\t          info_handle->input_volume,\n\t\t          mft_entry_index,\n\t\t          &file_entry,\n\t\t          error );\n\t}\n\tif( result != 1 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"Error reading MFT entry: %\" PRIu64 \"\\n\",\n\t\t mft_entry_index );\n\n\t\tif( ( error != NULL )\n\t\t && ( *error != NULL ) )\n\t\t{\n\t\t\tlibcnotify_print_error_backtrace(\n\t\t\t *error );\n\t\t}\n\t\tlibcerror_error_free(\n\t\t error );\n\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\treturn( 0 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"MFT entry: %\" PRIu64 \" information:\\n\",\n\t mft_entry_index );\n\n\tis_empty = libfsntfs_file_entry_is_empty(\n\t            file_entry,\n\t            error );\n\n\tif( is_empty == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry is empty.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( is_empty != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tIs empty\\n\" );\n\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n\telse\n\t{\n\t\tis_allocated = libfsntfs_file_entry_is_allocated(\n\t\t                file_entry,\n\t\t                error );\n\n\t\tif( is_allocated == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry is allocated.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tIs allocated\\t\\t\\t: \" );\n\n\t\tif( is_allocated == 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"false\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"true\" );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tif( libfsntfs_file_entry_get_file_reference(\n\t\t     file_entry,\n\t\t     &value_64bit,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file reference.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tFile reference\\t\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t value_64bit & 0xffffffffffffUL,\n\t\t value_64bit >> 48 );\n\n\t\tif( libfsntfs_file_entry_get_base_record_file_reference(\n\t\t     file_entry,\n\t\t     &base_record_file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( base_record_file_reference == 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tBase record file reference\\t: Not set (0)\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tBase record file reference\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t\t base_record_file_reference & 0xffffffffffffUL,\n\t\t\t base_record_file_reference >> 48 );\n\t\t}\n\t\tif( libfsntfs_file_entry_get_journal_sequence_number(\n\t\t     file_entry,\n\t\t     &value_64bit,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve journal sequence number.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tJournal sequence number\\t\\t: %\" PRIu64 \"\\n\",\n\t\t value_64bit );\n\n\t\tif( libfsntfs_file_entry_get_number_of_attributes(\n\t\t     file_entry,\n\t\t     &number_of_attributes,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tNumber of attributes\\t\\t: %d\\n\",\n\t\t number_of_attributes );\n\n\t\tis_corrupted = libfsntfs_file_entry_is_corrupted(\n\t\t                file_entry,\n\t\t                error );\n\n\t\tif( is_corrupted == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry is corrupted.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( is_corrupted != 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"\\tIs corrupted\\n\" );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\n\t\tfor( attribute_index = 0;\n\t\t     attribute_index < number_of_attributes;\n\t\t     attribute_index++ )\n\t\t{\n\t\t\tif( libfsntfs_file_entry_get_attribute_by_index(\n\t\t\t     file_entry,\n\t\t\t     attribute_index,\n\t\t\t     &attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_attribute_fprint(\n\t\t\t     info_handle,\n\t\t\t     file_entry,\n\t\t\t     attribute,\n\t\t\t     attribute_index,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print attribute: %d information.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_attribute_free(\n\t\t\t     &attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attribute: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( libfsntfs_file_entry_free(\n\t     &file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_attribute_free(\n\t\t &attribute,\n\t\t NULL );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the MFT entries information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_mft_entries_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"info_handle_mft_entries_fprint\";\n\tuint64_t file_entry_index       = 0;\n\tuint64_t number_of_file_entries = 0;\n\tint result                      = 0;\n\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          &number_of_file_entries,\n\t\t          error );\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t\t          info_handle->input_volume,\n\t\t          &number_of_file_entries,\n\t\t          error );\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( number_of_file_entries > (uint64_t) INT64_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid number of file entries value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( file_entry_index = 0;\n\t     file_entry_index < number_of_file_entries;\n\t     file_entry_index++ )\n\t{\n\t\tif( info_handle->bodyfile_stream != NULL )\n\t\t{\n\t\t\tresult = info_handle_bodyfile_mft_entry_fprint(\n\t\t\t          info_handle,\n\t\t\t          file_entry_index,\n\t\t\t          error );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = info_handle_mft_entry_fprint(\n\t\t\t          info_handle,\n\t\t\t          file_entry_index,\n\t\t\t          error );\n\t\t}\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t file_entry_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tfprintf(\n\t\t\t info_handle->notify_stream,\n\t\t\t \"Unable to print MFT entry: %\" PRIu64 \".\\n\\n\",\n\t\t\t file_entry_index );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Prints the file entry information for a specific path\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_entry_fprint_by_path(\n     info_handle_t *info_handle,\n     const system_character_t *path,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_file_entry_t *file_entry  = NULL;\n\tsystem_character_t *file_entry_path = NULL;\n\tstatic char *function               = \"info_handle_file_entry_fprint_by_path\";\n\tsize_t data_stream_name_index       = 0;\n\tsize_t data_stream_name_length      = 0;\n\tsize_t file_entry_path_length       = 0;\n\tsize_t file_entry_path_size         = 0;\n\tsize_t path_index                   = 0;\n\tsize_t path_length                  = 0;\n\tint result                          = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tpath_length = system_string_length(\n\t               path );\n\n\tfor( path_index = path_length - 1;\n\t     path_index > 0;\n\t     path_index-- )\n\t{\n\t\tif( path[ path_index ] == (system_character_t) ':' )\n\t\t{\n\t\t\tdata_stream_name_index = path_index + 1;\n\n\t\t\tbreak;\n\t\t}\n\t\telse if( path[ path_index ] == (system_character_t) LIBFSNTFS_SEPARATOR )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tdata_stream_name_length++;\n\t}\n\tif( data_stream_name_index > 0 )\n\t{\n\t\tpath_length -= data_stream_name_length + 1;\n\t}\n\tif( path_string_copy_to_file_entry_path(\n\t     path,\n\t     path_length,\n\t     LIBFSNTFS_SEPARATOR,\n\t     &file_entry_path,\n\t     &file_entry_path_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy path to file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* Need to determine length here since size is based on the worst case\n\t */\n\tfile_entry_path_length = system_string_length(\n\t                          file_entry_path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          info_handle->input_volume,\n\t          (uint16_t *) file_entry_path,\n\t          file_entry_path_length,\n\t          &file_entry,\n\t          error );\n#else\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          info_handle->input_volume,\n\t          (uint8_t *) file_entry_path,\n\t          file_entry_path_length,\n\t          &file_entry,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: file entry not found.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\tif( info_handle->bodyfile_stream == NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"New Technology File System information:\\n\\n\" );\n\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"File entry:\\n\" );\n\n/* TODO remove data stream name */\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tPath\\t\\t\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t path );\n\t}\n\tif( info_handle_file_entry_value_fprint(\n\t     info_handle,\n\t     file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_entry_free(\n\t     &file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\tif( file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_path );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the file system hierarchy information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_file_system_hierarchy_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tstatic char *function              = \"info_handle_file_system_hierarchy_fprint\";\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( info_handle->bodyfile_stream == NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"New Technology File System information:\\n\\n\" );\n\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"File system hierarchy:\\n\" );\n\t}\n\tif( libfsntfs_volume_get_root_directory(\n\t     info_handle->input_volume,\n\t     &file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve root directory file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_file_system_hierarchy_fprint_file_entry(\n\t     info_handle,\n\t     file_entry,\n\t     _SYSTEM_STRING( \"\\\\\" ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print root directory file entry information.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_entry_free(\n\t     &file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle->bodyfile_stream == NULL )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\n\" );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the USN change journal ($UsnJrnl) record update reason to the notify stream\n */\nvoid info_handle_usn_record_update_reason_flags_fprint(\n      uint32_t update_reason_flags,\n      FILE *notify_stream )\n{\n/* TODO add description */\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_DATA_OVERWRITE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_DATA_OVERWRITE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_DATA_EXTEND ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_DATA_EXTEND)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_DATA_TRUNCATION ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_DATA_TRUNCATION)\\n\" );\n\t}\n\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_NAMED_DATA_OVERWRITE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_NAMED_DATA_OVERWRITE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_NAMED_DATA_EXTEND ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_NAMED_DATA_EXTEND)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_NAMED_DATA_TRUNCATION ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_NAMED_DATA_TRUNCATION)\\n\" );\n\t}\n\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_FILE_CREATE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_FILE_CREATE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_FILE_DELETE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_FILE_DELETE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_EXTENDED_ATTRIBUTE_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_EA_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_SECURITY_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_SECURITY_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_RENAME_OLD_NAME ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_RENAME_OLD_NAME)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_RENAME_NEW_NAME ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_RENAME_NEW_NAME)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_INDEXABLE_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_INDEXABLE_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_BASIC_INFO_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_BASIC_INFO_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_HARD_LINK_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_HARD_LINK_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_COMPRESSION_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_COMPRESSION_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_ENCRYPTION_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_ENCRYPTION_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_OBJECT_IDENTIFIER_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_OBJECT_IDENTIFIER_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_REPARSE_POINT_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_REPARSE_POINT_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_STREAM_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_STREAM_CHANGE)\\n\" );\n\t}\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_TRANSACTED_CHANGE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_TRANSACTED_CHANGE)\\n\" );\n\t}\n\n\tif( ( update_reason_flags & LIBFUSN_UPDATE_REASON_FLAG_CLOSE ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_REASON_CLOSE)\\n\" );\n\t}\n}\n\n/* Prints the USN change journal ($UsnJrnl) record update source flags to the notify stream\n */\nvoid info_handle_usn_record_update_source_flags_fprint(\n      uint32_t update_source_flags,\n      FILE *notify_stream )\n{\n/* TODO add description */\n\tif( ( update_source_flags & LIBFUSN_UPDATE_SOURCE_FLAG_DATA_MANAGEMENT ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_SOURCE_DATA_MANAGEMENT)\\n\" );\n\t}\n\tif( ( update_source_flags & LIBFUSN_UPDATE_SOURCE_FLAG_AUXILIARY_DATA ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_SOURCE_AUXILIARY_DATA)\\n\" );\n\t}\n\tif( ( update_source_flags & LIBFUSN_UPDATE_SOURCE_FLAG_REPLICATION_MANAGEMENT ) != 0 )\n\t{\n\t\tfprintf(\n\t\t notify_stream,\n\t\t \"\\t\\t(USN_SOURCE_REPLICATION_MANAGEMENT)\\n\" );\n\t}\n}\n\n/* Prints the USN change journal ($UsnJrnl) record information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_usn_record_fprint(\n     info_handle_t *info_handle,\n     libfusn_record_t *usn_record,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *value_string = NULL;\n\tstatic char *function            = \"info_handle_usn_record_fprint\";\n\tsize_t value_string_size         = 0;\n\tuint64_t value_64bit             = 0;\n\tuint32_t value_32bit             = 0;\n\tint result                       = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"USN record:\\n\" );\n\n\tif( libfusn_record_get_update_time(\n\t     usn_record,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve update time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( info_handle_filetime_value_fprint(\n\t     info_handle,\n\t     \"\\tUpdate time\\t\\t\\t\",\n\t     value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t \"%s: unable to print FILETIME value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfusn_record_get_update_sequence_number(\n\t     usn_record,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve update sequence number.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tUpdate sequence number\\t\\t: %\" PRIu64 \"\\n\",\n\t value_64bit );\n\n\tif( libfusn_record_get_update_reason_flags(\n\t     usn_record,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve update reason flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tUpdate reason flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\tinfo_handle_usn_record_update_reason_flags_fprint(\n\t value_32bit,\n\t info_handle->notify_stream );\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tif( libfusn_record_get_update_source_flags(\n\t     usn_record,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve update source flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tUpdate source flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\tinfo_handle_usn_record_update_source_flags_fprint(\n\t value_32bit,\n\t info_handle->notify_stream );\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tName\\t\\t\\t\\t: \" );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfusn_record_get_utf16_name_size(\n\t          usn_record,\n\t          &value_string_size,\n\t          error );\n#else\n\tresult = libfusn_record_get_utf8_name_size(\n\t          usn_record,\n\t          &value_string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_string_size > 0 )\n\t{\n\t\tvalue_string = system_string_allocate(\n\t\t                value_string_size );\n\n\t\tif( value_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfusn_record_get_utf16_name(\n\t\t          usn_record,\n\t\t          (uint16_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#else\n\t\tresult = libfusn_record_get_utf8_name(\n\t\t          usn_record,\n\t\t          (uint8_t *) value_string,\n\t\t          value_string_size,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( info_handle_name_value_fprint(\n\t\t     info_handle,\n\t\t     value_string,\n\t\t     value_string_size - 1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t value_string );\n\n\t\tvalue_string = NULL;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tif( libfusn_record_get_file_reference(\n\t     usn_record,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_64bit == 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tFile reference\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t value_64bit );\n\t}\n\telse\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tFile reference\\t\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t value_64bit & 0xffffffffffffUL,\n\t\t value_64bit >> 48 );\n\t}\n\tif( libfusn_record_get_parent_file_reference(\n\t     usn_record,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( value_64bit == 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tParent file reference\\t\\t: %\" PRIu64 \"\\n\",\n\t\t value_64bit );\n\t}\n\telse\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tParent file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t value_64bit & 0xffffffffffffUL,\n\t\t value_64bit >> 48 );\n\t}\n\tif( libfusn_record_get_file_attribute_flags(\n\t     usn_record,\n\t     &value_32bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFile attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t value_32bit );\n\tinfo_handle_file_attribute_flags_fprint(\n\t value_32bit,\n\t info_handle->notify_stream );\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the USN change journal ($UsnJrnl) entry information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_usn_change_journal_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_usn_change_journal_t *usn_change_journal = NULL;\n\tlibfusn_record_t *usn_record                       = NULL;\n\tuint8_t *buffer                                    = NULL;\n\tstatic char *function                              = \"info_handle_usn_change_journal_fprint\";\n\tsize_t journal_block_size                          = 0;\n\tssize_t read_count                                 = 0;\n\tuint32_t usn_record_size                           = 0;\n\tint result                                         = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"New Technology File System information:\\n\\n\" );\n\n\tresult = libfsntfs_volume_get_usn_change_journal(\n\t          info_handle->input_volume,\n\t          &usn_change_journal,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve USN change journal.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"USN change journal: N/A\\n\\n\" );\n\n\t\treturn( 1 );\n\t}\n/* TODO get journal block size from USN change journal */\n\tjournal_block_size = 0x1000;\n\n\tif( ( journal_block_size == 0 )\n\t || ( journal_block_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid journal block size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"USN change journal: \\\\$Extend\\\\$UsnJrnl\\n\\n\" );\n\n\tbuffer = (uint8_t *) memory_allocate(\n\t                      sizeof( uint8_t ) * journal_block_size );\n\n\tif( buffer == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create buffer.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdo\n\t{\n\t\tread_count = libfsntfs_usn_change_journal_read_usn_record(\n\t\t\t      usn_change_journal,\n\t\t\t      buffer,\n\t\t\t      journal_block_size,\n\t\t\t      error );\n\n\t\tif( read_count < 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read USN record data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( read_count > 0 )\n\t\t{\n\t\t\tif( libfusn_record_initialize(\n\t\t\t     &usn_record,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to initialize USN record.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfusn_record_copy_from_byte_stream(\n\t\t\t     usn_record,\n\t\t\t     buffer,\n\t\t\t     read_count,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to copy USN record from byte stream.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfusn_record_get_size(\n\t\t\t     usn_record,\n\t\t\t     &usn_record_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve USN record size.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( info_handle_usn_record_fprint(\n\t\t\t     info_handle,\n\t\t\t     usn_record,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print USN record information.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfusn_record_free(\n\t\t\t     &usn_record,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free USN record.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\twhile( read_count > 0 );\n\n\tmemory_free(\n\t buffer );\n\n\tbuffer = NULL;\n\n\tif( libfsntfs_usn_change_journal_free(\n\t     &usn_change_journal,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free USN change journal.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( usn_record != NULL )\n\t{\n\t\tlibfusn_record_free(\n\t\t &usn_record,\n\t\t NULL );\n\t}\n\tif( buffer != NULL )\n\t{\n\t\tmemory_free(\n\t\t buffer );\n\t}\n\tif( usn_change_journal != NULL )\n\t{\n\t\tlibfsntfs_usn_change_journal_free(\n\t\t &usn_change_journal,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the volume information\n * Returns 1 if successful or -1 on error\n */\nint info_handle_volume_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *volume_name = NULL;\n\tstatic char *function           = \"info_handle_volume_fprint\";\n\tsize32_t cluster_block_size     = 0;\n\tsize32_t index_entry_size       = 0;\n\tsize32_t mft_entry_size         = 0;\n\tsize_t volume_name_size         = 0;\n\tuint64_t serial_number          = 0;\n\tuint16_t bytes_per_sector       = 0;\n\tuint16_t flags                  = 0;\n\tuint8_t major_version           = 0;\n\tuint8_t minor_version           = 0;\n\tint result                      = 0;\n\n\tif( info_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid info handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"New Technology File System information:\\n\\n\" );\n\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"Volume information:\\n\" );\n\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tName\\t\\t\\t\\t:\" );\n\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          &volume_name_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          &volume_name_size,\n\t\t          error );\n#endif\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libfsntfs_volume_get_utf16_name_size(\n\t\t          info_handle->input_volume,\n\t\t          &volume_name_size,\n\t\t          error );\n#else\n\t\tresult = libfsntfs_volume_get_utf8_name_size(\n\t\t          info_handle->input_volume,\n\t\t          &volume_name_size,\n\t\t          error );\n#endif\n\t}\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name string size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result != 0 )\n\t      && ( volume_name_size > 0 ) )\n\t{\n\t\tvolume_name = system_string_allocate(\n\t\t               volume_name_size );\n\n\t\tif( volume_name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create volume name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( info_handle->input_mft_metadata_file != NULL )\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t\t\t          info_handle->input_mft_metadata_file,\n\t\t\t          (uint16_t *) volume_name,\n\t\t\t          volume_name_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t\t\t          info_handle->input_mft_metadata_file,\n\t\t\t          (uint8_t *) volume_name,\n\t\t\t          volume_name_size,\n\t\t\t          error );\n#endif\n\t\t}\n\t\telse if( info_handle->input_volume != NULL )\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libfsntfs_volume_get_utf16_name(\n\t\t\t          info_handle->input_volume,\n\t\t\t          (uint16_t *) volume_name,\n\t\t\t          volume_name_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libfsntfs_volume_get_utf8_name(\n\t\t\t          info_handle->input_volume,\n\t\t\t          (uint8_t *) volume_name,\n\t\t\t          volume_name_size,\n\t\t\t          error );\n#endif\n\t\t}\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve volume name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \" %\" PRIs_SYSTEM \"\",\n\t\t volume_name );\n\n\t\tmemory_free(\n\t\t volume_name );\n\n\t\tvolume_name = NULL;\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tVersion\\t\\t\\t\\t:\" );\n\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_volume_version(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          &major_version,\n\t\t          &minor_version,\n\t\t          error );\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_version(\n\t\t          info_handle->input_volume,\n\t\t          &major_version,\n\t\t          &minor_version,\n\t\t          error );\n\t}\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve version.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \" %\" PRIu8 \".%\" PRIu8 \"\",\n\t\t major_version,\n\t\t minor_version );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tif( info_handle->input_volume != NULL )\n\t{\n\t\tif( libfsntfs_volume_get_serial_number(\n\t\t     info_handle->input_volume,\n\t\t     &serial_number,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve serial number.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tSerial number\\t\\t\\t: %08\" PRIx64 \"\\n\",\n\t\t serial_number );\n\n\t\tif( libfsntfs_volume_get_bytes_per_sector(\n\t\t     info_handle->input_volume,\n\t\t     &bytes_per_sector,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve bytes per sector.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tBytes per sector\\t\\t: %\" PRIu16 \"\\n\",\n\t\t bytes_per_sector );\n\n\t\tif( libfsntfs_volume_get_cluster_block_size(\n\t\t     info_handle->input_volume,\n\t\t     &cluster_block_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve cluster block size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tCluster block size\\t\\t: %\" PRIu32 \"\\n\",\n\t\t cluster_block_size );\n\t}\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n/* TODO */\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_mft_entry_size(\n\t\t          info_handle->input_volume,\n\t\t          &mft_entry_size,\n\t\t          error );\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tMFT entry size\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t mft_entry_size );\n\n\tif( info_handle->input_volume != NULL )\n\t{\n\t\tif( libfsntfs_volume_get_index_entry_size(\n\t\t     info_handle->input_volume,\n\t\t     &index_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve index entry size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\tIndex entry size\\t\\t: %\" PRIu32 \"\\n\",\n\t\t index_entry_size );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\tFlags\\t\\t\\t\\t:\" );\n\n\tif( info_handle->input_mft_metadata_file != NULL )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_volume_flags(\n\t\t          info_handle->input_mft_metadata_file,\n\t\t          &flags,\n\t\t          error );\n\t}\n\telse if( info_handle->input_volume != NULL )\n\t{\n\t\tresult = libfsntfs_volume_get_flags(\n\t\t          info_handle->input_volume,\n\t\t          &flags,\n\t\t          error );\n\t}\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \" 0x%04\" PRIx16 \"\",\n\t\t flags );\n\t}\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\tif( ( flags & 0x0001 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tIs dirty\\n\" );\n\t}\n\tif( ( flags & 0x0002 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tRe-size journal\\n\" );\n\t}\n\tif( ( flags & 0x0004 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tUpgrade on next mount\\n\" );\n\t}\n\tif( ( flags & 0x0008 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tMounted on Windows NT 4\\n\" );\n\t}\n\tif( ( flags & 0x0010 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tDelete USN underway\\n\" );\n\t}\n\tif( ( flags & 0x0020 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tRepair object identifiers\\n\" );\n\t}\n\tif( ( flags & 0x8000 ) != 0 )\n\t{\n\t\tfprintf(\n\t\t info_handle->notify_stream,\n\t\t \"\\t\\tModified by chkdsk\\n\" );\n\t}\n/* TODO print more info */\n\n\tfprintf(\n\t info_handle->notify_stream,\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( volume_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t volume_name );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/info_handle.h",
    "content": "/*\n * Info handle\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _INFO_HANDLE_H )\n#define _INFO_HANDLE_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"fsntfstools_libbfio.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libfusn.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct info_handle info_handle_t;\n\nstruct info_handle\n{\n\t/* The MFT entry index\n\t */\n\tuint64_t entry_index;\n\n\t/* The volume offset\n\t */\n\toff64_t volume_offset;\n\n\t/* The libbfio input file IO handle\n\t */\n\tlibbfio_handle_t *input_file_io_handle;\n\n\t/* The libfsntfs input volume\n\t */\n\tlibfsntfs_volume_t *input_volume;\n\n\t/* The libfsntfs input MFT metadata file\n\t */\n\tlibfsntfs_mft_metadata_file_t *input_mft_metadata_file;\n\n\t/* Value to indicate if the MD5 hash should be calculated\n\t */\n\tuint8_t calculate_md5;\n\n\t/* The bodyfile output stream\n\t */\n\tFILE *bodyfile_stream;\n\n\t/* The notification output stream\n\t */\n\tFILE *notify_stream;\n\n\t/* Value to indicate if abort was signalled\n\t */\n\tint abort;\n};\n\nint fsntfstools_system_string_copy_decimal_to_integer_64_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error );\n\nvoid info_handle_file_attribute_flags_fprint(\n      uint32_t file_attribute_flags,\n      FILE *notify_stream );\n\nvoid info_handle_volume_information_flags_fprint(\n      uint16_t volume_information_flags,\n      FILE *notify_stream );\n\nconst char *info_handle_get_access_control_entry_type(\n             uint8_t entry_type );\n\nconst char *info_handle_get_attribute_type_description(\n             uint32_t attribute_type );\n\nint info_handle_initialize(\n     info_handle_t **info_handle,\n     uint8_t calculate_md5,\n     libcerror_error_t **error );\n\nint info_handle_free(\n     info_handle_t **info_handle,\n     libcerror_error_t **error );\n\nint info_handle_signal_abort(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\nint info_handle_set_bodyfile(\n     info_handle_t *info_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error );\n\nint info_handle_set_volume_offset(\n     info_handle_t *info_handle,\n     const system_character_t *string,\n     libcerror_error_t **error );\n\nint info_handle_open_input(\n     info_handle_t *info_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error );\n\nint info_handle_close_input(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\nint info_handle_file_entry_calculate_md5(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     char *md5_string,\n     size_t md5_string_size,\n     libcerror_error_t **error );\n\nint info_handle_name_value_fprint(\n     info_handle_t *info_handle,\n     const system_character_t *value_string,\n     size_t value_string_length,\n     libcerror_error_t **error );\n\nint info_handle_filetime_value_fprint(\n     info_handle_t *info_handle,\n     const char *value_name,\n     uint64_t value_64bit,\n     libcerror_error_t **error );\n\nint info_handle_security_descriptor_fprint(\n     info_handle_t *info_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint info_handle_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     int attribute_index,\n     libcerror_error_t **error );\n\nint info_handle_attribute_list_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_bitmap_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_data_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_file_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_object_identifier_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_reparse_point_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_security_descriptor_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_standard_information_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_volume_information_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_volume_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint info_handle_file_entry_value_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_name_value_fprint(\n     info_handle_t *info_handle,\n     const system_character_t *value_string,\n     size_t value_string_length,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_file_name_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_i30_entry_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_index_root_attribute_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *attribute,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     const system_character_t *attribute_name,\n     size_t attribute_name_size,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_file_entry_value_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_data_stream_t *alternate_data_stream,\n     const system_character_t *path,\n     size_t path_length,\n     const system_character_t *file_entry_name,\n     size_t file_entry_name_length,\n     const system_character_t *data_stream_name,\n     libcerror_error_t **error );\n\nint info_handle_bodyfile_mft_entry_fprint(\n     info_handle_t *info_handle,\n     uint64_t mft_entry_index,\n     libcerror_error_t **error );\n\nint info_handle_file_entry_fprint(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_attribute_t *file_name_attribute,\n     const system_character_t *path,\n     const system_character_t *file_entry_name,\n     libcerror_error_t **error );\n\nint info_handle_file_system_hierarchy_fprint_file_entry(\n     info_handle_t *info_handle,\n     libfsntfs_file_entry_t *file_entry,\n     const system_character_t *path,\n     libcerror_error_t **error );\n\nint info_handle_mft_entry_fprint(\n     info_handle_t *info_handle,\n     uint64_t mft_entry_index,\n     libcerror_error_t **error );\n\nint info_handle_mft_entries_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\nint info_handle_file_entry_fprint_by_path(\n     info_handle_t *info_handle,\n     const system_character_t *path,\n     libcerror_error_t **error );\n\nint info_handle_file_system_hierarchy_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\nvoid info_handle_usn_record_update_reason_flags_fprint(\n      uint32_t update_reason_flags,\n      FILE *notify_stream );\n\nvoid info_handle_usn_record_update_source_flags_fprint(\n      uint32_t update_source_flags,\n      FILE *notify_stream );\n\nint info_handle_usn_record_fprint(\n     info_handle_t *info_handle,\n     libfusn_record_t *usn_record,\n     libcerror_error_t **error );\n\nint info_handle_usn_change_journal_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\nint info_handle_volume_fprint(\n     info_handle_t *info_handle,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _INFO_HANDLE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_dokan.c",
    "content": "/*\n * Mount tool dokan functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_unused.h\"\n#include \"mount_dokan.h\"\n#include \"mount_file_entry.h\"\n#include \"mount_handle.h\"\n\nextern mount_handle_t *fsntfsmount_mount_handle;\n\n#if defined( HAVE_LIBDOKAN )\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\n#define MOUNT_DOKAN_ERROR_BAD_ARGUMENTS -ERROR_BAD_ARGUMENTS\n#define MOUNT_DOKAN_ERROR_FILE_NOT_FOUND -ERROR_FILE_NOT_FOUND\n#define MOUNT_DOKAN_ERROR_GENERIC_FAILURE -ERROR_GEN_FAILURE\n#define MOUNT_DOKAN_ERROR_READ_FAULT -ERROR_READ_FAULT\n\n#else\n#define MOUNT_DOKAN_ERROR_BAD_ARGUMENTS STATUS_UNSUCCESSFUL\n#define MOUNT_DOKAN_ERROR_FILE_NOT_FOUND STATUS_OBJECT_NAME_NOT_FOUND\n#define MOUNT_DOKAN_ERROR_GENERIC_FAILURE STATUS_UNSUCCESSFUL\n#define MOUNT_DOKAN_ERROR_READ_FAULT STATUS_UNEXPECTED_IO_ERROR\n\n#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */\n\n#if defined( HAVE_DOKAN_LONG_PATHS )\n#define DOKAN_MAX_PATH 32768\n#else\n#define DOKAN_MAX_PATH MAX_PATH\n#endif\n\n/* Sets the values in a file information structure\n * The time values contain an unsigned 64-bit FILETIME timestamp\n * Returns 1 if successful or -1 on error\n */\nint mount_dokan_set_file_information(\n     BY_HANDLE_FILE_INFORMATION *file_information,\n     size64_t size,\n     uint16_t file_mode,\n     uint64_t creation_time,\n     uint64_t access_time,\n     uint64_t modification_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_dokan_set_file_information\";\n\n\tif( file_information == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > 0 )\n\t{\n\t\tfile_information->nFileSizeHigh = (DWORD) ( size >> 32 );\n\t\tfile_information->nFileSizeLow  = (DWORD) ( size & 0xffffffffUL );\n\t}\n\tif( ( file_mode & 0x4000 ) != 0 )\n\t{\n\t\tfile_information->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;\n\t}\n\telse\n\t{\n\t\tfile_information->dwFileAttributes = FILE_ATTRIBUTE_NORMAL;\n\t}\n\tfile_information->ftCreationTime.dwLowDateTime  = (uint32_t) ( creation_time & 0x00000000ffffffffULL );\n\tfile_information->ftCreationTime.dwHighDateTime = creation_time >> 32;\n\n\tfile_information->ftLastAccessTime.dwLowDateTime  = (uint32_t) ( access_time & 0x00000000ffffffffULL );\n\tfile_information->ftLastAccessTime.dwHighDateTime = access_time >> 32;\n\n\tfile_information->ftLastWriteTime.dwLowDateTime  = (uint32_t) ( modification_time & 0x00000000ffffffffULL );\n\tfile_information->ftLastWriteTime.dwHighDateTime = modification_time >> 32;\n\n\treturn( 1 );\n}\n\n/* Sets the values in a find data structure\n * The time values contain an unsigned 64-bit FILETIME timestamp\n * Returns 1 if successful or -1 on error\n */\nint mount_dokan_set_find_data(\n     WIN32_FIND_DATAW *find_data,\n     size64_t size,\n     uint16_t file_mode,\n     uint64_t creation_time,\n     uint64_t access_time,\n     uint64_t modification_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_dokan_set_find_data\";\n\n\tif( find_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid find data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > 0 )\n\t{\n\t\tfind_data->nFileSizeHigh = (DWORD) ( size >> 32 );\n\t\tfind_data->nFileSizeLow  = (DWORD) ( size & 0xffffffffUL );\n\t}\n\tif( ( file_mode & 0x4000 ) != 0 )\n\t{\n\t\tfind_data->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;\n\t}\n\telse\n\t{\n\t\tfind_data->dwFileAttributes = FILE_ATTRIBUTE_NORMAL;\n\t}\n\tfind_data->ftCreationTime.dwLowDateTime  = (uint32_t) ( creation_time & 0x00000000ffffffffULL );\n\tfind_data->ftCreationTime.dwHighDateTime = creation_time >> 32;\n\n\tfind_data->ftLastAccessTime.dwLowDateTime  = (uint32_t) ( access_time & 0x00000000ffffffffULL );\n\tfind_data->ftLastAccessTime.dwHighDateTime = access_time >> 32;\n\n\tfind_data->ftLastWriteTime.dwLowDateTime  = (uint32_t) ( modification_time & 0x00000000ffffffffULL );\n\tfind_data->ftLastWriteTime.dwHighDateTime = modification_time >> 32;\n\n\treturn( 1 );\n}\n\n/* Fills a directory entry\n * Returns 1 if successful or -1 on error\n */\nint mount_dokan_filldir(\n     PFillFindData fill_find_data,\n     DOKAN_FILE_INFO *file_info,\n     wchar_t *name,\n     size_t name_size,\n     WIN32_FIND_DATAW *find_data,\n     mount_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function      = \"mount_dokan_filldir\";\n\tsize64_t file_size         = 0;\n\tuint64_t access_time       = 0;\n\tuint64_t creation_time     = 0;\n\tuint64_t modification_time = 0;\n\tuint16_t file_mode         = 0;\n\n\tif( fill_find_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid fill find data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size > (size_t) DOKAN_MAX_PATH )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid name size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tif( mount_file_entry_get_size(\n\t\t     file_entry,\n\t\t     &file_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file entry size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_file_mode(\n\t\t     file_entry,\n\t\t     &file_mode,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file mode.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_creation_time(\n\t\t     file_entry,\n\t\t     &creation_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve creation time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_access_time(\n\t\t     file_entry,\n\t\t     &access_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve access time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_modification_time(\n\t\t     file_entry,\n\t\t     &modification_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve modification time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( memory_set(\n\t     find_data,\n\t     0,\n\t     sizeof( WIN32_FIND_DATAW ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear find data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( wide_string_copy(\n\t     find_data->cFileName,\n\t     name,\n\t     name_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size <= (size_t) 14 )\n\t{\n\t\tif( wide_string_copy(\n\t\t     find_data->cAlternateFileName,\n\t\t     name,\n\t\t     name_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy alternate filename.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( mount_dokan_set_find_data(\n\t     find_data,\n\t     file_size,\n\t     file_mode,\n\t     creation_time,\n\t     access_time,\n\t     modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set find data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( fill_find_data(\n\t     find_data,\n\t     file_info ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\n\n/* Opens a file or directory\n * Returns 0 if successful or an error code otherwise\n */\nint __stdcall mount_dokan_CreateFile(\n               const wchar_t *path,\n               DWORD desired_access,\n               DWORD share_mode FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n               DWORD creation_disposition,\n               DWORD attribute_flags FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n               DOKAN_FILE_INFO *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_dokan_CreateFile\";\n\tint result               = 0;\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( share_mode )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( attribute_flags )\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( ( desired_access & GENERIC_WRITE ) != 0 )\n\t{\n\t\treturn( -ERROR_WRITE_PROTECT );\n\t}\n\t/* Ignore the share_mode\n\t */\n\tif( creation_disposition == CREATE_NEW )\n\t{\n\t\treturn( -ERROR_FILE_EXISTS );\n\t}\n\telse if( creation_disposition == CREATE_ALWAYS )\n\t{\n\t\treturn( -ERROR_ALREADY_EXISTS );\n\t}\n\telse if( creation_disposition == OPEN_ALWAYS )\n\t{\n\t\treturn( -ERROR_FILE_NOT_FOUND );\n\t}\n\telse if( creation_disposition == TRUNCATE_EXISTING )\n\t{\n\t\treturn( -ERROR_FILE_NOT_FOUND );\n\t}\n\telse if( creation_disposition != OPEN_EXISTING )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid creation disposition.\",\n\t\t function );\n\n\t\tresult = -ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->Context != (ULONG64) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file information - context already set.\",\n\t\t function );\n\n\t\tresult = -ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     (mount_file_entry_t **) &( file_info->Context ),\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %ls.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = -ERROR_FILE_NOT_FOUND;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n#else\n\n/* Opens a file or directory\n * Returns 0 if successful or an error code otherwise\n */\nNTSTATUS __stdcall mount_dokan_ZwCreateFile(\n                    const wchar_t *path,\n                    DOKAN_IO_SECURITY_CONTEXT *security_context FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n                    ACCESS_MASK desired_access,\n                    ULONG file_attributes FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n                    ULONG share_access FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n                    ULONG creation_disposition,\n                    ULONG creation_options FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n                    DOKAN_FILE_INFO *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_dokan_ZwCreateFile\";\n\tint result               = 0;\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( security_context )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( file_attributes )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( share_access )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( creation_options )\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = STATUS_UNSUCCESSFUL;\n\n\t\tgoto on_error;\n\t}\n\tif( ( desired_access & GENERIC_WRITE ) != 0 )\n\t{\n\t\treturn( STATUS_MEDIA_WRITE_PROTECTED );\n\t}\n\t/* Ignore the share_mode\n\t */\n\tif( creation_disposition == FILE_CREATE )\n\t{\n\t\treturn( STATUS_OBJECT_NAME_COLLISION );\n\t}\n\telse if( ( creation_disposition != FILE_OPEN )\n\t      && ( creation_disposition != FILE_OPEN_IF ) )\n\t{\n\t\treturn( STATUS_ACCESS_DENIED );\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = STATUS_UNSUCCESSFUL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->Context != (ULONG64) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file information - context already set.\",\n\t\t function );\n\n\t\tresult = STATUS_UNSUCCESSFUL;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     (mount_file_entry_t **) &( file_info->Context ),\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %ls.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = STATUS_OBJECT_NAME_NOT_FOUND;\n\n\t\tgoto on_error;\n\t}\n\treturn( STATUS_SUCCESS );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\n\n/* Opens a directory\n * Returns 0 if successful or an error code otherwise\n */\nint __stdcall mount_dokan_OpenDirectory(\n               const wchar_t *path,\n               DOKAN_FILE_INFO *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_dokan_OpenDirectory\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->Context != (ULONG64) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file information - context already set.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     (mount_file_entry_t **) &( file_info->Context ),\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %ls.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */\n\n/* Closes a file or directory\n * Returns 0 if successful or an error code otherwise\n */\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_CloseFile(\n               const wchar_t *path,\n               DOKAN_FILE_INFO *file_info )\n#else\nNTSTATUS __stdcall mount_dokan_CloseFile(\n                    const wchar_t *path,\n                    DOKAN_FILE_INFO *file_info )\n#endif\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_dokan_CloseFile\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->Context != (ULONG64) NULL )\n\t{\n\t\tif( mount_file_entry_free(\n\t\t     (mount_file_entry_t **) &( file_info->Context ),\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file entry.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Reads a buffer of data at the specified offset\n * Returns 0 if successful or an error code otherwise\n */\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_ReadFile(\n               const wchar_t *path,\n               void *buffer,\n               DWORD number_of_bytes_to_read,\n               DWORD *number_of_bytes_read,\n               LONGLONG offset,\n               DOKAN_FILE_INFO *file_info )\n#else\nNTSTATUS __stdcall mount_dokan_ReadFile(\n                    const wchar_t *path,\n                    void *buffer,\n                    DWORD number_of_bytes_to_read,\n                    DWORD *number_of_bytes_read,\n                    LONGLONG offset,\n                    DOKAN_FILE_INFO *file_info )\n#endif\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_dokan_ReadFile\";\n\tssize_t read_count       = 0;\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( number_of_bytes_to_read > (DWORD) INT32_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid number of bytes to read value exceeds maximum.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( number_of_bytes_read == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of bytes read.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->Context == (ULONG64) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file information - missing context.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tread_count = mount_file_entry_read_buffer_at_offset(\n\t              (mount_file_entry_t *) file_info->Context,\n\t              buffer,\n\t              (size_t) number_of_bytes_to_read,\n\t              (off64_t) offset,\n\t              &error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from file entry.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_READ_FAULT;\n\n\t\tgoto on_error;\n\t}\n\tif( read_count > (size_t) INT32_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid read count value exceeds maximum.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_READ_FAULT;\n\n\t\tgoto on_error;\n\t}\n\t/* Dokan does not require the read function to return ERROR_HANDLE_EOF\n\t */\n\t*number_of_bytes_read = (DWORD) read_count;\n\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Reads a directory\n * Returns 0 if successful or an error code otherwise\n */\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_FindFiles(\n               const wchar_t *path,\n               PFillFindData fill_find_data,\n               DOKAN_FILE_INFO *file_info )\n#else\nNTSTATUS __stdcall mount_dokan_FindFiles(\n                    const wchar_t *path,\n                    PFillFindData fill_find_data,\n                    DOKAN_FILE_INFO *file_info )\n#endif\n{\n\tWIN32_FIND_DATAW find_data;\n\n\tlibcerror_error_t *error              = NULL;\n\tmount_file_entry_t *file_entry        = NULL;\n\tmount_file_entry_t *parent_file_entry = NULL;\n\tmount_file_entry_t *sub_file_entry    = NULL;\n\twchar_t *name                         = NULL;\n\tstatic char *function                 = \"mount_dokan_FindFiles\";\n\tsize_t name_size                      = 0;\n\tint number_of_sub_file_entries        = 0;\n\tint result                            = 0;\n\tint sub_file_entry_index              = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %ls.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_dokan_filldir(\n\t     fill_find_data,\n\t     file_info,\n\t     L\".\",\n\t     2,\n\t     &find_data,\n\t     file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set self find data.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tresult = mount_file_entry_get_parent_file_entry(\n\t          file_entry,\n\t          &parent_file_entry,\n\t          &error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file entry.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_dokan_filldir(\n\t     fill_find_data,\n\t     file_info,\n\t     L\"..\",\n\t     3,\n\t     &find_data,\n\t     parent_file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set parent find data.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_free(\n\t     &parent_file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free parent file entry.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_number_of_sub_file_entries(\n\t     file_entry,\n\t     &number_of_sub_file_entries,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tfor( sub_file_entry_index = 0;\n\t     sub_file_entry_index < number_of_sub_file_entries;\n\t     sub_file_entry_index++ )\n\t{\n\t\tif( mount_file_entry_get_sub_file_entry_by_index(\n\t\t     file_entry,\n\t\t     sub_file_entry_index,\n\t\t     &sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_name_size(\n\t\t     sub_file_entry,\n\t\t     &name_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d name size.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tname = wide_string_allocate(\n\t\t        name_size );\n\n\t\tif( name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create sub file entry: %d name.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_name(\n\t\t     sub_file_entry,\n\t\t     name,\n\t\t     name_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d name.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_dokan_filldir(\n\t\t     fill_find_data,\n\t\t     file_info,\n\t\t     name,\n\t\t     name_size,\n\t\t     &find_data,\n\t\t     sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set sub file entry: %d find data.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t name );\n\n\t\tname = NULL;\n\n\t\tif( mount_file_entry_free(\n\t\t     &sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free sub file entry: %d.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( mount_file_entry_free(\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( name != NULL )\n\t{\n\t\tmemory_free(\n\t\t name );\n\t}\n\tif( sub_file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &sub_file_entry,\n\t\t NULL );\n\t}\n\tif( parent_file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &parent_file_entry,\n\t\t NULL );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the file information\n * Returns 0 if successful or an error code otherwise\n */\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_GetFileInformation(\n               const wchar_t *path,\n               BY_HANDLE_FILE_INFORMATION *file_information,\n               DOKAN_FILE_INFO *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#else\nNTSTATUS __stdcall mount_dokan_GetFileInformation(\n                    const wchar_t *path,\n                    BY_HANDLE_FILE_INFORMATION *file_information,\n                    DOKAN_FILE_INFO *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#endif\n{\n\tlibcerror_error_t *error       = NULL;\n\tmount_file_entry_t *file_entry = NULL;\n\tstatic char *function          = \"mount_dokan_GetFileInformation\";\n\tsize64_t file_size             = 0;\n\tuint64_t access_time           = 0;\n\tuint64_t creation_time         = 0;\n\tuint64_t modification_time     = 0;\n\tuint16_t file_mode             = 0;\n\tint result                     = 0;\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( file_info )\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_BAD_ARGUMENTS;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %ls.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = MOUNT_DOKAN_ERROR_FILE_NOT_FOUND;\n\n\t\tgoto on_error;\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tif( mount_file_entry_get_size(\n\t\t     file_entry,\n\t\t     &file_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file entry size.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_file_mode(\n\t\t     file_entry,\n\t\t     &file_mode,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file mode.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_creation_time(\n\t\t     file_entry,\n\t\t     &creation_time,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve creation time.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_access_time(\n\t\t     file_entry,\n\t\t     &access_time,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve access time.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_modification_time(\n\t\t     file_entry,\n\t\t     &modification_time,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve modification time.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( mount_dokan_set_file_information(\n\t     file_information,\n\t     file_size,\n\t     file_mode,\n\t     creation_time,\n\t     access_time,\n\t     modification_time,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set file information.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_free(\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the volume information\n * Returns 0 if successful or an error code otherwise\n */\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_GetVolumeInformation(\n               wchar_t *volume_name,\n               DWORD volume_name_size,\n               DWORD *volume_serial_number,\n               DWORD *maximum_filename_length,\n               DWORD *file_system_flags,\n               wchar_t *file_system_name,\n               DWORD file_system_name_size,\n               DOKAN_FILE_INFO *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#else\nNTSTATUS __stdcall mount_dokan_GetVolumeInformation(\n                    wchar_t *volume_name,\n                    DWORD volume_name_size,\n                    DWORD *volume_serial_number,\n                    DWORD *maximum_filename_length,\n                    DWORD *file_system_flags,\n                    wchar_t *file_system_name,\n                    DWORD file_system_name_size,\n                    DOKAN_FILE_INFO *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#endif\n{\n\tlibcerror_error_t *error = NULL;\n\tconst wchar_t *name      = NULL;\n\tstatic char *function    = \"mount_dokan_GetVolumeInformation\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( file_info )\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %ls\\n\",\n\t\t function,\n\t\t volume_name );\n\t}\n#endif\n\tname      = L\"FSNTFS\";\n\tname_size = 1 + wide_string_length(\n\t                 name );\n\n\tif( ( volume_name != NULL )\n\t && ( volume_name_size > (DWORD) name_size ) )\n\t{\n\t\t/* Using wcsncpy seems to cause strange behavior here\n\t\t */\n\t\tif( memory_copy(\n\t\t     volume_name,\n\t\t     name,\n\t\t     name_size * sizeof( wchar_t ) ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy volume name.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( volume_serial_number != NULL )\n\t{\n\t\t/* If this value contains 0 it can crash the system is this an issue in Dokan?\n\t\t */\n\t\t*volume_serial_number = 0x19831116;\n\t}\n\tif( maximum_filename_length != NULL )\n\t{\n\t\t*maximum_filename_length = 256;\n\t}\n\tif( file_system_flags != NULL )\n\t{\n\t\t*file_system_flags = FILE_CASE_SENSITIVE_SEARCH\n\t\t                   | FILE_CASE_PRESERVED_NAMES\n\t\t                   | FILE_UNICODE_ON_DISK\n\t\t                   | FILE_READ_ONLY_VOLUME;\n\t}\n\tname      = L\"Dokan\";\n\tname_size = 1 + wide_string_length(\n\t                 name );\n\n\tif( ( file_system_name != NULL )\n\t && ( file_system_name_size > (DWORD) name_size ) )\n\t{\n\t\t/* Using wcsncpy seems to cause strange behavior here\n\t\t */\n\t\tif( memory_copy(\n\t\t     file_system_name,\n\t\t     name,\n\t\t     name_size * sizeof( wchar_t ) ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy file system name.\",\n\t\t\t function );\n\n\t\t\tresult = MOUNT_DOKAN_ERROR_GENERIC_FAILURE;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\n\n/* Unmounts the volume\n * Returns 0 if successful or an error code otherwise\n */\nint __stdcall mount_dokan_Unmount(\n               DOKAN_FILE_INFO *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n{\n\tstatic char *function = \"mount_dokan_Unmount\";\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( file_info )\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s\\n\",\n\t\t function );\n\t}\n#endif\n\treturn( 0 );\n}\n\n#endif /* ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 ) */\n\n#endif /* defined( HAVE_LIBDOKAN ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_dokan.h",
    "content": "/*\n * Mount tool dokan functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_DOKAN_H )\n#define _MOUNT_DOKAN_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_LIBDOKAN )\n#include <dokan.h>\n#endif\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_entry.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_LIBDOKAN )\n\nint mount_dokan_set_file_information(\n     BY_HANDLE_FILE_INFORMATION *file_information,\n     size64_t size,\n     uint16_t file_mode,\n     uint64_t creation_time,\n     uint64_t access_time,\n     uint64_t modification_time,\n     libcerror_error_t **error );\n\nint mount_dokan_set_find_data(\n     WIN32_FIND_DATAW *find_data,\n     size64_t size,\n     uint16_t file_mode,\n     uint64_t creation_time,\n     uint64_t access_time,\n     uint64_t modification_time,\n     libcerror_error_t **error );\n\nint mount_dokan_filldir(\n     PFillFindData fill_find_data,\n     DOKAN_FILE_INFO *file_info,\n     wchar_t *name,\n     size_t name_size,\n     WIN32_FIND_DATAW *find_data,\n     mount_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_CreateFile(\n               const wchar_t *path,\n               DWORD desired_access,\n               DWORD share_mode,\n               DWORD creation_disposition,\n               DWORD attribute_flags,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_ZwCreateFile(\n                    const wchar_t *path,\n                    DOKAN_IO_SECURITY_CONTEXT *security_context,\n                    ACCESS_MASK desired_access,\n                    ULONG file_attributes,\n                    ULONG share_access,\n                    ULONG creation_disposition,\n                    ULONG creation_options,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_OpenDirectory(\n               const wchar_t *path,\n               DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_CloseFile(\n               const wchar_t *path,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_CloseFile(\n                    const wchar_t *path,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_ReadFile(\n               const wchar_t *path,\n               void *buffer,\n               DWORD number_of_bytes_to_read,\n               DWORD *number_of_bytes_read,\n               LONGLONG offset,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_ReadFile(\n                    const wchar_t *path,\n                    void *buffer,\n                    DWORD number_of_bytes_to_read,\n                    DWORD *number_of_bytes_read,\n                    LONGLONG offset,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_FindFiles(\n               const wchar_t *path,\n               PFillFindData fill_find_data,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_FindFiles(\n                    const wchar_t *path,\n                    PFillFindData fill_find_data,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_GetFileInformation(\n               const wchar_t *path,\n               BY_HANDLE_FILE_INFORMATION *file_information,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_GetFileInformation(\n                    const wchar_t *path,\n                    BY_HANDLE_FILE_INFORMATION *file_information,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_GetVolumeInformation(\n               wchar_t *volume_name,\n               DWORD volume_name_size,\n               DWORD *volume_serial_number,\n               DWORD *maximum_filename_length,\n               DWORD *file_system_flags,\n               wchar_t *file_system_name,\n               DWORD file_system_name_size,\n               DOKAN_FILE_INFO *file_info );\n#else\nNTSTATUS __stdcall mount_dokan_GetVolumeInformation(\n                    wchar_t *volume_name,\n                    DWORD volume_name_size,\n                    DWORD *volume_serial_number,\n                    DWORD *maximum_filename_length,\n                    DWORD *file_system_flags,\n                    wchar_t *file_system_name,\n                    DWORD file_system_name_size,\n                    DOKAN_FILE_INFO *file_info );\n#endif\n\n#if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )\nint __stdcall mount_dokan_Unmount(\n               DOKAN_FILE_INFO *file_info );\n#endif\n\n#endif /* defined( HAVE_LIBDOKAN ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_DOKAN_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_file_entry.c",
    "content": "/*\n * Mount file entry\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_SYS_STAT_H )\n#include <sys/stat.h>\n#endif\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_entry.h\"\n#include \"mount_file_system.h\"\n\n#if !defined( S_IFDIR )\n#define S_IFDIR 0x4000\n#endif\n\n#if !defined( S_IFREG )\n#define S_IFREG 0x8000\n#endif\n\n#if !defined( S_IFLNK )\n#define S_IFLNK 0xa000\n#endif\n\n/* Creates a file entry\n * Make sure the value file_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_initialize(\n     mount_file_entry_t **file_entry,\n     mount_file_system_t *file_system,\n     const system_character_t *name,\n     size_t name_length,\n     libfsntfs_file_entry_t *fsntfs_file_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_initialize\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_length > (size_t) ( SSIZE_MAX - 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid name length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_entry = memory_allocate_structure(\n\t               mount_file_entry_t );\n\n\tif( *file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *file_entry,\n\t     0,\n\t     sizeof( mount_file_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *file_entry );\n\n\t\t*file_entry = NULL;\n\n\t\treturn( -1 );\n\t}\n\t( *file_entry )->file_system = file_system;\n\n\tif( name != NULL )\n\t{\n\t\t( *file_entry )->name = system_string_allocate(\n\t\t                         name_length + 1 );\n\n\t\tif( ( *file_entry )->name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( name_length > 0 )\n\t\t{\n\t\t\tif( system_string_copy(\n\t\t\t     ( *file_entry )->name,\n\t\t\t     name,\n\t\t\t     name_length ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy name.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\t( *file_entry )->name[ name_length ] = 0;\n\n\t\t( *file_entry )->name_size = name_length + 1;\n\t}\n\t( *file_entry )->fsntfs_file_entry = fsntfs_file_entry;\n\n\treturn( 1 );\n\non_error:\n\tif( *file_entry != NULL )\n\t{\n\t\tif( ( *file_entry )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *file_entry )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *file_entry );\n\n\t\t*file_entry = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a file entry\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_free(\n     mount_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_free\";\n\tint result            = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tif( ( *file_entry )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *file_entry )->name );\n\t\t}\n\t\tif( libfsntfs_file_entry_free(\n\t\t     &( ( *file_entry )->fsntfs_file_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *file_entry );\n\n\t\t*file_entry = NULL;\n\t}\n\treturn( result );\n}\n\n/* Retrieves the parent file entry\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint mount_file_entry_get_parent_file_entry(\n     mount_file_entry_t *file_entry,\n     mount_file_entry_t **parent_file_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_parent_file_entry\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( parent_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid parent file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *parent_file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid parent file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO implement libfsntfs_item_get_parent function */\n\n\treturn( 1 );\n}\n\n/* Retrieves the creation date and time\n * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp\n * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_creation_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *creation_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_creation_time\";\n\tuint64_t filetime     = 0;\n\n#if !defined( WINAPI )\n\tint64_t posix_time    = 0;\n#endif\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( creation_time == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid creation time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_creation_time(\n\t     file_entry->fsntfs_file_entry,\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( WINAPI )\n\t*creation_time = filetime;\n#else\n\tif( filetime != 0 )\n\t{\n\t\t/* Convert the FILETIME timestamp into a POSIX nanoseconds timestamp\n\t\t */\n\t\tposix_time = ( (int64_t) filetime - 116444736000000000L ) * 100;\n\t}\n\t*creation_time = (uint64_t) posix_time;\n#endif\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp\n * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_access_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *access_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_access_time\";\n\tuint64_t filetime     = 0;\n\n#if !defined( WINAPI )\n\tint64_t posix_time    = 0;\n#endif\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( access_time == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid access time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_access_time(\n\t     file_entry->fsntfs_file_entry,\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( WINAPI )\n\t*access_time = filetime;\n#else\n\tif( filetime != 0 )\n\t{\n\t\t/* Convert the FILETIME timestamp into a POSIX nanoseconds timestamp\n\t\t */\n\t\tposix_time = ( (int64_t) filetime - 116444736000000000L ) * 100;\n\t}\n\t*access_time = (uint64_t) posix_time;\n#endif\n\treturn( 1 );\n}\n\n/* Retrieves the modification date and time\n * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp\n * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_modification_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *modification_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_modification_time\";\n\tuint64_t filetime     = 0;\n\n#if !defined( WINAPI )\n\tint64_t posix_time    = 0;\n#endif\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( modification_time == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_modification_time(\n\t     file_entry->fsntfs_file_entry,\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( WINAPI )\n\t*modification_time = filetime;\n#else\n\tif( filetime != 0 )\n\t{\n\t\t/* Convert the FILETIME timestamp into a POSIX nanoseconds timestamp\n\t\t */\n\t\tposix_time = ( (int64_t) filetime - 116444736000000000L ) * 100;\n\t}\n\t*modification_time = (uint64_t) posix_time;\n#endif\n\treturn( 1 );\n}\n\n/* Retrieves the inode change date and time\n * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp\n * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_inode_change_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *inode_change_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_inode_change_time\";\n\tuint64_t filetime     = 0;\n\n#if !defined( WINAPI )\n\tint64_t posix_time    = 0;\n#endif\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( inode_change_time == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid inode change time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_entry_modification_time(\n\t     file_entry->fsntfs_file_entry,\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( WINAPI )\n\t*inode_change_time = filetime;\n#else\n\tif( filetime != 0 )\n\t{\n\t\t/* Convert the FILETIME timestamp into a POSIX nanoseconds timestamp\n\t\t */\n\t\tposix_time = ( (int64_t) filetime - 116444736000000000L ) * 100;\n\t}\n\t*inode_change_time = (uint64_t) posix_time;\n#endif\n\treturn( 1 );\n}\n\n/* Retrieves the file mode\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_file_mode(\n     mount_file_entry_t *file_entry,\n     uint16_t *file_mode,\n     libcerror_error_t **error )\n{\n\tstatic char *function         = \"mount_file_entry_get_file_mode\";\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_mode == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file mode.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_file_attribute_flags(\n\t     file_entry->fsntfs_file_entry,\n\t     &file_attribute_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          file_entry->fsntfs_file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\t*file_mode = S_IFDIR | 0555;\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_file_entry_is_symbolic_link(\n\t\t          file_entry->fsntfs_file_entry,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if file entry is a symbolic link.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\t*file_mode = S_IFLNK | 0555;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*file_mode = S_IFREG | 0444;\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_name_size(\n     mount_file_entry_t *file_entry,\n     size_t *string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_name_size\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*string_size = file_entry->name_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_name(\n     mount_file_entry_t *file_entry,\n     system_character_t *string,\n     size_t string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_name\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size < file_entry->name_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: invalid string size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( system_string_copy(\n\t     string,\n\t     file_entry->name,\n\t     file_entry->name_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstring[ file_entry->name_size - 1 ] = 0;\n\n\treturn( 1 );\n}\n\n/* Retrieves the symbolic link target\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_symbolic_link_target(\n     mount_file_entry_t *file_entry,\n     system_character_t *string,\n     size_t string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_symbolic_link_target\";\n\tint result            = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry->fsntfs_file_entry,\n\t          (uint16_t *) string,\n\t          string_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry->fsntfs_file_entry,\n\t          (uint8_t *) string,\n\t          string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve symbolic link target string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO rewrite symbolic link target */\n\treturn( 1 );\n}\n\n/* Retrieves the number of sub file entries\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_number_of_sub_file_entries(\n     mount_file_entry_t *file_entry,\n     int *number_of_sub_file_entries,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_number_of_sub_file_entries\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t     file_entry->fsntfs_file_entry,\n\t     number_of_sub_file_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the sub file entry for the specific index\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_sub_file_entry_by_index(\n     mount_file_entry_t *file_entry,\n     int sub_file_entry_index,\n     mount_file_entry_t **sub_file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_file_entry_t *sub_fsntfs_file_entry = NULL;\n\tsystem_character_t *filename                  = NULL;\n\tstatic char *function                         = \"mount_file_entry_get_sub_file_entry_by_index\";\n\tsize_t filename_size                          = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( sub_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid sub file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sub_file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid sub file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_sub_file_entry_by_index(\n\t     file_entry->fsntfs_file_entry,\n\t     sub_file_entry_index,\n\t     &sub_fsntfs_file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve sub file entry: %d.\",\n\t\t function,\n\t\t sub_file_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_system_get_filename_from_file_entry(\n\t     file_entry->file_system,\n\t     sub_fsntfs_file_entry,\n\t     &filename,\n\t     &filename_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve filename of sub file entry: %d.\",\n\t\t function,\n\t\t sub_file_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_initialize(\n\t     sub_file_entry,\n\t     file_entry->file_system,\n\t     filename,\n\t     filename_size - 1,\n\t     sub_fsntfs_file_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize sub file entry: %d.\",\n\t\t function,\n\t\t sub_file_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( filename != NULL )\n\t{\n\t\tmemory_free(\n\t\t filename );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( filename != NULL )\n\t{\n\t\tmemory_free(\n\t\t filename );\n\t}\n\tif( sub_fsntfs_file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &sub_fsntfs_file_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads data at a specific offset\n * Returns the number of bytes read or -1 on error\n */\nssize_t mount_file_entry_read_buffer_at_offset(\n         mount_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_read_buffer_at_offset\";\n\tsize64_t file_size    = 0;\n\tssize_t read_count    = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO certain files have no default data stream such as $ObjId\n * for now work-around this\n */\n\tif( libfsntfs_file_entry_get_size(\n\t     file_entry->fsntfs_file_entry,\n\t     &file_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry->fsntfs_file_entry,\n\t              buffer,\n\t              buffer_size,\n\t              offset,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read buffer at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") from file entry.\",\n\t\t function,\n\t\t offset,\n\t\t offset );\n\n\t\treturn( -1 );\n\t}\n\treturn( read_count );\n}\n\n/* Retrieves the size\n * Returns 1 if successful or -1 on error\n */\nint mount_file_entry_get_size(\n     mount_file_entry_t *file_entry,\n     size64_t *size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_entry_get_size\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_entry_get_size(\n\t     file_entry->fsntfs_file_entry,\n\t     size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size from file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/mount_file_entry.h",
    "content": "/*\n * Mount file entry\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_FILE_ENTRY_H )\n#define _MOUNT_FILE_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_system.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct mount_file_entry mount_file_entry_t;\n\nstruct mount_file_entry\n{\n\t/* The file system\n\t */\n\tmount_file_system_t *file_system;\n\n\t/* The name\n\t */\n\tsystem_character_t *name;\n\n\t/* The name size\n\t */\n\tsize_t name_size;\n\n\t/* The file entry\n\t */\n\tlibfsntfs_file_entry_t *fsntfs_file_entry;\n};\n\nint mount_file_entry_initialize(\n     mount_file_entry_t **file_entry,\n     mount_file_system_t *file_system,\n     const system_character_t *name,\n     size_t name_length,\n     libfsntfs_file_entry_t *fsntfs_file_entry,\n     libcerror_error_t **error );\n\nint mount_file_entry_free(\n     mount_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_parent_file_entry(\n     mount_file_entry_t *file_entry,\n     mount_file_entry_t **parent_file_entry,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_creation_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *creation_time,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_access_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *access_time,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_modification_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *modification_time,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_inode_change_time(\n     mount_file_entry_t *file_entry,\n     uint64_t *inode_change_time,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_file_mode(\n     mount_file_entry_t *file_entry,\n     uint16_t *file_mode,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_name_size(\n     mount_file_entry_t *file_entry,\n     size_t *string_size,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_name(\n     mount_file_entry_t *file_entry,\n     system_character_t *string,\n     size_t string_size,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_symbolic_link_target(\n     mount_file_entry_t *file_entry,\n     system_character_t *string,\n     size_t string_size,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_number_of_sub_file_entries(\n     mount_file_entry_t *file_entry,\n     int *number_of_sub_entries,\n     libcerror_error_t **error );\n\nint mount_file_entry_get_sub_file_entry_by_index(\n     mount_file_entry_t *file_entry,\n     int sub_file_entry_index,\n     mount_file_entry_t **sub_file_entry,\n     libcerror_error_t **error );\n\nssize_t mount_file_entry_read_buffer_at_offset(\n         mount_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error );\n\nint mount_file_entry_get_size(\n     mount_file_entry_t *file_entry,\n     size64_t *size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_FILE_ENTRY_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_file_system.c",
    "content": "/*\n * Mount file system\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_SYS_STAT_H )\n#include <sys/stat.h>\n#endif\n\n#if defined( HAVE_SYS_TIME_H )\n#include <sys/time.h>\n#endif\n\n#include <time.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_system.h\"\n#include \"mount_path_string.h\"\n\n/* Creates a file system\n * Make sure the value file_system is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_initialize(\n     mount_file_system_t **file_system,\n     libcerror_error_t **error )\n{\n#if defined( WINAPI )\n\tFILETIME filetime;\n\tSYSTEMTIME systemtime;\n\n#elif defined( HAVE_CLOCK_GETTIME )\n\tstruct timespec time_structure;\n#endif\n\n\tstatic char *function = \"mount_file_system_initialize\";\n\n#if defined( WINAPI )\n\tDWORD error_code      = 0;\n#else\n\tint64_t timestamp     = 0;\n#endif\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_system != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file system value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_system = memory_allocate_structure(\n\t                mount_file_system_t );\n\n\tif( *file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *file_system,\n\t     0,\n\t     sizeof( mount_file_system_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file system.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\n\t\treturn( -1 );\n\t}\n#if defined( WINAPI )\n\tif( memory_set(\n\t     &systemtime,\n\t     0,\n\t     sizeof( SYSTEMTIME ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear systemtime.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tGetSystemTime(\n\t &systemtime );\n\n\tif( SystemTimeToFileTime(\n\t     &systemtime,\n\t     &filetime ) == 0 )\n\t{\n\t\terror_code = GetLastError();\n\n\t\tlibcerror_system_set_error(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t error_code,\n\t\t \"%s: unable to retrieve FILETIME of current time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *file_system )->mounted_timestamp = ( (uint64_t) filetime.dwHighDateTime << 32 ) | filetime.dwLowDateTime;\n\n#elif defined( HAVE_CLOCK_GETTIME )\n\tif( clock_gettime(\n\t     CLOCK_REALTIME,\n\t     &time_structure ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve current time structure.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\ttimestamp = ( (int64_t) time_structure.tv_sec * 1000000000 ) + time_structure.tv_nsec;\n\n\t( *file_system )->mounted_timestamp = (uint64_t) timestamp;\n\n#else\n\ttimestamp = (int64_t) time( NULL );\n\n\tif( timestamp == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve current time.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\ttimestamp *= 1000000000;\n\n\t( *file_system )->mounted_timestamp = (uint64_t) timestamp;\n\n#endif /* defined( HAVE_CLOCK_GETTIME ) */\n\n\treturn( 1 );\n\non_error:\n\tif( *file_system != NULL )\n\t{\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a file system\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_free(\n     mount_file_system_t **file_system,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_system_free\";\n\tint result            = 1;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_system != NULL )\n\t{\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\t}\n\treturn( result );\n}\n\n/* Signals the mount volume system to abort\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_signal_abort(\n     mount_file_system_t *file_system,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_system_signal_abort\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system->fsntfs_volume != NULL )\n\t{\n\t\tif( libfsntfs_volume_signal_abort(\n\t\t     file_system->fsntfs_volume,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to signal volume to abort.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Sets the volume\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_set_volume(\n     mount_file_system_t *file_system,\n     libfsntfs_volume_t *fsntfs_volume,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_system_set_volume\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfile_system->fsntfs_volume = fsntfs_volume;\n\n\treturn( 1 );\n}\n\n/* Retrieves the volume\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_get_volume(\n     mount_file_system_t *file_system,\n     libfsntfs_volume_t **fsntfs_volume,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_system_get_volume\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( fsntfs_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*fsntfs_volume = file_system->fsntfs_volume;\n\n\treturn( 1 );\n}\n\n/* Retrieves the mounted timestamp\n * On Windows the timestamp is an unsigned 64-bit FILETIME timestamp\n * otherwise the timestamp is a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_get_mounted_timestamp(\n     mount_file_system_t *file_system,\n     uint64_t *mounted_timestamp,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_file_system_get_mounted_timestamp\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mounted_timestamp == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mounted timestamp.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mounted_timestamp = file_system->mounted_timestamp;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file entry of a specific path\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint mount_file_system_get_file_entry_by_path(\n     mount_file_system_t *file_system,\n     const system_character_t *path,\n     size_t path_length,\n     libfsntfs_file_entry_t **fsntfs_file_entry,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *file_entry_path = NULL;\n\tstatic char *function               = \"mount_file_system_get_file_entry_by_path\";\n\tsize_t file_entry_path_length       = 0;\n\tsize_t file_entry_path_size         = 0;\n\tint result                          = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mount_path_string_copy_to_file_entry_path(\n\t     path,\n\t     path_length,\n\t     &file_entry_path,\n\t     &file_entry_path_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy path to file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* Need to determine length here since size is based on the worst case\n\t */\n\tfile_entry_path_length = system_string_length(\n\t                          file_entry_path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          file_system->fsntfs_volume,\n\t          (uint16_t *) file_entry_path,\n\t          file_entry_path_length,\n\t          fsntfs_file_entry,\n\t          error );\n#else\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          file_system->fsntfs_volume,\n\t          (uint8_t *) file_entry_path,\n\t          file_entry_path_length,\n\t          fsntfs_file_entry,\n\t          error );\n#endif\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry \",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmemory_free(\n\t file_entry_path );\n\n\treturn( result );\n\non_error:\n\tif( file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_path );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the filename from an file entry\n * Returns 1 if successful or -1 on error\n */\nint mount_file_system_get_filename_from_file_entry(\n     mount_file_system_t *file_system,\n     libfsntfs_file_entry_t *fsntfs_file_entry,\n     system_character_t **filename,\n     size_t *filename_size,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *file_entry_name = NULL;\n\tstatic char *function               = \"mount_file_system_get_filename_from_file_entry\";\n\tsize_t file_entry_name_size         = 0;\n\tint result                          = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          fsntfs_file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          fsntfs_file_entry,\n\t          &file_entry_name_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry name size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( file_entry_name_size == 0 )\n\t || ( file_entry_name_size > SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry name size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfile_entry_name = system_string_allocate(\n\t                   file_entry_name_size );\n\n\tif( file_entry_name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file entry name string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          fsntfs_file_entry,\n\t          (uint16_t *) file_entry_name,\n\t          file_entry_name_size,\n\t          error );\n#else\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          fsntfs_file_entry,\n\t          (uint8_t *) file_entry_name,\n\t          file_entry_name_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_path_string_copy_from_file_entry_path(\n\t     filename,\n\t     filename_size,\n\t     file_entry_name,\n\t     file_entry_name_size - 1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy filename from the file entry name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmemory_free(\n\t file_entry_name );\n\n\treturn( 1 );\n\non_error:\n\tif( file_entry_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_name );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/mount_file_system.h",
    "content": "/*\n * Mount file system\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_FILE_SYSTEM_H )\n#define _MOUNT_FILE_SYSTEM_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct mount_file_system mount_file_system_t;\n\nstruct mount_file_system\n{\n\t/* The mounted timestamp\n\t */\n\tuint64_t mounted_timestamp;\n\n\t/* The volume\n\t */\n\tlibfsntfs_volume_t *fsntfs_volume;\n};\n\nint mount_file_system_initialize(\n     mount_file_system_t **file_system,\n     libcerror_error_t **error );\n\nint mount_file_system_free(\n     mount_file_system_t **file_system,\n     libcerror_error_t **error );\n\nint mount_file_system_signal_abort(\n     mount_file_system_t *file_system,\n     libcerror_error_t **error );\n\nint mount_file_system_set_volume(\n     mount_file_system_t *file_system,\n     libfsntfs_volume_t *fsntfs_volume,\n     libcerror_error_t **error );\n\nint mount_file_system_get_volume(\n     mount_file_system_t *file_system,\n     libfsntfs_volume_t **fsntfs_volume,\n     libcerror_error_t **error );\n\nint mount_file_system_get_mounted_timestamp(\n     mount_file_system_t *file_system,\n     uint64_t *mounted_timestamp,\n     libcerror_error_t **error );\n\nint mount_file_system_get_file_entry_by_path(\n     mount_file_system_t *file_system,\n     const system_character_t *path,\n     size_t path_length,\n     libfsntfs_file_entry_t **fsntfs_file_entry,\n     libcerror_error_t **error );\n\nint mount_file_system_get_filename_from_file_entry(\n     mount_file_system_t *file_system,\n     libfsntfs_file_entry_t *fsntfs_file_entry,\n     system_character_t **filename,\n     size_t *filename_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_FILE_SYSTEM_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_fuse.c",
    "content": "/*\n * Mount tool fuse functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#if defined( HAVE_ERRNO_H ) || defined( WINAPI )\n#include <errno.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_UNISTD_H )\n#include <unistd.h>\n#endif\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libcnotify.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_unused.h\"\n#include \"mount_fuse.h\"\n#include \"mount_handle.h\"\n\nextern mount_handle_t *fsntfsmount_mount_handle;\n\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\n#if ( SIZEOF_OFF_T != 8 ) && ( SIZEOF_OFF_T != 4 )\n#error Size of off_t not supported\n#endif\n\n/* Sets the values in a stat info structure\n * The time values are a signed 64-bit POSIX date and time value in number of nanoseconds\n * Returns 1 if successful or -1 on error\n */\nint mount_fuse_set_stat_info(\n     struct stat *stat_info,\n     size64_t size,\n     uint16_t file_mode,\n     int64_t access_time,\n     int64_t inode_change_time,\n     int64_t modification_time,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_fuse_set_stat_info\";\n\n\tif( stat_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid stat info.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if SIZEOF_OFF_T <= 4\n\tif( size > (size64_t) UINT32_MAX )\n#else\n\tif( size > (size64_t) INT64_MAX )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstat_info->st_size  = (off_t) size;\n\tstat_info->st_mode  = file_mode;\n\n\tif( ( file_mode & 0x4000 ) != 0 )\n\t{\n\t\tstat_info->st_nlink = 2;\n\t}\n\telse\n\t{\n\t\tstat_info->st_nlink = 1;\n\t}\n#if defined( HAVE_GETEUID )\n\tstat_info->st_uid = geteuid();\n#endif\n#if defined( HAVE_GETEGID )\n\tstat_info->st_gid = getegid();\n#endif\n\n\tstat_info->st_atime = access_time / 1000000000;\n\tstat_info->st_ctime = inode_change_time / 1000000000;\n\tstat_info->st_mtime = modification_time / 1000000000;\n\n#if defined( STAT_HAVE_NSEC )\n\tstat_info->st_atime_nsec = access_time % 1000000000;\n\tstat_info->st_ctime_nsec = inode_change_time % 1000000000;\n\tstat_info->st_mtime_nsec = modification_time % 1000000000;\n#endif\n\treturn( 1 );\n}\n\n/* Fills a directory entry\n * Returns 1 if successful or -1 on error\n */\nint mount_fuse_filldir(\n     void *buffer,\n     fuse_fill_dir_t filler,\n     const char *name,\n     struct stat *stat_info,\n     mount_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function      = \"mount_fuse_filldir\";\n\tsize64_t file_size         = 0;\n\tuint64_t access_time       = 0;\n\tuint64_t inode_change_time = 0;\n\tuint64_t modification_time = 0;\n\tuint16_t file_mode         = 0;\n\n\tif( filler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tif( mount_file_entry_get_size(\n\t\t     file_entry,\n\t\t     &file_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file entry size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_file_mode(\n\t\t     file_entry,\n\t\t     &file_mode,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file mode.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_access_time(\n\t\t     file_entry,\n\t\t     &access_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve access time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_modification_time(\n\t\t     file_entry,\n\t\t     &modification_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve modification time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mount_file_entry_get_inode_change_time(\n\t\t     file_entry,\n\t\t     &inode_change_time,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve inode change time.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( memory_set(\n\t     stat_info,\n\t     0,\n\t     sizeof( struct stat ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear stat info.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mount_fuse_set_stat_info(\n\t     stat_info,\n\t     file_size,\n\t     file_mode,\n\t     (int64_t) access_time,\n\t     (int64_t) inode_change_time,\n\t     (int64_t) modification_time,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set stat info.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFUSE3 )\n\tif( filler(\n\t     buffer,\n\t     name,\n\t     stat_info,\n\t     0,\n\t     0 ) == 1 )\n#else\n\tif( filler(\n\t     buffer,\n\t     name,\n\t     stat_info,\n\t     0 ) == 1 )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Opens a file or directory\n * Returns 0 if successful or a negative errno value otherwise\n */\nint mount_fuse_open(\n     const char *path,\n     struct fuse_file_info *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_open\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh != (uint64_t) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file information - file handle already set.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( ( file_info->flags & 0x03 ) != O_RDONLY )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\tresult = -EACCES;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     (mount_file_entry_t **) &( file_info->fh ),\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %s.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = -ENOENT;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Reads a buffer of data at the specified offset\n * Returns number of bytes read if successful or a negative errno value otherwise\n */\nint mount_fuse_read(\n     const char *path,\n     char *buffer,\n     size_t size,\n     off_t offset,\n     struct fuse_file_info *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_read\";\n\tssize_t read_count       = 0;\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( size > (size_t) INT_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh == (uint64_t) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file information - missing file handle.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tread_count = mount_file_entry_read_buffer_at_offset(\n\t              (mount_file_entry_t *) file_info->fh,\n\t              (void *) buffer,\n\t              size,\n\t              (off64_t) offset,\n\t              &error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from file entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\treturn( (int) read_count );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Releases a file entry\n * Returns 0 if successful or a negative errno value otherwise\n */\nint mount_fuse_release(\n     const char *path,\n     struct fuse_file_info *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_release\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh != (uint64_t) NULL )\n\t{\n\t\tif( mount_file_entry_free(\n\t\t     (mount_file_entry_t **) &( file_info->fh ),\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file entry.\",\n\t\t\t function );\n\n\t\t\tresult = -ENOENT;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Opens a directory\n * Returns 0 if successful or a negative errno value otherwise\n */\nint mount_fuse_opendir(\n     const char *path,\n     struct fuse_file_info *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_opendir\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh != (uint64_t) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file information - file handle already set.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_handle_get_file_entry_by_path(\n\t     fsntfsmount_mount_handle,\n\t     path,\n\t     (mount_file_entry_t **) &( file_info->fh ),\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry for path: %s.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = -ENOENT;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Reads a directory\n * Returns 0 if successful or a negative errno value otherwise\n */\n#if defined( HAVE_LIBFUSE3 )\nint mount_fuse_readdir(\n     const char *path,\n     void *buffer,\n     fuse_fill_dir_t filler,\n     off_t offset FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n     struct fuse_file_info *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n     enum fuse_readdir_flags flags FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#else\nint mount_fuse_readdir(\n     const char *path,\n     void *buffer,\n     fuse_fill_dir_t filler,\n     off_t offset FSNTFSTOOLS_ATTRIBUTE_UNUSED,\n     struct fuse_file_info *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#endif\n{\n\tstruct stat *stat_info                = NULL;\n\tlibcerror_error_t *error              = NULL;\n\tmount_file_entry_t *parent_file_entry = NULL;\n\tmount_file_entry_t *sub_file_entry    = NULL;\n\tstatic char *function                 = \"mount_fuse_readdir\";\n\tchar *name                            = NULL;\n\tsize_t name_size                      = 0;\n\tint number_of_sub_file_entries        = 0;\n\tint result                            = 0;\n\tint sub_file_entry_index              = 0;\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( offset )\n\n#if defined( HAVE_LIBFUSE3 )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( flags )\n#endif\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh == (uint64_t) NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file information - missing file handle.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tstat_info = memory_allocate_structure(\n\t             struct stat );\n\n\tif( stat_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create stat info.\",\n\t\t function );\n\n\t\tresult = errno;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_fuse_filldir(\n\t     buffer,\n\t     filler,\n\t     \".\",\n\t     stat_info,\n\t     (mount_file_entry_t *) file_info->fh,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set self directory entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tresult = mount_file_entry_get_parent_file_entry(\n\t          (mount_file_entry_t *) file_info->fh,\n\t          &parent_file_entry,\n\t          &error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_fuse_filldir(\n\t     buffer,\n\t     filler,\n\t     \"..\",\n\t     stat_info,\n\t     parent_file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set parent directory entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_free(\n\t     &parent_file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free parent file entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_number_of_sub_file_entries(\n\t     (mount_file_entry_t *) file_info->fh,\n\t     &number_of_sub_file_entries,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tfor( sub_file_entry_index = 0;\n\t     sub_file_entry_index < number_of_sub_file_entries;\n\t     sub_file_entry_index++ )\n\t{\n\t\tif( mount_file_entry_get_sub_file_entry_by_index(\n\t\t     (mount_file_entry_t *) file_info->fh,\n\t\t     sub_file_entry_index,\n\t\t     &sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_name_size(\n\t\t     sub_file_entry,\n\t\t     &name_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d name size.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tname = narrow_string_allocate(\n\t\t        name_size );\n\n\t\tif( name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create sub file entry: %d name.\",\n\t\t\t function );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_file_entry_get_name(\n\t\t     sub_file_entry,\n\t\t     name,\n\t\t     name_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub file entry: %d name.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mount_fuse_filldir(\n\t\t     buffer,\n\t\t     filler,\n\t\t     name,\n\t\t     stat_info,\n\t\t     sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t name );\n\n\t\tname = NULL;\n\n\t\tif( mount_file_entry_free(\n\t\t     &sub_file_entry,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free sub file entry: %d.\",\n\t\t\t function,\n\t\t\t sub_file_entry_index );\n\n\t\t\tresult = -EIO;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tmemory_free(\n\t stat_info );\n\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( name != NULL )\n\t{\n\t\tmemory_free(\n\t\t name );\n\t}\n\tif( sub_file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &sub_file_entry,\n\t\t NULL );\n\t}\n\tif( parent_file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &parent_file_entry,\n\t\t NULL );\n\t}\n\tif( stat_info != NULL )\n\t{\n\t\tmemory_free(\n\t\t stat_info );\n\t}\n\treturn( result );\n}\n\n/* Releases a directory entry\n * Returns 0 if successful or a negative errno value otherwise\n */\nint mount_fuse_releasedir(\n     const char *path,\n     struct fuse_file_info *file_info )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_releasedir\";\n\tint result               = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file information.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( file_info->fh != (uint64_t) NULL )\n\t{\n\t\tfile_info->fh = (uint64_t) NULL;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the file stat info\n * Returns 0 if successful or a negative errno value otherwise\n */\n#if defined( HAVE_LIBFUSE3 )\nint mount_fuse_getattr(\n     const char *path,\n     struct stat *stat_info,\n     struct fuse_file_info *file_info FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n#else\nint mount_fuse_getattr(\n     const char *path,\n     struct stat *stat_info )\n#endif\n{\n\tlibcerror_error_t *error       = NULL;\n\tmount_file_entry_t *file_entry = NULL;\n\tstatic char *function          = \"mount_fuse_getattr\";\n\tsize64_t file_size             = 0;\n\tuint64_t access_time           = 0;\n\tuint64_t inode_change_time     = 0;\n\tuint64_t modification_time     = 0;\n\tuint16_t file_mode             = 0;\n\tint result                     = 0;\n\n#if defined( HAVE_LIBFUSE3 )\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( file_info )\n#endif\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( stat_info == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid stat info.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     stat_info,\n\t     0,\n\t     sizeof( struct stat ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear stat info.\",\n\t\t function );\n\n\t\tresult = errno;\n\n\t\tgoto on_error;\n\t}\n\tresult = mount_handle_get_file_entry_by_path(\n\t          fsntfsmount_mount_handle,\n\t          path,\n\t          &file_entry,\n\t          &error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve value for: %s.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = -ENOENT;\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\treturn( -ENOENT );\n\t}\n\tif( mount_file_entry_get_size(\n\t     file_entry,\n\t     &file_size,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry size.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_file_mode(\n\t     file_entry,\n\t     &file_mode,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file mode.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_access_time(\n\t     file_entry,\n\t     &access_time,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_modification_time(\n\t     file_entry,\n\t     &modification_time,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_get_inode_change_time(\n\t     file_entry,\n\t     &inode_change_time,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve inode change time.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_fuse_set_stat_info(\n\t     stat_info,\n\t     file_size,\n\t     file_mode,\n\t     (int64_t) access_time,\n\t     (int64_t) inode_change_time,\n\t     (int64_t) modification_time,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set stat info.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_free(\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( result );\n}\n\n/* Reads the target of a symbolic link\n * Returns 0 if successful or a negative errno value otherwise\n */\nint mount_fuse_readlink(\n     const char *path,\n     char *buffer,\n     size_t size )\n{\n\tlibcerror_error_t *error       = NULL;\n\tmount_file_entry_t *file_entry = NULL;\n\tstatic char *function          = \"mount_fuse_readlink\";\n\tint result                     = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s\\n\",\n\t\t function,\n\t\t path );\n\t}\n#endif\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\tresult = -EINVAL;\n\n\t\tgoto on_error;\n\t}\n\tresult = mount_handle_get_file_entry_by_path(\n\t          fsntfsmount_mount_handle,\n\t          path,\n\t          &file_entry,\n\t          &error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve value for: %s.\",\n\t\t function,\n\t\t path );\n\n\t\tresult = -ENOENT;\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\treturn( -ENOENT );\n\t}\n\tif( mount_file_entry_get_symbolic_link_target(\n\t     file_entry,\n\t     buffer,\n\t     size,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve symbolic link target string.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_entry_free(\n\t     &file_entry,\n\t     &error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t &error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file entry.\",\n\t\t function );\n\n\t\tresult = -EIO;\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tmount_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( result );\n}\n\n/* Cleans up when fuse is done\n */\nvoid mount_fuse_destroy(\n      void *private_data FSNTFSTOOLS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"mount_fuse_destroy\";\n\n\tFSNTFSTOOLS_UNREFERENCED_PARAMETER( private_data )\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s\\n\",\n\t\t function );\n\t}\n#endif\n\tif( fsntfsmount_mount_handle != NULL )\n\t{\n\t\tif( mount_handle_free(\n\t\t     &fsntfsmount_mount_handle,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t &error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free mount handle.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn;\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcnotify_print_error_backtrace(\n\t\t error );\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn;\n}\n\n#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_fuse.h",
    "content": "/*\n * Mount tool fuse functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_FUSE_H )\n#define _MOUNT_FUSE_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\n#if !defined( FUSE_USE_VERSION ) && !defined( CYGFUSE )\n\n/* Ensure FUSE_USE_VERSION is defined before including fuse.h\n */\n#if defined( HAVE_LIBFUSE3 )\n#define FUSE_USE_VERSION\t30\n#else\n#define FUSE_USE_VERSION\t26\n#endif\n\n#endif /* !defined( FUSE_USE_VERSION ) && !defined( CYGFUSE ) */\n\n#if defined( HAVE_LIBFUSE )\n#include <fuse/fuse.h>\n#elif defined( HAVE_LIBFUSE3 )\n#include <fuse3/fuse.h>\n#elif defined( HAVE_LIBOSXFUSE )\n#include <osxfuse/fuse.h>\n#endif\n\n#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE ) */\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_entry.h\"\n#include \"mount_handle.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE )\n\nint mount_fuse_set_stat_info(\n     struct stat *stat_info,\n     size64_t size,\n     uint16_t file_mode,\n     int64_t access_time,\n     int64_t inode_change_time,\n     int64_t modification_time,\n     libcerror_error_t **error );\n\nint mount_fuse_filldir(\n     void *buffer,\n     fuse_fill_dir_t filler,\n     const char *name,\n     struct stat *stat_info,\n     mount_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nint mount_fuse_open(\n     const char *path,\n     struct fuse_file_info *file_info );\n\nint mount_fuse_read(\n     const char *path,\n     char *buffer,\n     size_t size,\n     off_t offset,\n     struct fuse_file_info *file_info );\n\nint mount_fuse_release(\n     const char *path,\n     struct fuse_file_info *file_info );\n\nint mount_fuse_opendir(\n     const char *path,\n     struct fuse_file_info *file_info );\n\n#if defined( HAVE_LIBFUSE3 )\nint mount_fuse_readdir(\n     const char *path,\n     void *buffer,\n     fuse_fill_dir_t filler,\n     off_t offset,\n     struct fuse_file_info *file_info,\n     enum fuse_readdir_flags flags );\n#else\nint mount_fuse_readdir(\n     const char *path,\n     void *buffer,\n     fuse_fill_dir_t filler,\n     off_t offset,\n     struct fuse_file_info *file_info );\n#endif\n\nint mount_fuse_releasedir(\n     const char *path,\n     struct fuse_file_info *file_info );\n\n#if defined( HAVE_LIBFUSE3 )\nint mount_fuse_getattr(\n     const char *path,\n     struct stat *stat_info,\n     struct fuse_file_info *file_info );\n#else\nint mount_fuse_getattr(\n     const char *path,\n     struct stat *stat_info );\n#endif\n\nint mount_fuse_readlink(\n     const char *path,\n     char *buffer,\n     size_t size );\n\nvoid mount_fuse_destroy(\n      void *private_data );\n\n#endif /* defined( HAVE_LIBFUSE ) || defined( HAVE_LIBFUSE3 ) || defined( HAVE_LIBOSXFUSE ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_FUSE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_handle.c",
    "content": "/*\n * Mount handle\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"fsntfstools_libbfio.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libcpath.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_entry.h\"\n#include \"mount_file_system.h\"\n#include \"mount_handle.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nextern \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Copies a string of a decimal value to a 64-bit value\n * Returns 1 if successful or -1 on error\n */\nint mount_handle_system_string_copy_from_64_bit_in_decimal(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function              = \"mount_handle_system_string_copy_from_64_bit_in_decimal\";\n\tsystem_character_t character_value = 0;\n\tsize_t string_index                = 0;\n\tuint8_t maximum_string_index       = 20;\n\tint8_t sign                        = 1;\n\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_64bit == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value 64-bit.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*value_64bit = 0;\n\n\tif( string[ string_index ] == (system_character_t) '-' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\n\t\tsign = -1;\n\t}\n\telse if( string[ string_index ] == (system_character_t) '+' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\t}\n\twhile( string_index < string_size )\n\t{\n\t\tif( string[ string_index ] == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( string_index > (size_t) maximum_string_index )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE,\n\t\t\t \"%s: string too large.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*value_64bit *= 10;\n\n\t\tif( ( string[ string_index ] >= (system_character_t) '0' )\n\t\t && ( string[ string_index ] <= (system_character_t) '9' ) )\n\t\t{\n\t\t\tcharacter_value = (system_character_t) ( string[ string_index ] - (system_character_t) '0' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported character value: %\" PRIc_SYSTEM \" at index: %d.\",\n\t\t\t function,\n\t\t\t string[ string_index ],\n\t\t\t string_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*value_64bit += character_value;\n\n\t\tstring_index++;\n\t}\n\tif( sign == -1 )\n\t{\n\t\t*value_64bit *= (uint64_t) -1;\n\t}\n\treturn( 1 );\n}\n\n/* Creates a mount handle\n * Make sure the value mount_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint mount_handle_initialize(\n     mount_handle_t **mount_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_handle_initialize\";\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mount_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid mount handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mount_handle = memory_allocate_structure(\n\t                 mount_handle_t );\n\n\tif( *mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create mount handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *mount_handle,\n\t     0,\n\t     sizeof( mount_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear mount handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_system_initialize(\n\t     &( ( *mount_handle )->file_system ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *mount_handle != NULL )\n\t{\n\t\tmemory_free(\n\t\t *mount_handle );\n\n\t\t*mount_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a mount handle\n * Returns 1 if successful or -1 on error\n */\nint mount_handle_free(\n     mount_handle_t **mount_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_handle_free\";\n\tint result            = 1;\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mount_handle != NULL )\n\t{\n\t\tif( mount_file_system_free(\n\t\t     &( ( *mount_handle )->file_system ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file system.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *mount_handle );\n\n\t\t*mount_handle = NULL;\n\t}\n\treturn( result );\n}\n\n/* Signals the mount handle to abort\n * Returns 1 if successful or -1 on error\n */\nint mount_handle_signal_abort(\n     mount_handle_t *mount_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_handle_signal_abort\";\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mount_file_system_signal_abort(\n\t     mount_handle->file_system,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to signal file system to abort.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Sets the volume offset\n * Returns 1 if successful or -1 on error\n */\nint mount_handle_set_offset(\n     mount_handle_t *mount_handle,\n     const system_character_t *string,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"mount_handle_set_offset\";\n\tsize_t string_length  = 0;\n\tuint64_t value_64bit  = 0;\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstring_length = system_string_length(\n\t                 string );\n\n\tif( mount_handle_system_string_copy_from_64_bit_in_decimal(\n\t     string,\n\t     string_length + 1,\n\t     &value_64bit,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy string to 64-bit decimal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tmount_handle->volume_offset = (off64_t) value_64bit;\n\n\treturn( 1 );\n}\n\n/* Opens the mount handle\n * Returns 1 if successful, 0 if not or -1 on error\n */\nint mount_handle_open(\n     mount_handle_t *mount_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle  = NULL;\n\tlibfsntfs_volume_t *fsntfs_volume = NULL;\n\tstatic char *function             = \"mount_handle_open\";\n\tsize_t filename_length            = 0;\n\tint result                        = 0;\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = system_string_length(\n\t                   filename );\n\n\tif( libbfio_file_range_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tif( libbfio_file_range_set_name_wide(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n#else\n\tif( libbfio_file_range_set_name(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to set file range name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_range_set(\n\t     file_io_handle,\n\t     mount_handle->volume_offset,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to set file range offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_initialize(\n\t     &fsntfs_volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          fsntfs_volume,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_system_set_volume(\n\t     mount_handle->file_system,\n\t     fsntfs_volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set volume in file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmount_handle->file_io_handle = file_io_handle;\n\n\treturn( 1 );\n\non_error:\n\tif( fsntfs_volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &fsntfs_volume,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Closes the mount handle\n * Returns the 0 if succesful or -1 on error\n */\nint mount_handle_close(\n     mount_handle_t *mount_handle,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_volume_t *fsntfs_volume = NULL;\n\tstatic char *function             = \"mount_handle_close\";\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mount_file_system_get_volume(\n\t     mount_handle->file_system,\n\t     &fsntfs_volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume from file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mount_file_system_set_volume(\n\t     mount_handle->file_system,\n\t     NULL,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set volume in file system.\",\n\t\t function );\n\n\t\tfsntfs_volume = NULL;\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_close(\n\t     fsntfs_volume,\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t \"%s: unable to close volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_free(\n\t     &fsntfs_volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_close(\n\t     mount_handle->file_io_handle,\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to close file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &( mount_handle->file_io_handle ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 0 );\n\non_error:\n\tif( fsntfs_volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &fsntfs_volume,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves a file entry for a specific path\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint mount_handle_get_file_entry_by_path(\n     mount_handle_t *mount_handle,\n     const system_character_t *path,\n     mount_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_file_entry_t *fsntfs_file_entry = NULL;\n\tconst system_character_t *filename        = NULL;\n\tstatic char *function                     = \"mount_handle_get_file_entry_by_path\";\n\tsize_t filename_length                    = 0;\n\tsize_t path_index                         = 0;\n\tsize_t path_length                        = 0;\n\tint result                                = 0;\n\n\tif( mount_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid mount handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tpath_length = system_string_length(\n\t               path );\n\n\tif( path_length == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid path length value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( path_length >= 2 )\n\t && ( path[ path_length - 1 ] == LIBCPATH_SEPARATOR ) )\n\t{\n\t\tpath_length--;\n\t}\n\tpath_index = path_length;\n\n\twhile( path_index > 0 )\n\t{\n\t\tif( path[ path_index ] == LIBCPATH_SEPARATOR )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tpath_index--;\n\t}\n\t/* Ignore the name of the root item\n\t */\n\tif( path_length == 0 )\n\t{\n\t\tfilename        = _SYSTEM_STRING( \"\" );\n\t\tfilename_length = 0;\n\t}\n\telse\n\t{\n\t\tfilename        = &( path[ path_index + 1 ] );\n\t\tfilename_length = path_length - ( path_index + 1 );\n\t}\n\tresult = mount_file_system_get_file_entry_by_path(\n\t          mount_handle->file_system,\n\t          path,\n\t          path_length,\n\t          &fsntfs_file_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( mount_file_entry_initialize(\n\t\t     file_entry,\n\t\t     mount_handle->file_system,\n\t\t     filename,\n\t\t     filename_length,\n\t\t     fsntfs_file_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to initialize file entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( fsntfs_file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &fsntfs_file_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/mount_handle.h",
    "content": "/*\n * Mount handle\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_HANDLE_H )\n#define _MOUNT_HANDLE_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"fsntfstools_libbfio.h\"\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"mount_file_entry.h\"\n#include \"mount_file_system.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct mount_handle mount_handle_t;\n\nstruct mount_handle\n{\n\t/* The file system\n\t */\n\tmount_file_system_t *file_system;\n\n\t/* The volume offset\n\t */\n\toff64_t volume_offset;\n\n\t/* The libbfio file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* The notification output stream\n\t */\n\tFILE *notify_stream;\n};\n\nint mount_handle_system_string_copy_from_64_bit_in_decimal(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error );\n\nint mount_handle_initialize(\n     mount_handle_t **mount_handle,\n     libcerror_error_t **error );\n\nint mount_handle_free(\n     mount_handle_t **mount_handle,\n     libcerror_error_t **error );\n\nint mount_handle_signal_abort(\n     mount_handle_t *mount_handle,\n     libcerror_error_t **error );\n\nint mount_handle_set_offset(\n     mount_handle_t *mount_handle,\n     const system_character_t *string,\n     libcerror_error_t **error );\n\nint mount_handle_open(\n     mount_handle_t *mount_handle,\n     const system_character_t *filename,\n     libcerror_error_t **error );\n\nint mount_handle_close(\n     mount_handle_t *mount_handle,\n     libcerror_error_t **error );\n\nint mount_handle_get_file_entry_by_path(\n     mount_handle_t *mount_handle,\n     const system_character_t *path,\n     mount_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_HANDLE_H ) */\n\n"
  },
  {
    "path": "fsntfstools/mount_path_string.c",
    "content": "/*\n * Mount path string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libcpath.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libuna.h\"\n#include \"mount_path_string.h\"\n\n#if defined( WINAPI )\n#define ESCAPE_CHARACTER (system_character_t) '^'\n#else\n#define ESCAPE_CHARACTER (system_character_t) '\\\\'\n#endif\n\n/* Copies a string of a hexadecimal value to a 32-bit value\n * Returns 1 if successful or -1 on error\n */\nint mount_path_string_copy_hexadecimal_to_integer_32_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint32_t *value_32bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function              = \"mount_path_string_copy_hexadecimal_to_integer_32_bit\";\n\tsystem_character_t character_value = 0;\n\tsize_t string_index                = 0;\n\tuint32_t safe_value_32bit          = 0;\n\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( string_size == 0 )\n\t || ( string_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid string size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_32bit == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value 32-bit.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( string_index = 0;\n\t     string_index < string_size;\n\t     string_index++ )\n\t{\n\t\tsafe_value_32bit <<= 4;\n\n\t\tcharacter_value = string[ string_index ];\n\n\t\tif( ( character_value >= (system_character_t) '0' )\n\t\t && ( character_value <= (system_character_t) '9' ) )\n\t\t{\n\t\t\tsafe_value_32bit |= (uint8_t) ( character_value - (system_character_t) '0' );\n\t\t}\n#if defined( WINAPI )\n\t\telse if( ( character_value >= (system_character_t) 'A' )\n\t\t      && ( character_value <= (system_character_t) 'F' ) )\n\t\t{\n\t\t\tsafe_value_32bit |= (uint8_t) ( character_value - (system_character_t) 'A' + 10 );\n\t\t}\n#endif\n\t\telse if( ( character_value >= (system_character_t) 'a' )\n\t\t      && ( character_value <= (system_character_t) 'f' ) )\n\t\t{\n\t\t\tsafe_value_32bit |= (uint8_t) ( character_value - (system_character_t) 'a' + 10 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported character value: %\" PRIc_SYSTEM \" at index: %d.\",\n\t\t\t function,\n\t\t\t character_value,\n\t\t\t string_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*value_32bit = safe_value_32bit;\n\n\treturn( 1 );\n}\n\n/* Copies the path from a comparable file entry path\n * Returns 1 if successful or -1 on error\n */\nint mount_path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *safe_path                = NULL;\n\tstatic char *function                        = \"mount_path_string_copy_from_file_entry_path\";\n\tlibuna_unicode_character_t unicode_character = 0;\n\tsize_t file_entry_path_index                 = 0;\n\tsize_t path_index                            = 0;\n\tsize_t safe_path_size                        = 0;\n\tssize_t print_count                          = 0;\n\tint result                                   = 0;\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( file_entry_path_length == 0 )\n\t || ( file_entry_path_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry path length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Note that there is a worst-case of a 1 to 10 ratio for each escaped character.\n\t */\n\tif( file_entry_path_length > (size_t) ( ( SSIZE_MAX - 1 ) / ( sizeof( system_character_t ) * 10 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid value string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_path_size = ( file_entry_path_length * 10 ) + 1;\n\n\tsafe_path = system_string_allocate(\n\t             safe_path_size );\n\n\tif( safe_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( file_entry_path_index < file_entry_path_length )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_from_utf16(\n\t\t          &unicode_character,\n\t\t          (libuna_utf16_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_from_utf8(\n\t\t          &unicode_character,\n\t\t          (libuna_utf8_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character from file entry path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( unicode_character == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\t/* Replace:\n\t\t *   control characters ([U+1-U+1f, U+7f-U+9f]) by \\x## (or ^x## on Windows)\n\t\t *\n\t\t * On Windows replace:\n\t\t *   \\ by ^x5c\n\t\t *   <, >, :, \", /, |, ?, * by ^x##\n\t\t *\n\t\t * On other platforms replace:\n\t\t *   / by \\x2f\n\t\t */\n\t\tif( ( unicode_character <= 0x1f )\n\t\t || ( unicode_character == (libuna_unicode_character_t) LIBCPATH_SEPARATOR )\n#if defined( WINAPI )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '<' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '>' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) ':' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '\"' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '/' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '|' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '?' )\n\t\t || ( unicode_character == (libuna_unicode_character_t) '*' )\n#endif\n\t\t || ( ( unicode_character >= 0x7f )\n\t\t  &&  ( unicode_character <= 0x9f ) ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"x%02\" PRIx32 \"\" ),\n\t\t\t               ESCAPE_CHARACTER,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace by \\U######## (or ^U######## on Windows):\n\t\t *   Unicode surrogate characters ([U+d800-U+dfff])\n\t\t *   Undefined Unicode characters ([\n\t\t *       U+fdd0-U+fddf, U+fffe-U+ffff, U+1fffe-U+1ffff, U+2fffe-U+2ffff,\n\t\t *       U+3fffe-U+3ffff, U+4fffe-U+4ffff, U+5fffe-U+5ffff, U+6fffe-U+6ffff,\n\t\t *       U+7fffe-U+7ffff, U+8fffe-U+8ffff, U+9fffe-U+9ffff, U+afffe-U+affff,\n\t\t *       U+bfffe-U+bffff, U+cfffe-U+cffff, U+dfffe-U+dffff, U+efffe-U+effff,\n\t\t *       U+ffffe-U+fffff, U+10fffe-U+ffffffff])\n\t\t *   Observed unprintable characters ([\n\t\t *       U+2028, U+2029, U+e000, U+f8ff, U+f0000, U+ffffd, U+100000, U+10fffd])\n\t\t */\n\t\telse if( ( ( unicode_character >= 0x00002028UL )\n\t\t       &&  ( unicode_character <= 0x00002029UL ) )\n\t\t      || ( ( unicode_character >= 0x0000d800UL )\n\t\t       &&  ( unicode_character <= 0x0000dfffUL ) )\n\t\t      || ( unicode_character == 0x0000e000UL )\n\t\t      || ( unicode_character == 0x0000f8ffUL )\n\t\t      || ( ( unicode_character >= 0x0000fdd0UL )\n\t\t       &&  ( unicode_character <= 0x0000fddfUL ) )\n\t\t      || ( ( ( unicode_character & 0x0000ffffUL ) >= 0x0000fffeUL )\n\t\t       &&  ( ( unicode_character & 0x0000ffffUL ) <= 0x0000ffffUL ) )\n\t\t      || ( unicode_character == 0x000f0000UL )\n\t\t      || ( unicode_character == 0x000ffffdUL )\n\t\t      || ( unicode_character == 0x00100000UL )\n\t\t      || ( unicode_character >= 0x0010fffdUL ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"U%08\" PRIx32 \"\" ),\n\t\t\t               ESCAPE_CHARACTER,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace:\n\t\t *   Escape character (\\) by \\\\ (or ^ by ^^ on Windows)\n\t\t */\n\t\telse if( unicode_character == (libuna_unicode_character_t) ESCAPE_CHARACTER )\n\t\t{\n\t\t\tif( ( path_index + 2 ) > safe_path_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tsafe_path[ path_index++ ] = ESCAPE_CHARACTER;\n\t\t\tsafe_path[ path_index++ ] = (system_character_t) unicode_character;\n\t\t}\n\t\telse\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_unicode_character_copy_to_utf16(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf16_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_unicode_character_copy_to_utf8(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf8_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( path_index >= safe_path_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid path index value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_path[ path_index ] = 0;\n\n\t*path      = safe_path;\n\t*path_size = safe_path_size;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_path );\n\t}\n\treturn( -1 );\n}\n\n/* Copies the path to a comparable file entry path\n * Returns 1 if successful or -1 on error\n */\nint mount_path_string_copy_to_file_entry_path(\n     const system_character_t *path,\n     size_t path_length,\n     system_character_t **file_entry_path,\n     size_t *file_entry_path_size,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *safe_file_entry_path     = NULL;\n\tstatic char *function                        = \"mount_path_string_copy_to_file_entry_path\";\n\tlibuna_unicode_character_t unicode_character = 0;\n\tsystem_character_t character                 = 0;\n\tsize_t file_entry_path_index                 = 0;\n\tsize_t path_index                            = 0;\n\tsize_t safe_file_entry_path_size             = 0;\n\tuint32_t escaped_value                       = 0;\n\tint result                                   = 0;\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( path_length == 0 )\n\t || ( path_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid string size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path[ 0 ] != (system_character_t) LIBCPATH_SEPARATOR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported path - path is not absolute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_file_entry_path_size = path_length + 1;\n\n\tif( safe_file_entry_path_size > (size_t) ( SSIZE_MAX / sizeof( system_character_t ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid file entry path size value exceeds maximum.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_file_entry_path = system_string_allocate(\n\t                        safe_file_entry_path_size );\n\n\tif( safe_file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( path_index < path_length )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_from_utf16(\n\t\t          &unicode_character,\n\t\t          (libuna_utf16_character_t *) path,\n\t\t          path_length,\n\t\t          &path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_from_utf8(\n\t\t          &unicode_character,\n\t\t          (libuna_utf8_character_t *) path,\n\t\t          path_length,\n\t\t          &path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character from path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( unicode_character == (libuna_unicode_character_t) LIBCPATH_SEPARATOR )\n\t\t{\n\t\t\tunicode_character = (libuna_unicode_character_t) LIBFSNTFS_SEPARATOR;\n\t\t}\n\t\telse if( unicode_character == (libuna_unicode_character_t) ESCAPE_CHARACTER )\n\t\t{\n\t\t\tif( ( path_index + 1 ) > path_length )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcharacter = path[ path_index++ ];\n\n\t\t\t/* Replace:\n\t\t\t *   \\x## (or ^x## on Windows) by control characters ([U+1-U+1f, U+7f-U+9f])\n\t\t\t *\n\t\t\t * On Windows replace:\n\t\t\t *   ^^ by ^\n\t\t\t *   ^x5c by \\\n\t\t\t *   ^x## by <, >, :, \", /, |, ?, *\n\t\t\t *\n\t\t\t * On other platforms replace:\n\t\t\t *   \\\\ by \\\n\t\t\t *   \\x2f by /\n\t\t\t */\n\t\t\tif( character == ESCAPE_CHARACTER )\n\t\t\t{\n\t\t\t\tescaped_value = (uint32_t) character;\n\t\t\t}\n#if defined( WINAPI )\n\t\t\telse if( ( character == (system_character_t) 'X' )\n\t\t\t      || ( character == (system_character_t) 'x' ) )\n#else\n\t\t\telse if( character == (system_character_t) 'x' )\n#endif\n\t\t\t{\n\t\t\t\tif( ( path_index + 2 ) > path_length )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t\t\t\t     &( path[ path_index ] ),\n\t\t\t\t     2,\n\t\t\t\t     &escaped_value,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t\t \"%s: unable to copy string of hexadecimal to 32-bit integer.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tpath_index += 2;\n\n\t\t\t\tif( ( ( escaped_value >= 0x01 )\n\t\t\t\t  &&  ( escaped_value <= 0x1f ) )\n\t\t\t\t || ( escaped_value == (uint32_t) LIBCPATH_SEPARATOR )\n#if defined( WINAPI )\n\t\t\t\t || ( escaped_value == (uint32_t) '<' )\n\t\t\t\t || ( escaped_value == (uint32_t) '>' )\n\t\t\t\t || ( escaped_value == (uint32_t) ':' )\n\t\t\t\t || ( escaped_value == (uint32_t) '\"' )\n\t\t\t\t || ( escaped_value == (uint32_t) '/' )\n\t\t\t\t || ( escaped_value == (uint32_t) '|' )\n\t\t\t\t || ( escaped_value == (uint32_t) '?' )\n\t\t\t\t || ( escaped_value == (uint32_t) '*' )\n#endif\n\t\t\t\t || ( ( escaped_value >= 0x7f )\n\t\t\t\t  &&  ( escaped_value <= 0x9f ) ) )\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid escaped character: %\" PRIc_SYSTEM \"x%02\" PRIx32 \" value out of bounds.\",\n\t\t\t\t\t function,\n\t\t\t\t\t ESCAPE_CHARACTER,\n\t\t\t\t\t escaped_value );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Replace \\U######## (or ^U######## on Windows) with:\n\t\t\t *   Unicode surrogate characters ([U+d800-U+dfff])\n\t\t\t *   Undefined Unicode characters ([\n\t\t\t *       U+fdd0-U+fddf, U+fffe-U+ffff, U+1fffe-U+1ffff, U+2fffe-U+2ffff,\n\t\t\t *       U+3fffe-U+3ffff, U+4fffe-U+4ffff, U+5fffe-U+5ffff, U+6fffe-U+6ffff,\n\t\t\t *       U+7fffe-U+7ffff, U+8fffe-U+8ffff, U+9fffe-U+9ffff, U+afffe-U+affff,\n\t\t\t *       U+bfffe-U+bffff, U+cfffe-U+cffff, U+dfffe-U+dffff, U+efffe-U+effff,\n\t\t\t *       U+ffffe-U+fffff, U+10fffe-U+ffffffff])\n\t\t\t *   Observed unprintable characters ([\n\t\t\t *       U+2028, U+2029, U+e000, U+f8ff, U+f0000, U+ffffd, U+100000, U+10fffd])\n\t\t\t */\n#if defined( WINAPI )\n\t\t\telse if( ( character == (system_character_t) 'U' )\n\t\t\t      || ( character == (system_character_t) 'u' ) )\n#else\n\t\t\telse if( character == (system_character_t) 'U' )\n#endif\n\t\t\t{\n\t\t\t\tif( ( path_index + 8 ) > path_length )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t\t\t\t     &( path[ path_index ] ),\n\t\t\t\t     8,\n\t\t\t\t     &escaped_value,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t\t \"%s: unable to copy string of hexadecimal to 32-bit integer.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tpath_index += 8;\n\n\t\t\t\tif( ( ( escaped_value >= 0x00002028UL )\n\t\t\t\t  &&  ( escaped_value <= 0x00002029UL ) )\n\t\t\t\t || ( ( escaped_value >= 0x0000d800UL )\n\t\t\t\t  &&  ( escaped_value <= 0x0000dfffUL ) )\n\t\t\t\t || ( escaped_value == 0x0000e000UL )\n\t\t\t\t || ( escaped_value == 0x0000f8ffUL )\n\t\t\t\t || ( ( escaped_value >= 0x0000fdd0UL )\n\t\t\t\t  &&  ( escaped_value <= 0x0000fddfUL ) )\n\t\t\t\t || ( ( ( escaped_value & 0x0000ffffUL ) >= 0x0000fffeUL )\n\t\t\t\t  &&  ( ( escaped_value & 0x0000ffffUL ) <= 0x0000ffffUL ) )\n\t\t\t\t || ( escaped_value == 0x000f0000UL )\n\t\t\t\t || ( escaped_value == 0x000ffffdUL )\n\t\t\t\t || ( escaped_value == 0x00100000UL )\n\t\t\t\t || ( escaped_value >= 0x0010fffdUL ) )\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid escaped character: %\" PRIc_SYSTEM \"U%08\" PRIx32 \" value out of bounds.\",\n\t\t\t\t\t function,\n\t\t\t\t\t ESCAPE_CHARACTER,\n\t\t\t\t\t escaped_value );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t\t\t \"%s: unsupported path - invalid character: %\" PRIc_SYSTEM \" after escape character: %\" PRIc_SYSTEM \".\",\n\t\t\t\t function,\n\t\t\t\t character,\n\t\t\t\t ESCAPE_CHARACTER );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tunicode_character = (libuna_unicode_character_t) escaped_value;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_to_utf16(\n\t\t          unicode_character,\n\t\t          (libuna_utf16_character_t *) safe_file_entry_path,\n\t\t          safe_file_entry_path_size,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_to_utf8(\n\t\t          unicode_character,\n\t\t          (libuna_utf8_character_t *) safe_file_entry_path,\n\t\t          safe_file_entry_path_size,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character to file entry path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_entry_path_index >= safe_file_entry_path_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry path index value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_file_entry_path[ file_entry_path_index ] = 0;\n\n\t*file_entry_path      = safe_file_entry_path;\n\t*file_entry_path_size = safe_file_entry_path_size;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_file_entry_path );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/mount_path_string.h",
    "content": "/*\n * Mount path string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _MOUNT_PATH_STRING_H )\n#define _MOUNT_PATH_STRING_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint mount_path_string_copy_hexadecimal_to_integer_32_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint32_t *value_32bit,\n     libcerror_error_t **error );\n\nint mount_path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error );\n\nint mount_path_string_copy_to_file_entry_path(\n     const system_character_t *path,\n     size_t path_length,\n     system_character_t **file_entry_path,\n     size_t *file_entry_path_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _MOUNT_PATH_STRING_H ) */\n\n"
  },
  {
    "path": "fsntfstools/path_string.c",
    "content": "/*\n * Path string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"fsntfstools_libcerror.h\"\n#include \"fsntfstools_libfsntfs.h\"\n#include \"fsntfstools_libuna.h\"\n#include \"path_string.h\"\n\n/* Copies a string of a hexadecimal value to a 32-bit value\n * Returns 1 if successful or -1 on error\n */\nint path_string_copy_hexadecimal_to_integer_32_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint32_t *value_32bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function              = \"path_string_copy_hexadecimal_to_integer_32_bit\";\n\tsystem_character_t character_value = 0;\n\tsize_t string_index                = 0;\n\tuint32_t safe_value_32bit          = 0;\n\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( string_size == 0 )\n\t || ( string_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid string size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_32bit == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value 32-bit.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( string_index = 0;\n\t     string_index < string_size;\n\t     string_index++ )\n\t{\n\t\tsafe_value_32bit <<= 4;\n\n\t\tcharacter_value = string[ string_index ];\n\n\t\tif( ( character_value >= (system_character_t) '0' )\n\t\t && ( character_value <= (system_character_t) '9' ) )\n\t\t{\n\t\t\tsafe_value_32bit |= (uint8_t) ( character_value - (system_character_t) '0' );\n\t\t}\n\t\telse if( ( character_value >= (system_character_t) 'a' )\n\t\t      && ( character_value <= (system_character_t) 'f' ) )\n\t\t{\n\t\t\tsafe_value_32bit |= (uint8_t) ( character_value - (system_character_t) 'a' + 10 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported character value: %\" PRIc_SYSTEM \" at index: %d.\",\n\t\t\t function,\n\t\t\t character_value,\n\t\t\t string_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*value_32bit = safe_value_32bit;\n\n\treturn( 1 );\n}\n\n/* Copies the path from a comparable file entry path\n * Returns 1 if successful or -1 on error\n */\nint path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *safe_path                = NULL;\n\tstatic char *function                        = \"path_string_copy_from_file_entry_path\";\n\tlibuna_unicode_character_t unicode_character = 0;\n\tsystem_character_t escape_character          = 0;\n\tsize_t file_entry_path_index                 = 0;\n\tsize_t path_index                            = 0;\n\tsize_t safe_path_size                        = 0;\n\tint print_count                              = 0;\n\tint result                                   = 0;\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( file_entry_path_length == 0 )\n\t || ( file_entry_path_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry path length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Note that there is a worst-case of a 1 to 10 ratio for each escaped character.\n\t */\n\tif( file_entry_path_length > (size_t) ( ( SSIZE_MAX - 1 ) / ( sizeof( system_character_t ) * 10 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid value string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_path_size = ( file_entry_path_length * 10 ) + 1;\n\n\tsafe_path = system_string_allocate(\n\t             safe_path_size );\n\n\tif( safe_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tescape_character = (system_character_t) '\\\\';\n\n\t/* Using UCS-2 or RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\twhile( file_entry_path_index < file_entry_path_length )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_from_ucs2(\n\t\t          &unicode_character,\n\t\t          (libuna_utf16_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_from_utf8_rfc2279(\n\t\t          &unicode_character,\n\t\t          (libuna_utf8_character_t *) file_entry_path,\n\t\t          file_entry_path_length,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character from value string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t/* Replace by \\x##:\n\t\t *   Control characters ([U+0-U+1f, U+7f-U+9f])\n\t\t */\n\t\tif( ( unicode_character <= 0x1f )\n\t\t || ( ( unicode_character >= 0x7f )\n\t\t  &&  ( unicode_character <= 0x9f ) ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"x%02\" PRIx32 \"\" ),\n\t\t\t               escape_character,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace by \\U########:\n\t\t *   Unicode surrogate characters ([U+d800-U+dfff])\n\t\t *   Undefined Unicode characters ([\n\t\t *       U+fdd0-U+fddf, U+fffe-U+ffff, U+1fffe-U+1ffff, U+2fffe-U+2ffff,\n\t\t *       U+3fffe-U+3ffff, U+4fffe-U+4ffff, U+5fffe-U+5ffff, U+6fffe-U+6ffff,\n\t\t *       U+7fffe-U+7ffff, U+8fffe-U+8ffff, U+9fffe-U+9ffff, U+afffe-U+affff,\n\t\t *       U+bfffe-U+bffff, U+cfffe-U+cffff, U+dfffe-U+dffff, U+efffe-U+effff,\n\t\t *       U+ffffe-U+fffff, U+10fffe-U+ffffffff])\n\t\t *   Observed unprintable characters ([\n\t\t *       U+2028, U+2029, U+e000, U+f8ff, U+f0000, U+ffffd, U+100000, U+10fffd])\n\t\t */\n\t\telse if( ( ( unicode_character >= 0x00002028UL )\n\t\t       &&  ( unicode_character <= 0x00002029UL ) )\n\t\t      || ( ( unicode_character >= 0x0000d800UL )\n\t\t       &&  ( unicode_character <= 0x0000dfffUL ) )\n\t\t      || ( unicode_character == 0x0000e000UL )\n\t\t      || ( unicode_character == 0x0000f8ffUL )\n\t\t      || ( ( unicode_character >= 0x0000fdd0UL )\n\t\t       &&  ( unicode_character <= 0x0000fddfUL ) )\n\t\t      || ( ( ( unicode_character & 0x0000ffffUL ) >= 0x0000fffeUL )\n\t\t       &&  ( ( unicode_character & 0x0000ffffUL ) <= 0x0000ffffUL ) )\n\t\t      || ( unicode_character == 0x000f0000UL )\n\t\t      || ( unicode_character == 0x000ffffdUL )\n\t\t      || ( unicode_character == 0x00100000UL )\n\t\t      || ( unicode_character >= 0x0010fffdUL ) )\n\t\t{\n\t\t\tprint_count = system_string_sprintf(\n\t\t\t               &( safe_path[ path_index ] ),\n\t\t\t               safe_path_size - path_index,\n\t\t\t               _SYSTEM_STRING( \"%\" PRIc_SYSTEM \"U%08\" PRIx32 \"\" ),\n\t\t\t               escape_character,\n\t\t\t               unicode_character );\n\n\t\t\tif( print_count < 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy escaped Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tpath_index += print_count;\n\t\t}\n\t\t/* Replace:\n\t\t *   Escape character (\\) by \\\\\n\t\t */\n\t\telse if( unicode_character == (libuna_unicode_character_t) escape_character )\n\t\t{\n\t\t\tif( ( path_index + 2 ) > safe_path_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tsafe_path[ path_index++ ] = escape_character;\n\t\t\tsafe_path[ path_index++ ] = (system_character_t) unicode_character;\n\t\t}\n\t\telse\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_unicode_character_copy_to_utf16(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf16_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_unicode_character_copy_to_utf8(\n\t\t\t          unicode_character,\n\t\t\t          (libuna_utf8_character_t *) safe_path,\n\t\t\t          safe_path_size,\n\t\t\t          &path_index,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t\t \"%s: unable to copy Unicode character to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tsafe_path[ path_index ] = 0;\n\n\t*path      = safe_path;\n\t*path_size = safe_path_size;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_path );\n\t}\n\treturn( -1 );\n}\n\n/* Copies the path to a comparable file entry path\n * Returns 1 if successful or -1 on error\n */\nint path_string_copy_to_file_entry_path(\n     const system_character_t *path,\n     size_t path_length,\n     system_character_t path_segment_separator,\n     system_character_t **file_entry_path,\n     size_t *file_entry_path_size,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *safe_file_entry_path     = NULL;\n\tstatic char *function                        = \"path_string_copy_to_file_entry_path\";\n\tlibuna_unicode_character_t unicode_character = 0;\n\tsystem_character_t character                 = 0;\n\tsystem_character_t escape_character          = 0;\n\tsize_t file_entry_path_index                 = 0;\n\tsize_t path_index                            = 0;\n\tsize_t safe_file_entry_path_size             = 0;\n\tuint32_t escaped_value                       = 0;\n\tint result                                   = 0;\n\n\tif( path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( path_length == 0 )\n\t || ( path_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid path length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_entry_path_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry path size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_file_entry_path_size = path_length + 1;\n\n\tif( safe_file_entry_path_size > (size_t) ( SSIZE_MAX / sizeof( system_character_t ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid file entry path size value exceeds maximum.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_file_entry_path = system_string_allocate(\n\t                        safe_file_entry_path_size );\n\n\tif( safe_file_entry_path == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file entry path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tescape_character = (system_character_t) '\\\\';\n\n\twhile( path_index < path_length )\n\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_from_utf16(\n\t\t          &unicode_character,\n\t\t          (libuna_utf16_character_t *) path,\n\t\t          path_length,\n\t\t          &path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_from_utf8(\n\t\t          &unicode_character,\n\t\t          (libuna_utf8_character_t *) path,\n\t\t          path_length,\n\t\t          &path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character from path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( unicode_character == (libuna_unicode_character_t) escape_character )\n\t\t{\n\t\t\tif( ( path_index + 1 ) > path_length )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid path index value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcharacter = path[ path_index++ ];\n\n\t\t\t/* Replace:\n\t\t\t *   \\\\ by \\\n\t\t\t */\n\t\t\tif( character == escape_character )\n\t\t\t{\n\t\t\t\tescaped_value = (uint32_t) character;\n\t\t\t}\n\t\t\t/* Replace \\x## by:\n\t\t\t *   Control characters ([U+0-U+1f, U+7f-U+9f])\n\t\t\t */\n\t\t\telse if( character == (system_character_t) 'x' )\n\t\t\t{\n\t\t\t\tif( ( path_index + 2 ) > path_length )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid path - insufficient characters for escaped character value.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( path_string_copy_hexadecimal_to_integer_32_bit(\n\t\t\t\t     &( path[ path_index ] ),\n\t\t\t\t     2,\n\t\t\t\t     &escaped_value,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t\t \"%s: unable to copy string of hexadecimal to 32-bit integer.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tpath_index += 2;\n\n\t\t\t\tif( ( ( escaped_value >= 0x01 )\n\t\t\t\t  &&  ( escaped_value <= 0x1f ) )\n\t\t\t\t || ( ( escaped_value >= 0x7f )\n\t\t\t\t  &&  ( escaped_value <= 0x9f ) ) )\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid escaped character: %\" PRIc_SYSTEM \"x%02\" PRIx32 \" value out of bounds.\",\n\t\t\t\t\t function,\n\t\t\t\t\t escape_character,\n\t\t\t\t\t escaped_value );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Replace \\U######## with:\n\t\t\t *   Unicode surrogate characters ([U+d800-U+dfff])\n\t\t\t *   Undefined Unicode characters ([\n\t\t\t *       U+fdd0-U+fddf, U+fffe-U+ffff, U+1fffe-U+1ffff, U+2fffe-U+2ffff,\n\t\t\t *       U+3fffe-U+3ffff, U+4fffe-U+4ffff, U+5fffe-U+5ffff, U+6fffe-U+6ffff,\n\t\t\t *       U+7fffe-U+7ffff, U+8fffe-U+8ffff, U+9fffe-U+9ffff, U+afffe-U+affff,\n\t\t\t *       U+bfffe-U+bffff, U+cfffe-U+cffff, U+dfffe-U+dffff, U+efffe-U+effff,\n\t\t\t *       U+ffffe-U+fffff, U+10fffe-U+ffffffff])\n\t\t\t *   Observed unprintable characters ([\n\t\t\t *       U+2028, U+2029, U+e000, U+f8ff, U+f0000, U+ffffd, U+100000, U+10fffd])\n\t\t\t */\n\t\t\telse if( character == (system_character_t) 'U' )\n\t\t\t{\n\t\t\t\tif( ( path_index + 8 ) > path_length )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid path - insufficient characters for escaped character value.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( path_string_copy_hexadecimal_to_integer_32_bit(\n\t\t\t\t     &( path[ path_index ] ),\n\t\t\t\t     8,\n\t\t\t\t     &escaped_value,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t\t \"%s: unable to copy string of hexadecimal to 32-bit integer.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tpath_index += 8;\n\n\t\t\t\tif( ( ( escaped_value >= 0x00002028UL )\n\t\t\t\t  &&  ( escaped_value <= 0x00002029UL ) )\n\t\t\t\t || ( ( escaped_value >= 0x0000d800UL )\n\t\t\t\t  &&  ( escaped_value <= 0x0000dfffUL ) )\n\t\t\t\t || ( escaped_value == 0x0000e000UL )\n\t\t\t\t || ( escaped_value == 0x0000f8ffUL )\n\t\t\t\t || ( ( escaped_value >= 0x0000fdd0UL )\n\t\t\t\t  &&  ( escaped_value <= 0x0000fddfUL ) )\n\t\t\t\t || ( ( ( escaped_value & 0x0000ffffUL ) >= 0x0000fffeUL )\n\t\t\t\t  &&  ( ( escaped_value & 0x0000ffffUL ) <= 0x0000ffffUL ) )\n\t\t\t\t || ( escaped_value == 0x000f0000UL )\n\t\t\t\t || ( escaped_value == 0x000ffffdUL )\n\t\t\t\t || ( escaped_value == 0x00100000UL )\n\t\t\t\t || ( escaped_value >= 0x0010fffdUL ) )\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid escaped character: %\" PRIc_SYSTEM \"U%08\" PRIx32 \" value out of bounds.\",\n\t\t\t\t\t function,\n\t\t\t\t\t escape_character,\n\t\t\t\t\t escaped_value );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t\t\t \"%s: unsupported path - invalid character: %\" PRIc_SYSTEM \" after escape character: %\" PRIc_SYSTEM \".\",\n\t\t\t\t function,\n\t\t\t\t character,\n\t\t\t\t escape_character );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tunicode_character = (libuna_unicode_character_t) escaped_value;\n\t\t}\n\t\tif( unicode_character == (libuna_unicode_character_t) path_segment_separator )\n\t\t{\n\t\t\tunicode_character = (libuna_unicode_character_t) LIBFSNTFS_SEPARATOR;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_unicode_character_copy_to_ucs2(\n\t\t          unicode_character,\n\t\t          (libuna_utf16_character_t *) safe_file_entry_path,\n\t\t          safe_file_entry_path_size,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#else\n\t\tresult = libuna_unicode_character_copy_to_utf8_rfc2279(\n\t\t          unicode_character,\n\t\t          (libuna_utf8_character_t *) safe_file_entry_path,\n\t\t          safe_file_entry_path_size,\n\t\t          &file_entry_path_index,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t\t LIBCERROR_CONVERSION_ERROR_INPUT_FAILED,\n\t\t\t \"%s: unable to copy Unicode character to file entry path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_entry_path_index >= safe_file_entry_path_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid file entry path index value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_file_entry_path[ file_entry_path_index ] = 0;\n\n\t*file_entry_path      = safe_file_entry_path;\n\t*file_entry_path_size = safe_file_entry_path_size;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_file_entry_path );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "fsntfstools/path_string.h",
    "content": "/*\n * Path string functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PATH_STRING_H )\n#define _PATH_STRING_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfstools_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint path_string_copy_hexadecimal_to_integer_32_bit(\n     const system_character_t *string,\n     size_t string_size,\n     uint32_t *value_32bit,\n     libcerror_error_t **error );\n\nint path_string_copy_from_file_entry_path(\n     system_character_t **path,\n     size_t *path_size,\n     const system_character_t *file_entry_path,\n     size_t file_entry_path_length,\n     libcerror_error_t **error );\n\nint path_string_copy_to_file_entry_path(\n     const system_character_t *path,\n     size_t path_length,\n     system_character_t path_segment_separator,\n     system_character_t **file_entry_path,\n     size_t *file_entry_path_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PATH_STRING_H ) */\n\n"
  },
  {
    "path": "include/Makefile.am",
    "content": "include_HEADERS = \\\n\tlibfsntfs.h\n\npkginclude_HEADERS = \\\n\tlibfsntfs/codepage.h \\\n\tlibfsntfs/definitions.h \\\n\tlibfsntfs/error.h \\\n\tlibfsntfs/extern.h \\\n\tlibfsntfs/features.h \\\n\tlibfsntfs/types.h\n\nEXTRA_DIST = \\\n\tlibfsntfs.h.in \\\n\tlibfsntfs/definitions.h.in \\\n\tlibfsntfs/features.h.in \\\n\tlibfsntfs/types.h.in\n\nDISTCLEANFILES = \\\n\tlibfsntfs.h \\\n\tlibfsntfs/definitions.h \\\n\tlibfsntfs/features.h \\\n\tlibfsntfs/types.h \\\n\tMakefile \\\n\tMakefile.in\n\n"
  },
  {
    "path": "include/libfsntfs/codepage.h",
    "content": "/*\n * Codepage definitions for libfsntfs\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_CODEPAGE_H )\n#define _LIBFSNTFS_CODEPAGE_H\n\n#include <libfsntfs/types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* The codepage definitions\n */\nenum LIBFSNTFS_CODEPAGES\n{\n\tLIBFSNTFS_CODEPAGE_ASCII\t\t\t= 20127,\n\n\tLIBFSNTFS_CODEPAGE_ISO_8859_1\t\t\t= 28591,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_2\t\t\t= 28592,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_3\t\t\t= 28593,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_4\t\t\t= 28594,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_5\t\t\t= 28595,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_6\t\t\t= 28596,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_7\t\t\t= 28597,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_8\t\t\t= 28598,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_9\t\t\t= 28599,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_10\t\t\t= 28600,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_11\t\t\t= 28601,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_13\t\t\t= 28603,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_14\t\t\t= 28604,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_15\t\t\t= 28605,\n\tLIBFSNTFS_CODEPAGE_ISO_8859_16\t\t\t= 28606,\n\n\tLIBFSNTFS_CODEPAGE_KOI8_R\t\t\t= 20866,\n\tLIBFSNTFS_CODEPAGE_KOI8_U\t\t\t= 21866,\n\n\tLIBFSNTFS_CODEPAGE_WINDOWS_874\t\t\t= 874,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_932\t\t\t= 932,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_936\t\t\t= 936,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_949\t\t\t= 949,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_950\t\t\t= 950,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1250\t\t\t= 1250,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1251\t\t\t= 1251,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1252\t\t\t= 1252,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1253\t\t\t= 1253,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1254\t\t\t= 1254,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1255\t\t\t= 1255,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1256\t\t\t= 1256,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1257\t\t\t= 1257,\n\tLIBFSNTFS_CODEPAGE_WINDOWS_1258\t\t\t= 1258\n};\n\n#define LIBFSNTFS_CODEPAGE_US_ASCII\t\t\tLIBFSNTFS_CODEPAGE_ASCII\n\n#define LIBFSNTFS_CODEPAGE_ISO_WESTERN_EUROPEAN\t\tLIBFSNTFS_CODEPAGE_ISO_8859_1\n#define LIBFSNTFS_CODEPAGE_ISO_CENTRAL_EUROPEAN\t\tLIBFSNTFS_CODEPAGE_ISO_8859_2\n#define LIBFSNTFS_CODEPAGE_ISO_SOUTH_EUROPEAN\t\tLIBFSNTFS_CODEPAGE_ISO_8859_3\n#define LIBFSNTFS_CODEPAGE_ISO_NORTH_EUROPEAN\t\tLIBFSNTFS_CODEPAGE_ISO_8859_4\n#define LIBFSNTFS_CODEPAGE_ISO_CYRILLIC\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_5\n#define LIBFSNTFS_CODEPAGE_ISO_ARABIC\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_6\n#define LIBFSNTFS_CODEPAGE_ISO_GREEK\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_7\n#define LIBFSNTFS_CODEPAGE_ISO_HEBREW\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_8\n#define LIBFSNTFS_CODEPAGE_ISO_TURKISH\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_9\n#define LIBFSNTFS_CODEPAGE_ISO_NORDIC\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_10\n#define LIBFSNTFS_CODEPAGE_ISO_THAI\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_11\n#define LIBFSNTFS_CODEPAGE_ISO_BALTIC\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_13\n#define LIBFSNTFS_CODEPAGE_ISO_CELTIC\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_14\n\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_1\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_1\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_2\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_2\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_3\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_3\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_4\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_4\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_5\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_9\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_6\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_10\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_7\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_13\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_8\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_14\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_9\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_15\n#define LIBFSNTFS_CODEPAGE_ISO_LATIN_10\t\t\tLIBFSNTFS_CODEPAGE_ISO_8859_16\n\n#define LIBFSNTFS_CODEPAGE_KOI8_RUSSIAN\t\t\tLIBFSNTFS_CODEPAGE_KOI8_R\n#define LIBFSNTFS_CODEPAGE_KOI8_UKRAINIAN\t\tLIBFSNTFS_CODEPAGE_KOI8_U\n\n#define LIBFSNTFS_CODEPAGE_WINDOWS_THAI\t\t\tLIBFSNTFS_CODEPAGE_WINDOWS_874\n#define LIBFSNTFS_CODEPAGE_WINDOWS_JAPANESE\t\tLIBFSNTFS_CODEPAGE_WINDOWS_932\n#define LIBFSNTFS_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED\tLIBFSNTFS_CODEPAGE_WINDOWS_936\n#define LIBFSNTFS_CODEPAGE_WINDOWS_KOREAN\t\tLIBFSNTFS_CODEPAGE_WINDOWS_949\n#define LIBFSNTFS_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL\tLIBFSNTFS_CODEPAGE_WINDOWS_950\n#define LIBFSNTFS_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN\tLIBFSNTFS_CODEPAGE_WINDOWS_1250\n#define LIBFSNTFS_CODEPAGE_WINDOWS_CYRILLIC\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1251\n#define LIBFSNTFS_CODEPAGE_WINDOWS_WESTERN_EUROPEAN\tLIBFSNTFS_CODEPAGE_WINDOWS_1252\n#define LIBFSNTFS_CODEPAGE_WINDOWS_GREEK\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1253\n#define LIBFSNTFS_CODEPAGE_WINDOWS_TURKISH\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1254\n#define LIBFSNTFS_CODEPAGE_WINDOWS_HEBREW\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1255\n#define LIBFSNTFS_CODEPAGE_WINDOWS_ARABIC\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1256\n#define LIBFSNTFS_CODEPAGE_WINDOWS_BALTIC\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1257\n#define LIBFSNTFS_CODEPAGE_WINDOWS_VIETNAMESE\t\tLIBFSNTFS_CODEPAGE_WINDOWS_1258\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_CODEPAGE_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs/definitions.h.in",
    "content": "/*\n * Definitions for libfsntfs\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DEFINITIONS_H )\n#define _LIBFSNTFS_DEFINITIONS_H\n\n#include <libfsntfs/types.h>\n\n#define LIBFSNTFS_VERSION\t\t\t\t\t@VERSION@\n\n/* The version string\n */\n#define LIBFSNTFS_VERSION_STRING\t\t\t\t\"@VERSION@\"\n\n/* The file access\n * bit 1        set to 1 for read access\n * bit 2        set to 1 for write access\n * bit 3-8      not used\n */\nenum LIBFSNTFS_ACCESS_FLAGS\n{\n\tLIBFSNTFS_ACCESS_FLAG_READ\t\t\t\t= 0x01,\n/* Reserved: not supported yet */\n\tLIBFSNTFS_ACCESS_FLAG_WRITE\t\t\t\t= 0x02\n};\n\n/* The file access macros\n */\n#define LIBFSNTFS_OPEN_READ\t\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_READ )\n/* Reserved: not supported yet */\n#define LIBFSNTFS_OPEN_WRITE\t\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_WRITE )\n/* Reserved: not supported yet */\n#define LIBFSNTFS_OPEN_READ_WRITE\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_READ | LIBFSNTFS_ACCESS_FLAG_WRITE )\n\n/* The path segment separator\n */\n#define LIBFSNTFS_SEPARATOR\t\t\t\t\t'\\\\'\n\n/* The file attribute flags\n */\nenum LIBFSNTFS_FILE_ATTRIBUTE_FLAGS\n{\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY\t\t\t= 0x00000001UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN\t\t\t= 0x00000002UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM\t\t\t= 0x00000004UL,\n\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY\t\t\t= 0x00000010UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE\t\t\t= 0x00000020UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE\t\t\t= 0x00000040UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL\t\t\t= 0x00000080UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY\t\t\t= 0x00000100UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE\t\t= 0x00000200UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT\t\t= 0x00000400UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED\t\t= 0x00000800UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE\t\t\t= 0x00001000UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED\t= 0x00002000UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED\t\t\t= 0x00004000UL,\n\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL\t\t\t= 0x00010000UL\n};\n\n/* The attribute types\n */\nenum LIBFSNTFS_ATTRIBUTE_TYPES\n{\n\tLIBFSNTFS_ATTRIBUTE_TYPE_UNUSED\t\t\t\t= 0x00000000UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION\t\t= 0x00000010UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST\t\t\t= 0x00000020UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME\t\t\t= 0x00000030UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER\t\t= 0x00000040UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR\t\t= 0x00000050UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME\t\t\t= 0x00000060UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION\t\t= 0x00000070UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_DATA\t\t\t\t= 0x00000080UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT\t\t\t= 0x00000090UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION\t\t= 0x000000a0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_BITMAP\t\t\t\t= 0x000000b0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT\t\t\t= 0x000000c0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION\t\t= 0x000000d0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED\t\t\t= 0x000000e0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET\t\t\t= 0x000000f0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM\t\t= 0x00000100UL,\n\n\tLIBFSNTFS_ATTRIBUTE_TYPE_END_OF_ATTRIBUTES\t\t= 0xffffffffUL\n};\n\n/* The extent flag definitions\n */\nenum LIBFSNTFS_EXTENT_FLAGS\n{\n\t/* The extent is sparse\n\t */\n        LIBFSNTFS_EXTENT_FLAG_IS_SPARSE\t\t\t\t= 0x00000001UL,\n\n\t/* The extent is compressed\n\t */\n        LIBFSNTFS_EXTENT_FLAG_IS_COMPRESSED\t\t\t= 0x00000002UL\n};\n\n#endif /* !defined( _LIBFSNTFS_DEFINITIONS_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs/error.h",
    "content": "/*\n * The error code definitions for libfsntfs\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_ERROR_H )\n#define _LIBFSNTFS_ERROR_H\n\n#include <libfsntfs/types.h>\n\n/* External error type definition hides internal structure\n */\ntypedef intptr_t libfsntfs_error_t;\n\n/* The error domains\n */\nenum LIBFSNTFS_ERROR_DOMAINS\n{\n\tLIBFSNTFS_ERROR_DOMAIN_ARGUMENTS\t\t= (int) 'a',\n\tLIBFSNTFS_ERROR_DOMAIN_CONVERSION\t\t= (int) 'c',\n\tLIBFSNTFS_ERROR_DOMAIN_COMPRESSION\t\t= (int) 'C',\n\tLIBFSNTFS_ERROR_DOMAIN_IO\t\t\t= (int) 'I',\n\tLIBFSNTFS_ERROR_DOMAIN_INPUT\t\t\t= (int) 'i',\n\tLIBFSNTFS_ERROR_DOMAIN_MEMORY\t\t\t= (int) 'm',\n\tLIBFSNTFS_ERROR_DOMAIN_OUTPUT\t\t\t= (int) 'o',\n\tLIBFSNTFS_ERROR_DOMAIN_RUNTIME\t\t\t= (int) 'r'\n};\n\n/* The argument error codes\n * to signify errors regarding arguments passed to a function\n */\nenum LIBFSNTFS_ARGUMENT_ERROR\n{\n\tLIBFSNTFS_ARGUMENT_ERROR_GENERIC\t\t= 0,\n\n\t/* The argument contains an invalid value\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_INVALID_VALUE\t\t= 1,\n\n\t/* The argument contains a value less than zero\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO\t= 2,\n\n\t/* The argument contains a value zero or less\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS\t= 3,\n\n\t/* The argument contains a value that exceeds the maximum\n\t * for the specific type\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM\t= 4,\n\n\t/* The argument contains a value that is too small\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_TOO_SMALL\t= 5,\n\n\t/* The argument contains a value that is too large\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_TOO_LARGE\t= 6,\n\n\t/* The argument contains a value that is out of bounds\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS\t= 7,\n\n\t/* The argument contains a value that is not supported\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_UNSUPPORTED_VALUE\t= 8,\n\n\t/* The argument contains a value that conficts with another argument\n\t */\n\tLIBFSNTFS_ARGUMENT_ERROR_CONFLICTING_VALUE\t= 9\n};\n\n/* The conversion error codes\n * to signify errors regarding conversions\n */\nenum LIBFSNTFS_CONVERSION_ERROR\n{\n\tLIBFSNTFS_CONVERSION_ERROR_GENERIC\t\t= 0,\n\n\t/* The conversion failed on the input\n\t */\n\tLIBFSNTFS_CONVERSION_ERROR_INPUT_FAILED\t\t= 1,\n\n\t/* The conversion failed on the output\n\t */\n\tLIBFSNTFS_CONVERSION_ERROR_OUTPUT_FAILED\t= 2\n};\n\n/* The compression error codes\n * to signify errors regarding compression\n */\nenum LIBFSNTFS_COMPRESSION_ERROR\n{\n\tLIBFSNTFS_COMPRESSION_ERROR_GENERIC\t\t= 0,\n\n\t/* The compression failed\n\t */\n\tLIBFSNTFS_COMPRESSION_ERROR_COMPRESS_FAILED\t= 1,\n\n\t/* The decompression failed\n\t */\n\tLIBFSNTFS_COMPRESSION_ERROR_DECOMPRESS_FAILED\t= 2\n};\n\n/* The input/output error codes\n * to signify errors regarding input/output\n */\nenum LIBFSNTFS_IO_ERROR\n{\n\tLIBFSNTFS_IO_ERROR_GENERIC\t\t\t= 0,\n\n\t/* The open failed\n\t */\n\tLIBFSNTFS_IO_ERROR_OPEN_FAILED\t\t\t= 1,\n\n\t/* The close failed\n\t */\n\tLIBFSNTFS_IO_ERROR_CLOSE_FAILED\t\t\t= 2,\n\n\t/* The seek failed\n\t */\n\tLIBFSNTFS_IO_ERROR_SEEK_FAILED\t\t\t= 3,\n\n\t/* The read failed\n\t */\n\tLIBFSNTFS_IO_ERROR_READ_FAILED\t\t\t= 4,\n\n\t/* The write failed\n\t */\n\tLIBFSNTFS_IO_ERROR_WRITE_FAILED\t\t\t= 5,\n\n\t/* Access denied\n\t */\n\tLIBFSNTFS_IO_ERROR_ACCESS_DENIED\t\t= 6,\n\n\t/* The resource is invalid i.e. a missing file\n\t */\n\tLIBFSNTFS_IO_ERROR_INVALID_RESOURCE\t\t= 7,\n\n\t/* The ioctl failed\n\t */\n\tLIBFSNTFS_IO_ERROR_IOCTL_FAILED\t\t\t= 8,\n\n\t/* The unlink failed\n\t */\n\tLIBFSNTFS_IO_ERROR_UNLINK_FAILED\t\t= 9\n};\n\n/* The input error codes\n * to signify errors regarding handing input data\n */\nenum LIBFSNTFS_INPUT_ERROR\n{\n\tLIBFSNTFS_INPUT_ERROR_GENERIC\t\t\t= 0,\n\n\t/* The input contains invalid data\n\t */\n\tLIBFSNTFS_INPUT_ERROR_INVALID_DATA\t\t= 1,\n\n\t/* The input contains an unsupported signature\n\t */\n\tLIBFSNTFS_INPUT_ERROR_SIGNATURE_MISMATCH\t= 2,\n\n\t/* A checksum in the input did not match\n\t */\n\tLIBFSNTFS_INPUT_ERROR_CHECKSUM_MISMATCH\t\t= 3,\n\n\t/* A value in the input did not match a previously\n\t * read value or calculated value\n\t */\n\tLIBFSNTFS_INPUT_ERROR_VALUE_MISMATCH\t\t= 4\n};\n\n/* The memory error codes\n * to signify errors regarding memory\n */\nenum LIBFSNTFS_MEMORY_ERROR\n{\n\tLIBFSNTFS_MEMORY_ERROR_GENERIC\t\t\t= 0,\n\n\t/* There is insufficient memory available\n\t */\n\tLIBFSNTFS_MEMORY_ERROR_INSUFFICIENT\t\t= 1,\n\n\t/* The memory failed to be copied\n\t */\n\tLIBFSNTFS_MEMORY_ERROR_COPY_FAILED\t\t= 2,\n\n\t/* The memory failed to be set\n\t */\n\tLIBFSNTFS_MEMORY_ERROR_SET_FAILED\t\t= 3\n};\n\n/* The output error codes\n */\nenum LIBFSNTFS_OUTPUT_ERROR\n{\n\tLIBFSNTFS_OUTPUT_ERROR_GENERIC\t\t\t= 0,\n\n\t/* There is insuficient space to write the output\n\t */\n\tLIBFSNTFS_OUTPUT_ERROR_INSUFFICIENT_SPACE\t= 1\n};\n\n/* The runtime error codes\n * to signify errors regarding runtime processing\n */\nenum LIBFSNTFS_RUNTIME_ERROR\n{\n\tLIBFSNTFS_RUNTIME_ERROR_GENERIC\t\t\t= 0,\n\n\t/* The value is missing\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_VALUE_MISSING\t\t= 1,\n\n\t/* The value was already set\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_VALUE_ALREADY_SET\t= 2,\n\n\t/* The creation and/or initialization of an internal structure failed\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_INITIALIZE_FAILED\t= 3,\n\n\t/* The resize of an internal structure failed\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_RESIZE_FAILED\t\t= 4,\n\n\t/* The free and/or finalization of an internal structure failed\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_FINALIZE_FAILED\t\t= 5,\n\n\t/* The value could not be determined\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_GET_FAILED\t\t= 6,\n\n\t/* The value could not be set\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_SET_FAILED\t\t= 7,\n\n\t/* The value could not be appended/prepended\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_APPEND_FAILED\t\t= 8,\n\n\t/* The value could not be copied\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_COPY_FAILED\t\t= 9,\n\n\t/* The value could not be removed\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_REMOVE_FAILED\t\t= 10,\n\n\t/* The value could not be printed\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_PRINT_FAILED\t\t= 11,\n\n\t/* The value was out of bounds\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS\t= 12,\n\n\t/* The value exceeds the maximum for its specific type\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM\t= 13,\n\n\t/* The value is unsupported\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_UNSUPPORTED_VALUE\t= 14,\n\n\t/* An abort was requested\n\t */\n\tLIBFSNTFS_RUNTIME_ERROR_ABORT_REQUESTED\t\t= 15\n};\n\n#endif /* !defined( _LIBFSNTFS_ERROR_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs/extern.h",
    "content": "/*\n * The extern definition\n *\n * This header should be included in header files that export or import\n * library functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_EXTERN_H )\n#define _LIBFSNTFS_EXTERN_H\n\n/* To export functions from the libfsntfs DLL define LIBFSNTFS_DLL_EXPORT\n * To import functions from the libfsntfs DLL define LIBFSNTFS_DLL_IMPORT\n * Otherwise use default extern statement\n */\n#if defined( LIBFSNTFS_DLL_EXPORT )\n#define LIBFSNTFS_EXTERN __declspec(dllexport)\n\n#elif defined( LIBFSNTFS_DLL_IMPORT )\n#define LIBFSNTFS_EXTERN extern __declspec(dllimport)\n\n#else\n#define LIBFSNTFS_EXTERN extern\n\n#endif\n\n#endif /* !defined( _LIBFSNTFS_EXTERN_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs/features.h.in",
    "content": "/*\n * Features of libfsntfs\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FEATURES_H )\n#define _LIBFSNTFS_FEATURES_H\n\n/* The libfsntfs type support features\n */\n#if defined( WINAPI ) || @HAVE_WIDE_CHARACTER_TYPE@\n#define LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE\t1\n#endif\n\n#if defined( WINAPI ) || @HAVE_MULTI_THREAD_SUPPORT@\n#define LIBFSNTFS_HAVE_MULTI_THREAD_SUPPORT\t1\n#endif\n\n#if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && @HAVE_LIBBFIO@ )\n#define LIBFSNTFS_HAVE_BFIO\t\t\t1\n#endif\n\n#if !defined( LIBFSNTFS_DEPRECATED )\n#if defined( __GNUC__ ) && __GNUC__ >= 3\n#define LIBFSNTFS_DEPRECATED\t__attribute__ ((__deprecated__))\n#elif defined( _MSC_VER )\n#define LIBFSNTFS_DEPRECATED\t__declspec(deprecated)\n#else\n#define LIBFSNTFS_DEPRECATED\n#endif\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FEATURES_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs/types.h.in",
    "content": "/*\n * Type definitions for libfsntfs\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_TYPES_H )\n#define _LIBFSNTFS_TYPES_H\n\n#include <libfsntfs/features.h>\n\n/* Integer type definitions\n */\n#if ( defined( _MSC_VER ) && ( _MSC_VER < 1600 ) ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) )\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Microsoft Visual Studio C++ before Visual Studio 2010 or earlier versions of the Borland C++ Builder\n * do not support the (u)int#_t type definitions but have __int# definitions instead\n */\n#if !defined( HAVE_INT8_T )\n#define HAVE_INT8_T\ntypedef __int8 int8_t;\n#endif\n\n#if !defined( HAVE_UINT8_T )\n#define HAVE_UINT8_T\ntypedef unsigned __int8 uint8_t;\n#endif\n\n#if !defined( HAVE_INT16_T )\n#define HAVE_INT16_T\ntypedef __int16 int16_t;\n#endif\n\n#if !defined( HAVE_UINT16_T )\n#define HAVE_UINT16_T\ntypedef unsigned __int16 uint16_t;\n#endif\n\n#if !defined( HAVE_INT32_T )\n#define HAVE_INT32_T\ntypedef __int32 int32_t;\n#endif\n\n#if !defined( HAVE_UINT32_T )\n#define HAVE_UINT32_T\ntypedef unsigned __int32 uint32_t;\n#endif\n\n#if !defined( HAVE_INT64_T )\n#define HAVE_INT64_T\ntypedef __int64 int64_t;\n#endif\n\n#if !defined( HAVE_UINT64_T )\n#define HAVE_UINT64_T\ntypedef unsigned __int64 uint64_t;\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#elif defined( _MSC_VER ) || defined( __BORLANDC__ )\n\n/* Later versions of Microsoft Visual Studio C++ and Borland C/C++ define the types in <stdint.h>\n */\n#include <stdint.h>\n\n#else\n\n#if @HAVE_SYS_TYPES_H@ || defined( HAVE_SYS_TYPES_H )\n#include <sys/types.h>\n\n#else\n#error Missing system type definitions (sys/types.h)\n#endif\n\n/* Type definitions for compilers that have access to\n * <inttypes.h> or <stdint.h>\n */\n#if @HAVE_INTTYPES_H@ || defined( HAVE_INTTYPES_H )\n#include <inttypes.h>\n\n#elif @HAVE_STDINT_H@ || defined( HAVE_STDINT_H )\n#include <stdint.h>\n\n#else\n#error Missing integer type definitions (inttypes.h, stdint.h)\n#endif\n\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) )\n\n/* Microsoft Visual Studio C++ or earlier versions of the Borland C++ Builder\n * do not support the ssize_t type definition\n */\n#if !defined( HAVE_SSIZE_T )\n#define HAVE_SSIZE_T\n\n#if defined( _WIN64 )\ntypedef __int64 ssize_t;\n#else\ntypedef __int32 ssize_t;\n#endif\n\n#endif /* !defined( HAVE_SSIZE_T ) */\n\n#endif /* defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) */\n\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 )\n\n/* Earlier versions of Borland C++ Builder do not support the intptr_t type definition\n */\n#if !defined( HAVE_INTPTR_T )\n#define HAVE_INTPTR_T\n\n#if defined( _WIN64 )\ntypedef __int64\tintptr_t;\n#else\ntypedef __int32\tintptr_t;\n#endif\n\n#endif /* !defined( HAVE_INTPTR_T ) */\n\n#endif /* defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) */\n\n#if ( !defined( HAVE_SIZE32_T ) && ! @HAVE_SIZE32_T@ ) || HAVE_SIZE32_T == 0\n#define HAVE_SIZE32_T\t1\ntypedef uint32_t size32_t;\n#endif\n\n#if ( !defined( HAVE_SSIZE32_T ) && ! @HAVE_SSIZE32_T@ ) || HAVE_SSIZE32_T == 0\n#define HAVE_SSIZE32_T\t1\ntypedef int32_t ssize32_t;\n#endif\n\n#if ( !defined( HAVE_SIZE64_T ) && ! @HAVE_SIZE64_T@ ) || HAVE_SIZE64_T == 0\n#define HAVE_SIZE64_T\t1\ntypedef uint64_t size64_t;\n#endif\n\n#if ( !defined( HAVE_SSIZE64_T ) && ! @HAVE_SSIZE64_T@ ) || HAVE_SSIZE64_T == 0\n#define HAVE_SSIZE64_T\t1\ntypedef int64_t ssize64_t;\n#endif\n\n#if ( !defined( HAVE_OFF64_T ) && ! @HAVE_OFF64_T@ ) || HAVE_OFF64_T == 0\n#define HAVE_OFF64_T\t1\ntypedef int64_t off64_t;\n#endif\n\n/* Wide character definition\n */\n#if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0520 )\n#include <string.h>\n\n#elif defined( WINAPI )\n#include <wchar.h>\n\n#elif @HAVE_WCHAR_H@ || defined( HAVE_WCHAR_H )\n\n/* __USE_UNIX98 is required to add swprintf definition\n */\n#if !defined( __USE_UNIX98 )\n#define __USE_UNIX98\n#define LIBFSNTFS_DEFINITION_UNIX98\n#endif\n\n#include <wchar.h>\n\n#if defined( LIBFSNTFS_DEFINITION_UNIX98 )\n#undef __USE_UNIX98\n#undef LIBFSNTFS_DEFINITION_UNIX98\n#endif\n\n#endif\n\n/* The following type definitions hide internal data structures\n */\ntypedef intptr_t libfsntfs_attribute_t;\ntypedef intptr_t libfsntfs_attribute_list_entry_t;\ntypedef intptr_t libfsntfs_data_stream_t;\ntypedef intptr_t libfsntfs_file_entry_t;\ntypedef intptr_t libfsntfs_mft_metadata_file_t;\ntypedef intptr_t libfsntfs_usn_change_journal_t;\ntypedef intptr_t libfsntfs_volume_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_TYPES_H ) */\n\n"
  },
  {
    "path": "include/libfsntfs.h.in",
    "content": "/*\n * Library to access the New Technology File System (NTFS) format\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_H )\n#define _LIBFSNTFS_H\n\n#include <libfsntfs/codepage.h>\n#include <libfsntfs/definitions.h>\n#include <libfsntfs/error.h>\n#include <libfsntfs/extern.h>\n#include <libfsntfs/features.h>\n#include <libfsntfs/types.h>\n\n#include <stdio.h>\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n#include <libbfio.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n/* -------------------------------------------------------------------------\n * Support functions\n * ------------------------------------------------------------------------- */\n\n/* Returns the library version\n */\nLIBFSNTFS_EXTERN \\\nconst char *libfsntfs_get_version(\n             void );\n\n/* Returns the access flags for reading\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_get_access_flags_read(\n     void );\n\n/* Retrieves the narrow system string codepage\n * A value of 0 represents no codepage, UTF-8 encoding is used instead\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_get_codepage(\n     int *codepage,\n     libfsntfs_error_t **error );\n\n/* Sets the narrow system string codepage\n * A value of 0 represents no codepage, UTF-8 encoding is used instead\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_set_codepage(\n     int codepage,\n     libfsntfs_error_t **error );\n\n/* Determines if a file contains a NTFS volume signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature(\n     const char *filename,\n     libfsntfs_error_t **error );\n\n#if defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE )\n\n/* Determines if a file contains a NTFS volume signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_wide(\n     const wchar_t *filename,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE ) */\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Determines if a file contains a NTFS volume signature using a Basic File IO (bfio) handle\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Determines if a file contains a NTFS MFT metadata file signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature(\n     const char *filename,\n     libfsntfs_error_t **error );\n\n#if defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE )\n\n/* Determines if a file contains a NTFS MFT metadata file signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature_wide(\n     const wchar_t *filename,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE ) */\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Determines if a file contains a NTFS MFT metadata file signature using a Basic File IO (bfio) handle\n * Returns 1 if true, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* -------------------------------------------------------------------------\n * Notify functions\n * ------------------------------------------------------------------------- */\n\n/* Sets the verbose notification\n */\nLIBFSNTFS_EXTERN \\\nvoid libfsntfs_notify_set_verbose(\n      int verbose );\n\n/* Sets the notification stream\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_set_stream(\n     FILE *stream,\n     libfsntfs_error_t **error );\n\n/* Opens the notification stream using a filename\n * The stream is opened in append mode\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_stream_open(\n     const char *filename,\n     libfsntfs_error_t **error );\n\n/* Closes the notification stream if opened using a filename\n * Returns 0 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_stream_close(\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * Error functions\n * ------------------------------------------------------------------------- */\n\n/* Frees an error\n */\nLIBFSNTFS_EXTERN \\\nvoid libfsntfs_error_free(\n      libfsntfs_error_t **error );\n\n/* Prints a descriptive string of the error to the stream\n * Returns the number of printed characters if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_fprint(\n     libfsntfs_error_t *error,\n     FILE *stream );\n\n/* Prints a descriptive string of the error to the string\n * The end-of-string character is not included in the return value\n * Returns the number of printed characters if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size );\n\n/* Prints a backtrace of the error to the stream\n * Returns the number of printed characters if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_backtrace_fprint(\n     libfsntfs_error_t *error,\n     FILE *stream );\n\n/* Prints a backtrace of the error to the string\n * The end-of-string character is not included in the return value\n * Returns the number of printed characters if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_backtrace_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size );\n\n/* -------------------------------------------------------------------------\n * Volume functions\n * ------------------------------------------------------------------------- */\n\n/* Creates a volume\n * Make sure the value volume is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_initialize(\n     libfsntfs_volume_t **volume,\n     libfsntfs_error_t **error );\n\n/* Frees a volume\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_free(\n     libfsntfs_volume_t **volume,\n     libfsntfs_error_t **error );\n\n/* Signals the volume to abort its current activity\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_signal_abort(\n     libfsntfs_volume_t *volume,\n     libfsntfs_error_t **error );\n\n/* Opens a volume\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open(\n     libfsntfs_volume_t *volume,\n     const char *filename,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#if defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE )\n\n/* Opens a volume\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_wide(\n     libfsntfs_volume_t *volume,\n     const wchar_t *filename,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE ) */\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Opens a volume using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Closes a volume\n * Returns 0 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_close(\n     libfsntfs_volume_t *volume,\n     libfsntfs_error_t **error );\n\n/* Determines if the volume has BitLocker Drive Encryption (BDE)\n * Returns 1 if the volume has BitLocker Drive Encryption, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_has_bitlocker_drive_encryption(\n     libfsntfs_volume_t *volume,\n     libfsntfs_error_t **error );\n\n/* Determines if the volume has Volume Shadow Snapshots (VSS)\n * Returns 1 if the volume has Volume Shadow Snapshots, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_has_volume_shadow_snapshots(\n     libfsntfs_volume_t *volume,\n     libfsntfs_error_t **error );\n\n/* Retrieves the bytes per sector\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_bytes_per_sector(\n     libfsntfs_volume_t *volume,\n     uint16_t *bytes_per_sector,\n     libfsntfs_error_t **error );\n\n/* Retrieves the cluster block size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_cluster_block_size(\n     libfsntfs_volume_t *volume,\n     size32_t *cluster_block_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the MFT entry size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_mft_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *mft_entry_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the index entry size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_index_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *index_entry_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf8_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf8_name(\n     libfsntfs_volume_t *volume,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf16_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf16_name(\n     libfsntfs_volume_t *volume,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the format version\n * This value is retrieved from the $VOLUME_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_version(\n     libfsntfs_volume_t *volume,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libfsntfs_error_t **error );\n\n/* Retrieves the flags\n * This value is retrieved from the $VOLUME_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_flags(\n     libfsntfs_volume_t *volume,\n     uint16_t *flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the serial number\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_serial_number(\n     libfsntfs_volume_t *volume,\n     uint64_t *serial_number,\n     libfsntfs_error_t **error );\n\n/* Retrieves the root directory file entry\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_root_directory(\n     libfsntfs_volume_t *volume,\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of file entries (MFT entries)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_number_of_file_entries(\n     libfsntfs_volume_t *volume,\n     uint64_t *number_of_file_entries,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file entry of a specific MFT entry index\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_index(\n     libfsntfs_volume_t *volume,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file entry for an UTF-8 encoded path\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_utf8_path(\n     libfsntfs_volume_t *volume,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file entry for an UTF-16 encoded path\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_utf16_path(\n     libfsntfs_volume_t *volume,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the usn change journal\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_usn_change_journal(\n     libfsntfs_volume_t *volume,\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * File entry functions\n * ------------------------------------------------------------------------- */\n\n/* Frees a file entry\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_free(\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry is emtpy\n * Returns 1 if empty, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_empty(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry is allocated (MFT entry in use flag is set)\n * Returns 1 if allocated, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_allocated(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry is corrupted\n * Returns 1 if corrupted, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_corrupted(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file reference\n * This value is retrieved from the MFT entry\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the base record file reference\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_base_record_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the parent file reference\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_parent_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *parent_file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the parent file reference for a specific $FILE_NAME attribute\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint64_t *parent_file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the journal sequence number\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_journal_sequence_number(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *journal_sequence_number,\n     libfsntfs_error_t **error );\n\n/* Retrieves the creation date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the modification date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the access date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the entry modification date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file attribute flags\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file reference\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the creation date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the modification date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the access date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the entry modification date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_size(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file attribute flags\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the $FILE_NAME attribute index\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_name_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int *attribute_index,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name for a specific $FILE_NAME attribute\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name for a specific $FILE_NAME attribute\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name for a specific $FILE_NAME attribute\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded path hint for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded path hint for a specific $FILE_NAME attribute\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded path hint for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded path hint for a specific $FILE_NAME attribute\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded symbolic link target\n * The returned size includes the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded symbolic link target\n * The size should include the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded symbolic link target\n * The returned size includes the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded symbolic link target\n * The size should include the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the security descriptor (data) size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_security_descriptor_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *data_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the security descriptor (data)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_security_descriptor(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *data,\n     size_t data_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of attributes\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_attributes(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_attributes,\n     libfsntfs_error_t **error );\n\n/* Retrieves the attribute for the specific index\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_attribute_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     libfsntfs_attribute_t **attribute,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry has the directory entries ($I30) index\n * Returns 1 if the file entry has a directory entries index, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_directory_entries_index(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry has a default data stream (nameless $DATA attribute)\n * Returns 1 if the file entry has a default data stream, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_default_data_stream(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry has a $I30 entry\n * Returns 1 if the file entry has a $I30 entry, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_i30_entry(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Determines if the file entry is a symbolic link\n * Returns 1 if the file entry is a symbolic link, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_symbolic_link(\n     libfsntfs_file_entry_t *file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of alternate data streams\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_alternate_data_streams(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_alternate_data_streams,\n     libfsntfs_error_t **error );\n\n/* Retrieves the alternate data stream for the specific index\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int alternate_data_stream_index,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libfsntfs_error_t **error );\n\n/* Determines if there is an alternate data stream for an UTF-8 encoded name\n * Returns 1 if available, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_error_t **error );\n\n/* Determines if there is an alternate data stream for an UTF-16 encoded name\n * Returns 1 if available, 0 if not or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_error_t **error );\n\n/* Retrieves the alternate data stream for an UTF-8 encoded name\n * Returns 1 if successful, 0 if the file entry does not contain such value or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libfsntfs_error_t **error );\n\n/* Retrieves the alternate data stream for an UTF-16 encoded name\n * Returns 1 if successful, 0 if the file entry does not contain such value or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of sub file entries\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_sub_file_entries(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_sub_file_entries,\n     libfsntfs_error_t **error );\n\n/* Retrieves the sub file entry for the specific index\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int sub_file_entry_index,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the sub file entry for an UTF-8 encoded name\n * Returns 1 if successful, 0 if the file entry does not contain such value or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the sub file entry for an UTF-16 encoded name\n * Returns 1 if successful, 0 if the file entry does not contain such value or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libfsntfs_error_t **error );\n\n/* Reads data at the current offset from the default data stream (nameless $DATA attribute)\n * Returns the number of bytes read or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_file_entry_read_buffer(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         libfsntfs_error_t **error );\n\n/* Reads data at a specific offset from the default data stream (nameless $DATA attribute)\n * Returns the number of bytes read or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_file_entry_read_buffer_at_offset(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libfsntfs_error_t **error );\n\n/* Seeks a certain offset of in the default data stream (nameless $DATA attribute)\n * Returns the offset if seek is successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\noff64_t libfsntfs_file_entry_seek_offset(\n         libfsntfs_file_entry_t *file_entry,\n         off64_t offset,\n         int whence,\n         libfsntfs_error_t **error );\n\n/* Retrieves the current offset of the default data stream (nameless $DATA attribute)\n * Returns the offset if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_offset(\n     libfsntfs_file_entry_t *file_entry,\n     off64_t *offset,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_size(\n     libfsntfs_file_entry_t *file_entry,\n     size64_t *size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of extents (decoded data runs) of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_extents(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_extents,\n     libfsntfs_error_t **error );\n\n/* Retrieves a specific extent (decoded data run) of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_extent_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * Attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Frees an attribute\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_free(\n     libfsntfs_attribute_t **attribute,\n     libfsntfs_error_t **error );\n\n/* Retrieves the type\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_type(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *type,\n     libfsntfs_error_t **error );\n\n/* Retrieves the data flags\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *data_flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the data VCN range\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_vcn_range(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *data_first_vcn,\n     uint64_t *data_last_vcn,\n     libfsntfs_error_t **error );\n\n/* Retrieves the data size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *data_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the valid data size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_valid_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *valid_data_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $ATTRIBUTE_LIST attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the number of attribute list entries\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_attribute_get_number_of_entries(\n     libfsntfs_attribute_t *attribute,\n     int *number_of_entries,\n     libfsntfs_error_t **error );\n\n/* Retrieves a specific attribute list entry\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_attribute_get_entry_by_index(\n     libfsntfs_attribute_t *attribute,\n     int entry_index,\n     libfsntfs_attribute_list_entry_t **entry,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * Attribute list entry functions\n * ------------------------------------------------------------------------- */\n\n/* Frees an attribute list entry\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_free(\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libfsntfs_error_t **error );\n\n/* Retrieves the attribute type\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_attribute_type(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint32_t *attribute_type,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file reference\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_file_reference(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint64_t *file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf8_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf16_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $FILE_NAME attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the parent file reference\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_parent_file_reference(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *parent_file_reference,\n     libfsntfs_error_t **error );\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the modification date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the entry modification date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the name space\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_name_space(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *name_space,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $OBJECT_ID attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the droid file identifier\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the birth droid volume identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the birth droid file identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the birth droid domain identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $REPARSE_POINT attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the type and flags\n * The tag is a combination of the type and flags\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_tag(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *tag,\n     libfsntfs_error_t **error );\n\n/* Retrieves the Windows Overlay Filter (WOF) compression method\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_compression_method(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *compression_method,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $SECURITY_DESCRIPTOR attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the security descriptor (data) size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_security_descriptor_attribute_get_security_descriptor_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *data_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the security descriptor (data)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_security_descriptor_attribute_get_security_descriptor(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *data,\n     size_t data_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $STANDARD_INFORMATION attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the modification date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the entry modification date and time\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the owner identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_owner_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *owner_identifier,\n     libfsntfs_error_t **error );\n\n/* Retrieves the security descriptor identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *security_descriptor_identifier,\n     libfsntfs_error_t **error );\n\n/* Retrieves the update sequence number (USN)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_update_sequence_number(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *update_sequence_number,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $VOLUME_INFORMATION attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the version\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_information_attribute_get_version(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libfsntfs_error_t **error );\n\n/* Retrieves the flags\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_information_attribute_get_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *flags,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * $VOLUME_NAME attribute functions\n * ------------------------------------------------------------------------- */\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * Data stream functions\n * ------------------------------------------------------------------------- */\n\n/* Frees a data stream\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_free(\n     libfsntfs_data_stream_t **data_stream,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf8_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf8_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf16_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf16_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Reads data at the current offset\n * Returns the number of bytes read or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_data_stream_read_buffer(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         libfsntfs_error_t **error );\n\n/* Reads data at a specific offset\n * Returns the number of bytes read or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_data_stream_read_buffer_at_offset(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libfsntfs_error_t **error );\n\n/* Seeks a certain offset of the data\n * Returns the offset if seek is successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\noff64_t libfsntfs_data_stream_seek_offset(\n         libfsntfs_data_stream_t *data_stream,\n         off64_t offset,\n         int whence,\n         libfsntfs_error_t **error );\n\n/* Retrieves the current offset of the data\n * Returns the offset if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_offset(\n     libfsntfs_data_stream_t *data_stream,\n     off64_t *offset,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_size(\n     libfsntfs_data_stream_t *data_stream,\n     size64_t *size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of extents (decoded data runs)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_number_of_extents(\n     libfsntfs_data_stream_t *data_stream,\n     int *number_of_extents,\n     libfsntfs_error_t **error );\n\n/* Retrieves a specific extent (decoded data run)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_extent_by_index(\n     libfsntfs_data_stream_t *data_stream,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * MFT metadata file functions\n * ------------------------------------------------------------------------- */\n\n/* Creates a MFT metadata file\n * Make sure the value mft_metadata_file is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_initialize(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libfsntfs_error_t **error );\n\n/* Frees a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_free(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libfsntfs_error_t **error );\n\n/* Opens a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const char *filename,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#if defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE )\n\n/* Opens a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_wide(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const wchar_t *filename,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_WIDE_CHARACTER_TYPE ) */\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Opens a MFT metadata file using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Closes a MFT metadata file\n * Returns 0 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_close(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-8 encoded volume name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-8 encoded volume name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf8_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the size of the UTF-16 encoded volume name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the UTF-16 encoded volume name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf16_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libfsntfs_error_t **error );\n\n/* Retrieves the volume version\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_volume_version(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libfsntfs_error_t **error );\n\n/* Retrieves the volume flags\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_volume_flags(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *flags,\n     libfsntfs_error_t **error );\n\n/* Retrieves the number of file entries (MFT entries)\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_number_of_file_entries(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t *number_of_file_entries,\n     libfsntfs_error_t **error );\n\n/* Retrieves the file entry of a specific MFT entry index\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_file_entry_by_index(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_error_t **error );\n\n/* -------------------------------------------------------------------------\n * USN change journal functions\n * ------------------------------------------------------------------------- */\n\n/* Frees an USN change journal\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_usn_change_journal_free(\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libfsntfs_error_t **error );\n\n/* Retrieves the current offset of the USN change journal\n * Returns the offset if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_usn_change_journal_get_offset(\n     libfsntfs_usn_change_journal_t *usn_change_journal,\n     off64_t *offset,\n     libfsntfs_error_t **error );\n\n/* Reads an USN record from the USN change journal\n * Returns the number of bytes read if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_usn_change_journal_read_usn_record(\n         libfsntfs_usn_change_journal_t *usn_change_journal,\n         uint8_t *usn_record_data,\n         size_t usn_record_data_size,\n         libfsntfs_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_H ) */\n\n"
  },
  {
    "path": "libfsntfs/Makefile.am",
    "content": "AM_CPPFLAGS = \\\n\t-I../include -I$(top_srcdir)/include \\\n\t-I../common -I$(top_srcdir)/common \\\n\t@LIBCERROR_CPPFLAGS@ \\\n\t@LIBCTHREADS_CPPFLAGS@ \\\n\t@LIBCDATA_CPPFLAGS@ \\\n\t@LIBCLOCALE_CPPFLAGS@ \\\n\t@LIBCNOTIFY_CPPFLAGS@ \\\n\t@LIBCSPLIT_CPPFLAGS@ \\\n\t@LIBUNA_CPPFLAGS@ \\\n\t@LIBCFILE_CPPFLAGS@ \\\n\t@LIBCPATH_CPPFLAGS@ \\\n\t@LIBBFIO_CPPFLAGS@ \\\n\t@LIBFCACHE_CPPFLAGS@ \\\n\t@LIBFDATA_CPPFLAGS@ \\\n\t@LIBFDATETIME_CPPFLAGS@ \\\n\t@LIBFGUID_CPPFLAGS@ \\\n\t@LIBFWNT_CPPFLAGS@ \\\n\t@PTHREAD_CPPFLAGS@ \\\n\t@LIBFSNTFS_DLL_EXPORT@\n\nlib_LTLIBRARIES = libfsntfs.la\n\nlibfsntfs_la_SOURCES = \\\n\tfsntfs_file_name.h \\\n\tfsntfs_index.h \\\n\tfsntfs_logged_utility_stream.h \\\n\tfsntfs_mft_attribute.h \\\n\tfsntfs_mft_attribute_list.h \\\n\tfsntfs_mft_entry.h \\\n\tfsntfs_object_identifier.h \\\n\tfsntfs_reparse_point.h \\\n\tfsntfs_secure.h \\\n\tfsntfs_standard_information.h \\\n\tfsntfs_txf_data.h \\\n\tfsntfs_volume_header.h \\\n\tfsntfs_volume_information.h \\\n\tlibfsntfs.c \\\n\tlibfsntfs_attribute.c libfsntfs_attribute.h \\\n\tlibfsntfs_attribute_list_attribute.c libfsntfs_attribute_list_attribute.h \\\n\tlibfsntfs_attribute_list_entry.c libfsntfs_attribute_list_entry.h \\\n\tlibfsntfs_bitmap_values.c libfsntfs_bitmap_values.h \\\n\tlibfsntfs_buffer_data_handle.c libfsntfs_buffer_data_handle.h \\\n\tlibfsntfs_cluster_block.c libfsntfs_cluster_block.h \\\n\tlibfsntfs_cluster_block_data.c libfsntfs_cluster_block_data.h \\\n\tlibfsntfs_cluster_block_stream.c libfsntfs_cluster_block_stream.h \\\n\tlibfsntfs_cluster_block_vector.c libfsntfs_cluster_block_vector.h \\\n\tlibfsntfs_compressed_block.c libfsntfs_compressed_block.h \\\n\tlibfsntfs_compressed_block_data_handle.c libfsntfs_compressed_block_data_handle.h \\\n\tlibfsntfs_compressed_block_vector.c libfsntfs_compressed_block_vector.h \\\n\tlibfsntfs_compressed_data_handle.c libfsntfs_compressed_data_handle.h \\\n\tlibfsntfs_compression.c libfsntfs_compression.h \\\n\tlibfsntfs_compression_unit_data_handle.c libfsntfs_compression_unit_data_handle.h \\\n\tlibfsntfs_compression_unit_descriptor.c libfsntfs_compression_unit_descriptor.h \\\n\tlibfsntfs_data_run.c libfsntfs_data_run.h \\\n\tlibfsntfs_data_stream.c libfsntfs_data_stream.h \\\n\tlibfsntfs_debug.c libfsntfs_debug.h \\\n\tlibfsntfs_definitions.h \\\n\tlibfsntfs_directory_entries_tree.c libfsntfs_directory_entries_tree.h \\\n\tlibfsntfs_directory_entry.c libfsntfs_directory_entry.h \\\n\tlibfsntfs_error.c libfsntfs_error.h \\\n\tlibfsntfs_extent.c libfsntfs_extent.h \\\n\tlibfsntfs_extern.h \\\n\tlibfsntfs_file_entry.c libfsntfs_file_entry.h \\\n\tlibfsntfs_file_name_attribute.c libfsntfs_file_name_attribute.h \\\n\tlibfsntfs_file_name_values.c libfsntfs_file_name_values.h \\\n\tlibfsntfs_file_system.c libfsntfs_file_system.h \\\n\tlibfsntfs_fixup_values.c libfsntfs_fixup_values.h \\\n\tlibfsntfs_index.c libfsntfs_index.h \\\n\tlibfsntfs_index_entry.c libfsntfs_index_entry.h \\\n\tlibfsntfs_index_entry_header.c libfsntfs_index_entry_header.h \\\n\tlibfsntfs_index_entry_vector.c libfsntfs_index_entry_vector.h \\\n\tlibfsntfs_index_node.c libfsntfs_index_node.h \\\n\tlibfsntfs_index_node_header.c libfsntfs_index_node_header.h \\\n\tlibfsntfs_index_root_header.c libfsntfs_index_root_header.h \\\n\tlibfsntfs_index_value.c libfsntfs_index_value.h \\\n\tlibfsntfs_io_handle.c libfsntfs_io_handle.h \\\n\tlibfsntfs_libbfio.h \\\n\tlibfsntfs_libcdata.h \\\n\tlibfsntfs_libcerror.h \\\n\tlibfsntfs_libclocale.h \\\n\tlibfsntfs_libcnotify.h \\\n\tlibfsntfs_libcthreads.h \\\n\tlibfsntfs_libfcache.h \\\n\tlibfsntfs_libfdata.h \\\n\tlibfsntfs_libfdatetime.h \\\n\tlibfsntfs_libfguid.h \\\n\tlibfsntfs_libfwnt.h \\\n\tlibfsntfs_libuna.h \\\n\tlibfsntfs_logged_utility_stream_values.c libfsntfs_logged_utility_stream_values.h \\\n\tlibfsntfs_mft.c libfsntfs_mft.h \\\n\tlibfsntfs_mft_attribute.c libfsntfs_mft_attribute.h \\\n\tlibfsntfs_mft_attribute_list.c libfsntfs_mft_attribute_list.h \\\n\tlibfsntfs_mft_attribute_list_entry.c libfsntfs_mft_attribute_list_entry.h \\\n\tlibfsntfs_mft_entry.c libfsntfs_mft_entry.h \\\n\tlibfsntfs_mft_entry_header.c libfsntfs_mft_entry_header.h \\\n\tlibfsntfs_mft_metadata_file.c libfsntfs_mft_metadata_file.h \\\n\tlibfsntfs_name.c libfsntfs_name.h \\\n\tlibfsntfs_notify.c libfsntfs_notify.h \\\n\tlibfsntfs_object_identifier_attribute.c libfsntfs_object_identifier_attribute.h \\\n\tlibfsntfs_object_identifier_values.c libfsntfs_object_identifier_values.h \\\n\tlibfsntfs_path_hint.c libfsntfs_path_hint.h \\\n\tlibfsntfs_profiler.c libfsntfs_profiler.h \\\n\tlibfsntfs_reparse_point_attribute.c libfsntfs_reparse_point_attribute.h \\\n\tlibfsntfs_reparse_point_values.c libfsntfs_reparse_point_values.h \\\n\tlibfsntfs_sds_index_value.c libfsntfs_sds_index_value.h \\\n\tlibfsntfs_security_descriptor_attribute.c libfsntfs_security_descriptor_attribute.h \\\n\tlibfsntfs_security_descriptor_index.c libfsntfs_security_descriptor_index.h \\\n\tlibfsntfs_security_descriptor_index_value.c libfsntfs_security_descriptor_index_value.h \\\n\tlibfsntfs_security_descriptor_values.c libfsntfs_security_descriptor_values.h \\\n\tlibfsntfs_standard_information_attribute.c libfsntfs_standard_information_attribute.h \\\n\tlibfsntfs_standard_information_values.c libfsntfs_standard_information_values.h \\\n\tlibfsntfs_support.c libfsntfs_support.h \\\n\tlibfsntfs_types.h \\\n\tlibfsntfs_txf_data_values.c libfsntfs_txf_data_values.h \\\n\tlibfsntfs_unused.h \\\n\tlibfsntfs_usn_change_journal.c libfsntfs_usn_change_journal.h \\\n\tlibfsntfs_volume.c libfsntfs_volume.h \\\n\tlibfsntfs_volume_header.c libfsntfs_volume_header.h \\\n\tlibfsntfs_volume_information_attribute.c libfsntfs_volume_information_attribute.h \\\n\tlibfsntfs_volume_information_values.c libfsntfs_volume_information_values.h \\\n\tlibfsntfs_volume_name_attribute.c libfsntfs_volume_name_attribute.h \\\n\tlibfsntfs_volume_name_values.c libfsntfs_volume_name_values.h\n\nlibfsntfs_la_LIBADD = \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBCTHREADS_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBFCACHE_LIBADD@ \\\n\t@LIBFDATA_LIBADD@ \\\n\t@LIBFDATETIME_LIBADD@ \\\n\t@LIBFGUID_LIBADD@ \\\n\t@LIBFWNT_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nlibfsntfs_la_LDFLAGS = -no-undefined -version-info 1:0:0\n\nEXTRA_DIST = \\\n\tlibfsntfs_definitions.h.in \\\n\tlibfsntfs.rc \\\n\tlibfsntfs.rc.in\n\nDISTCLEANFILES = \\\n\tlibfsntfs_definitions.h \\\n\tlibfsntfs.rc \\\n\tMakefile \\\n\tMakefile.in\n\nsources-local: $(BUILT_SOURCES)\n\nsplint-local:\n\t@echo \"Running splint on libfsntfs ...\"\n\t-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfsntfs_la_SOURCES)\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_file_name.h",
    "content": "/*\n * The NTFS file name attribute ($FILE_NAME) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_FILE_NAME_H )\n#define _FSNTFS_FILE_NAME_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_file_name fsntfs_file_name_t;\n\nstruct fsntfs_file_name\n{\n\t/* The parent file reference\n\t * Consists of 8 bytes\n\t */\n\tuint8_t parent_file_reference[ 8 ];\n\n\t/* The creation date and time\n\t * Consists of 8 bytes\n\t * Contains a FILETIME\n\t */\n\tuint8_t creation_time[ 8 ];\n\n\t/* The last modification date and time\n\t * Consists of 8 bytes\n\t * Contains a FILETIME\n\t */\n\tuint8_t modification_time[ 8 ];\n\n\t/* The entry last modification date and time\n\t * Consists of 8 bytes\n\t * Contains a FILETIME\n\t */\n\tuint8_t entry_modification_time[ 8 ];\n\n\t/* The last access date and time\n\t * Consists of 8 bytes\n\t * Contains a FILETIME\n\t */\n\tuint8_t access_time[ 8 ];\n\n\t/* The allocated (or reserved) data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t allocated_data_size[ 8 ];\n\n\t/* The data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_size[ 8 ];\n\n\t/* The file attribute flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t file_attribute_flags[ 4 ];\n\n\t/* The extended data\n\t * Consists of 4 bytes\n\t */\n\tuint8_t extended_data[ 4 ];\n\n\t/* The name size\n\t * Consists of 1 byte\n\t * Contains the number of characters without the end-of-string character\n\t */\n\tuint8_t name_size;\n\n\t/* The name space\n\t * Consists of 1 byte\n\t */\n\tuint8_t name_space;\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_FILE_NAME_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_index.h",
    "content": "/*\n * The NTFS index definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_INDEX_H )\n#define _FSNTFS_INDEX_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_index_root_header fsntfs_index_root_header_t;\n\nstruct fsntfs_index_root_header\n{\n\t/* The attribute type\n\t * Consists of 4 bytes\n\t */\n\tuint8_t attribute_type[ 4 ];\n\n\t/* The collation type\n\t * Consists of 4 bytes\n\t */\n\tuint8_t collation_type[ 4 ];\n\n\t/* The index entry size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t index_entry_size[ 4 ];\n\n\t/* The index entry number of cluster blocks\n\t * Consists of 4 bytes\n\t */\n\tuint8_t index_entry_number_of_cluster_blocks[ 4 ];\n};\n\ntypedef struct fsntfs_index_entry_header fsntfs_index_entry_header_t;\n\nstruct fsntfs_index_entry_header\n{\n\t/* The signature\n\t * Consists of 4 bytes\n\t * Contains: \"INDX\"\n\t */\n\tuint8_t signature[ 4 ];\n\n\t/* The fixup values offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t fixup_values_offset[ 2 ];\n\n\t/* The number of fixup values\n\t * Consists of 2 bytes\n\t */\n\tuint8_t number_of_fixup_values[ 2 ];\n\n\t/* The journal sequence number\n\t * Consists of 8 bytes\n\t */\n\tuint8_t journal_sequence_number[ 8 ];\n\n\t/* The virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t vcn[ 8 ];\n};\n\ntypedef struct fsntfs_index_node_header fsntfs_index_node_header_t;\n\nstruct fsntfs_index_node_header\n{\n\t/* The index values offset\n\t * Consists of 4 bytes\n\t * Contains a value relative to the start of the index node header\n\t */\n\tuint8_t index_values_offset[ 4 ];\n\n\t/* The size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t size[ 4 ];\n\n\t/* The allocated size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t allocated_size[ 4 ];\n\n\t/* The flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t flags[ 4 ];\n\n\t/* The index values\n\t */\n};\n\ntypedef struct fsntfs_index_value fsntfs_index_value_t;\n\nstruct fsntfs_index_value\n{\n\t/* The file reference\n\t * Consists of 8 bytes\n\t */\n\tuint8_t file_reference[ 8 ];\n\n\t/* The index value size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t size[ 2 ];\n\n\t/* The index value key data size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t key_data_size[ 2 ];\n\n\t/* The index value flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t flags[ 4 ];\n\n\t/* The index value key and value data\n\t */\n\n\t/* The sub node virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_INDEX_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_logged_utility_stream.h",
    "content": "/*\n * The NTFS logged utillity stream attribute ($LOGGED_UTILITY_STREAM) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_LOGGED_UTILITY_STREAM_H )\n#define _FSNTFS_LOGGED_UTILITY_STREAM_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_logged_utility_stream fsntfs_logged_utility_stream_t;\n\nstruct fsntfs_logged_utility_stream\n{\n\t/* The type and flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t type[ 4 ];\n\n\t/* The data size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t data_size[ 2 ];\n\n\t/* Padding\n\t * Consists of 2 bytes\n\t */\n\tuint8_t padding1[ 2 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_LOGGED_UTILITY_STREAM_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_mft_attribute.h",
    "content": "/*\n * The NTFS Master File Table (MFT) attribute definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_MFT_ATTRIBUTE_H )\n#define _FSNTFS_MFT_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_mft_attribute_header fsntfs_mft_attribute_header_t;\n\nstruct fsntfs_mft_attribute_header\n{\n\t/* The type\n\t * Consists of 4 bytes\n\t */\n\tuint8_t type[ 4 ];\n\n\t/* The size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t size[ 4 ];\n\n\t/* The non-resident flag\n\t * Consists of 1 byte\n\t */\n\tuint8_t non_resident_flag;\n\n\t/* The name size\n\t * Consists of 1 byte\n\t */\n\tuint8_t name_size;\n\n\t/* The name offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t name_offset[ 2 ];\n\n\t/* The data flags\n\t * Consists of 2 bytes\n\t */\n\tuint8_t data_flags[ 2 ];\n\n\t/* The identifier\n\t * Consists of 2 bytes\n\t */\n\tuint8_t identifier[ 2 ];\n};\n\ntypedef struct fsntfs_mft_attribute_resident fsntfs_mft_attribute_resident_t;\n\nstruct fsntfs_mft_attribute_resident\n{\n\t/* The data size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t data_size[ 4 ];\n\n\t/* The data offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t data_offset[ 2 ];\n\n\t/* The indexed flag\n\t * Consists of 1 byte\n\t */\n\tuint8_t indexed_flag;\n\n\t/* Padding\n\t * Consists of 1 byte\n\t */\n\tuint8_t padding;\n};\n\ntypedef struct fsntfs_mft_attribute_non_resident fsntfs_mft_attribute_non_resident_t;\n\nstruct fsntfs_mft_attribute_non_resident\n{\n\t/* The data first virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_first_vcn[ 8 ];\n\n\t/* The data last virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_last_vcn[ 8 ];\n\n\t/* The data runs offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t data_runs_offset[ 2 ];\n\n\t/* The compression unit size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t compression_unit_size[ 2 ];\n\n\t/* Padding\n\t * Consists of 4 bytes\n\t */\n\tuint8_t padding[ 4 ];\n\n\t/* The allocated data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t allocated_data_size[ 8 ];\n\n\t/* The data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_size[ 8 ];\n\n\t/* The valid data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t valid_data_size[ 8 ];\n};\n\ntypedef struct fsntfs_mft_attribute_non_resident_compressed fsntfs_mft_attribute_non_resident_compressed_t;\n\nstruct fsntfs_mft_attribute_non_resident_compressed\n{\n\t/* The data first virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_first_vcn[ 8 ];\n\n\t/* The data last virtual cluster number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_last_vcn[ 8 ];\n\n\t/* The data runs offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t data_runs_offset[ 2 ];\n\n\t/* The compression unit size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t compression_unit_size[ 2 ];\n\n\t/* Padding\n\t * Consists of 4 bytes\n\t */\n\tuint8_t padding[ 4 ];\n\n\t/* The allocated data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t allocated_data_size[ 8 ];\n\n\t/* The data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_size[ 8 ];\n\n\t/* The valid data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t valid_data_size[ 8 ];\n\n\t/* The total data size\n\t * Consists of 8 bytes\n\t */\n\tuint8_t total_data_size[ 8 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_MFT_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_mft_attribute_list.h",
    "content": "/*\n * The NTFS attribute list attribute ($ATTRIBUTE_LIST) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_MFT_ATTRIBUTE_LIST_H )\n#define _FSNTFS_MFT_ATTRIBUTE_LIST_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_mft_attribute_list_entry_header fsntfs_mft_attribute_list_entry_header_t;\n\nstruct fsntfs_mft_attribute_list_entry_header\n{\n\t/* The type\n\t * Consists of 4 bytes\n\t */\n\tuint8_t type[ 4 ];\n\n\t/* The size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t size[ 2 ];\n\n\t/* The name size\n\t * Consists of 1 byte\n\t */\n\tuint8_t name_size;\n\n\t/* The name offset\n\t * Consists of 1 byte\n\t */\n\tuint8_t name_offset;\n\n\t/* The data first Virtual Cluster Number (VCN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_first_vcn[ 8 ];\n\n\t/* The file reference\n\t * Consists of 8 bytes\n\t */\n\tuint8_t file_reference[ 8 ];\n\n\t/* The identifier\n\t * Consists of 2 bytes\n\t */\n\tuint8_t identifier[ 2 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_MFT_ATTRIBUTE_LIST_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_mft_entry.h",
    "content": "/*\n * The NTFS Master File Table (MFT) entry definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_MFT_ENTRY_H )\n#define _FSNTFS_MFT_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_mft_entry_header fsntfs_mft_entry_header_t;\n\nstruct fsntfs_mft_entry_header\n{\n\t/* The signature\n\t * Consists of 4 bytes\n\t * Contains: \"FILE\"\n\t */\n\tuint8_t signature[ 4 ];\n\n\t/* The fixup values offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t fixup_values_offset[ 2 ];\n\n\t/* The number of fixup values\n\t * Consists of 2 bytes\n\t */\n\tuint8_t number_of_fixup_values[ 2 ];\n\n\t/* The journal sequence number\n\t * Consists of 8 bytes\n\t */\n\tuint8_t journal_sequence_number[ 8 ];\n\n\t/* The sequence (value)\n\t * Consists of 2 bytes\n\t */\n\tuint8_t sequence[ 2 ];\n\n\t/* The reference (link) count\n\t * Consists of 2 bytes\n\t */\n\tuint8_t reference_count[ 2 ];\n\n\t/* The attributes offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t attributes_offset[ 2 ];\n\n\t/* The flags\n\t * Consists of 2 bytes\n\t */\n\tuint8_t flags[ 2 ];\n\n\t/* The used entry size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t used_entry_size[ 4 ];\n\n\t/* The total entry size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t total_entry_size[ 4 ];\n\n\t/* The base record file reference\n\t * Consists of 8 bytes\n\t */\n\tuint8_t base_record_file_reference[ 8 ];\n\n\t/* The first available attribute identifier\n\t * Consists of 2 bytes\n\t */\n\tuint8_t first_available_attribute_identifier[ 2 ];\n\n\t/* Unknown\n\t * Consists of 2 bytes\n\t */\n\tuint8_t unknown1[ 2 ];\n\n\t/* The index\n\t * Consists of 4 bytes\n\t */\n\tuint8_t index[ 4 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_MFT_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_object_identifier.h",
    "content": "/*\n * The NTFS object identifier attribute ($OBJECT_ID) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_OBJECT_IDENTIFIER_H )\n#define _FSNTFS_OBJECT_IDENTIFIER_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_object_identifier fsntfs_object_identifier_t;\n\nstruct fsntfs_object_identifier\n{\n\t/* The droid file identifier\n\t * Consists of 16 bytes\n\t * Contains a GUID\n\t */\n\tuint8_t droid_file_identifier[ 16 ];\n\n\t/* The birth droid volume identifier\n\t * Consists of 16 bytes\n\t * Contains a GUID\n\t */\n\tuint8_t birth_droid_volume_identifier[ 16 ];\n\n\t/* The birth droid file identifier\n\t * Consists of 16 bytes\n\t * Contains a GUID\n\t */\n\tuint8_t birth_droid_file_identifier[ 16 ];\n\n\t/* The birth droid domain identifier\n\t * Consists of 16 bytes\n\t * Contains a GUID\n\t */\n\tuint8_t birth_droid_domain_identifier[ 16 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_OBJECT_IDENTIFIER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_reparse_point.h",
    "content": "/*\n * The NTFS reparse point attribute ($REPARSE_POINT) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_REPARSE_POINT_H )\n#define _FSNTFS_REPARSE_POINT_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_reparse_point fsntfs_reparse_point_t;\n\nstruct fsntfs_reparse_point\n{\n\t/* The tag (type and flags)\n\t * Consists of 4 bytes\n\t */\n\tuint8_t tag[ 4 ];\n\n\t/* The reparse data size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t reparse_data_size[ 2 ];\n\n\t/* Padding\n\t * Consists of 2 bytes\n\t */\n\tuint8_t padding1[ 2 ];\n};\n\ntypedef struct fsntfs_mount_point_reparse_data fsntfs_mount_point_reparse_data_t;\n\nstruct fsntfs_mount_point_reparse_data\n{\n\t/* The substitute name offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t substitute_name_offset[ 2 ];\n\n\t/* The substitute name size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t substitute_name_size[ 2 ];\n\n\t/* The print name offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t print_name_offset[ 2 ];\n\n\t/* The print name size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t print_name_size[ 2 ];\n};\n\ntypedef struct fsntfs_symbolic_link_reparse_data fsntfs_symbolic_link_reparse_data_t;\n\nstruct fsntfs_symbolic_link_reparse_data\n{\n\t/* The substitute name offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t substitute_name_offset[ 2 ];\n\n\t/* The substitute name size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t substitute_name_size[ 2 ];\n\n\t/* The print name offset\n\t * Consists of 2 bytes\n\t */\n\tuint8_t print_name_offset[ 2 ];\n\n\t/* The print name size\n\t * Consists of 2 bytes\n\t */\n\tuint8_t print_name_size[ 2 ];\n\n\t/* The flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t flags[ 4 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_REPARSE_POINT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_secure.h",
    "content": "/*\n * The NTFS $Secure definitions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_SECURE_H )\n#define _FSNTFS_SECURE_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_secure_hash_index_key fsntfs_secure_hash_index_key_t;\n\nstruct fsntfs_secure_hash_index_key\n{\n\t/* The hash\n\t * Consists of 4 bytes\n\t */\n\tuint8_t hash[ 4 ];\n\n\t/* The identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t identifier[ 4 ];\n};\n\ntypedef struct fsntfs_secure_identifier_index_key fsntfs_secure_identifier_index_key_t;\n\nstruct fsntfs_secure_identifier_index_key\n{\n\t/* The identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t identifier[ 4 ];\n};\n\ntypedef struct fsntfs_secure_index_value fsntfs_secure_index_value_t;\n\nstruct fsntfs_secure_index_value\n{\n\t/* The hash\n\t * Consists of 4 bytes\n\t */\n\tuint8_t hash[ 4 ];\n\n\t/* The identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t identifier[ 4 ];\n\n\t/* The data offset\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_offset[ 8 ];\n\n\t/* The data size\n\t * Consists of 4 bytes\n\t */\n\tuint8_t data_size[ 4 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_SECURE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_standard_information.h",
    "content": "/*\n * The NTFS standard information attribute ($STANDARD_INFORMATION) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_STANDARD_INFORMATION_H )\n#define _FSNTFS_STANDARD_INFORMATION_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_standard_information fsntfs_standard_information_t;\n\nstruct fsntfs_standard_information\n{\n\t/* The creation date and time\n\t * Consists of 8 bytes\n\t * Contains a filetime\n\t */\n\tuint8_t creation_time[ 8 ];\n\n\t/* The last modification date and time\n\t * Consists of 8 bytes\n\t * Contains a filetime\n\t */\n\tuint8_t modification_time[ 8 ];\n\n\t/* The entry last modification date and time\n\t * Consists of 8 bytes\n\t * Contains a filetime\n\t */\n\tuint8_t entry_modification_time[ 8 ];\n\n\t/* The last access date and time\n\t * Consists of 8 bytes\n\t * Contains a filetime\n\t */\n\tuint8_t access_time[ 8 ];\n\n\t/* The file attribute flags\n\t * Consists of 4 bytes\n\t */\n\tuint8_t file_attribute_flags[ 4 ];\n\n\t/* The maximum number of versions\n\t * Consists of 4 bytes\n\t */\n\tuint8_t maximum_number_of_versions[ 4 ];\n\n\t/* The version number\n\t * Consists of 4 bytes\n\t */\n\tuint8_t version_number[ 4 ];\n\n\t/* The class identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t class_identifier[ 4 ];\n\n\t/* The owner identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t owner_identifier[ 4 ];\n\n\t/* The security descriptor identifier\n\t * Consists of 4 bytes\n\t */\n\tuint8_t security_descriptor_identifier[ 4 ];\n\n\t/* The quota charged\n\t * Consists of 8 bytes\n\t */\n\tuint8_t quota_charged[ 8 ];\n\n\t/* The update sequence number (USN)\n\t * Consists of 8 bytes\n\t */\n\tuint8_t update_sequence_number[ 8 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_STANDARD_INFORMATION_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_txf_data.h",
    "content": "/*\n * The Transactional NTFS (TxF) data ($TXF_DATA) logged utility stream\n * attribute ($LOGGED_UTILITY_STREAM) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TXF_DATA_H )\n#define _FSNTFS_TXF_DATA_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_txf_data fsntfs_txf_data_t;\n\nstruct fsntfs_txf_data\n{\n\t/* Unknown\n\t * Consists of 6 bytes\n\t */\n\tuint8_t unknown1[ 6 ];\n\n\t/* The resource manager root file reference\n\t * Consists of 8 bytes\n\t */\n\tuint8_t rm_root_file_reference[ 8 ];\n\n\t/* The USN index\n\t * Consists of 8 bytes\n\t */\n\tuint8_t usn_index[ 8 ];\n\n\t/* The file identifier\n\t * Consists of 8 bytes\n\t */\n\tuint8_t file_identifier[ 8 ];\n\n\t/* The file data LSN\n\t * Consists of 8 bytes\n\t */\n\tuint8_t data_lsn[ 8 ];\n\n\t/* The file system metadata LSN\n\t * Consists of 8 bytes\n\t */\n\tuint8_t metadata_lsn[ 8 ];\n\n\t/* The directory index LSN\n\t * Consists of 8 bytes\n\t */\n\tuint8_t directory_index_lsn[ 8 ];\n\n\t/* The flags\n\t * Consists of 2 bytes\n\t */\n\tuint8_t flags[ 2 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_TXF_DATA_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_volume_header.h",
    "content": "/*\n * The NTFS volume header definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_VOLUME_HEADER_H )\n#define _FSNTFS_VOLUME_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_volume_header fsntfs_volume_header_t;\n\nstruct fsntfs_volume_header\n{\n\t/* Boot entry point\n\t * Consists of 3 bytes\n\t * Contains a jump instruction to the boot loader\n\t */\n\tuint8_t boot_entry_point[ 3 ];\n\n\t/* The file system signature\n\t * Consists of 8 bytes\n\t * Contains: \"NTFS\\x20\\x20\\x20\\x20\"\n\t */\n\tuint8_t file_system_signature[ 8 ];\n\n\t/* The number of bytes per sector\n\t * Consists of 2 bytes\n\t */\n\tuint8_t bytes_per_sector[ 2 ];\n\n\t/* The number of sectors per cluster block\n\t * Consists of 1 byte\n\t */\n\tuint8_t sectors_per_cluster_block;\n\n\t/* Unknown\n\t * Consists of 7 bytes\n\t */\n\tuint8_t unknown1[ 7 ];\n\n\t/* The media descriptor\n\t * Consists of 1 byte\n\t */\n\tuint8_t media_descriptor;\n\n\t/* Unknown\n\t * Consists of 2 bytes\n\t */\n\tuint8_t unknown2[ 2 ];\n\n\t/* The number of sectors per track\n\t * Consists of 2 bytes\n\t */\n\tuint8_t sectors_per_track[ 2 ];\n\n\t/* The number of heads\n\t * Consists of 2 bytes\n\t */\n\tuint8_t number_of_heads[ 2 ];\n\n\t/* The number of hidden sectors\n\t * Consists of 4 bytes\n\t */\n\tuint8_t number_of_hidden_sectors[ 4 ];\n\n\t/* Unknown\n\t * Consists of 4 bytes\n\t */\n\tuint8_t unknown3[ 4 ];\n\n\t/* Unknown\n\t * Consists of 4 bytes\n\t */\n\tuint8_t unknown4[ 4 ];\n\n\t/* The total number of sectors\n\t * Consists of 8 bytes\n\t */\n\tuint8_t total_number_of_sectors[ 8 ];\n\n\t/* The master file table (MFT) cluster block number\n\t * Consists of 8 bytes\n\t */\n\tuint8_t mft_cluster_block_number[ 8 ];\n\n\t/* The mirror MFT cluster block number\n\t * Consists of 8 bytes\n\t */\n\tuint8_t mirror_mft_cluster_block_number[ 8 ];\n\n\t/* The MFT entry size\n\t * Consists of 4 bytes\n\t * Contains the number of cluster blocks or a byte size\n\t */\n\tuint8_t mft_entry_size[ 4 ];\n\n\t/* The index entry size\n\t * Consists of 4 bytes\n\t * Contains the number of cluster blocks or a byte size\n\t */\n\tuint8_t index_entry_size[ 4 ];\n\n\t/* The volume serial number\n\t * Consists of 8 bytes\n\t */\n\tuint8_t volume_serial_number[ 8 ];\n\n\t/* The checksum\n\t * Consists of 4 bytes\n\t */\n\tuint8_t checksum[ 4 ];\n\n\t/* The bootcode\n\t * Consists of 426 bytes\n\t */\n\tuint8_t bootcode[ 426 ];\n\n\t/* The sector signature\n\t * Consists of 2 bytes\n\t * Contains: 0x55 0xaa\n\t */\n\tuint8_t sector_signature[ 2 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_VOLUME_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/fsntfs_volume_information.h",
    "content": "/*\n * The NTFS volume information attribute ($VOLUME_INFORMATION) definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_VOLUME_INFORMATION_H )\n#define _FSNTFS_VOLUME_INFORMATION_H\n\n#include <common.h>\n#include <types.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct fsntfs_volume_information fsntfs_volume_information_t;\n\nstruct fsntfs_volume_information\n{\n\t/* Unknown\n\t * Consists of 8 bytes\n\t */\n\tuint8_t unknown1[ 8 ];\n\n\t/* The major version (number)\n\t * Consists of 1 byte\n\t */\n\tuint8_t major_version;\n\n\t/* The minor version (number)\n\t * Consists of 1 byte\n\t */\n\tuint8_t minor_version;\n\n\t/* The flags\n\t * Consists of 2 bytes\n\t */\n\tuint8_t flags[ 2 ];\n};\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_VOLUME_INFORMATION_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs.c",
    "content": "/*\n * Library to access the New Technology File System (NTFS) format\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n\n#if defined( WINAPI )\n#include <windows.h>\n#endif\n\n#include \"libfsntfs_unused.h\"\n\n/* Define HAVE_LOCAL_LIBFSNTFS for local use of libfsntfs\n */\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\n#if defined( WINAPI ) && defined( HAVE_DLLMAIN )\n\n#if defined( _MANAGED )\n#pragma managed( push, off )\n#endif\n\n/* Defines the entry point for the DLL\n */\nBOOL WINAPI DllMain(\n             HINSTANCE hinstDLL,\n             DWORD fdwReason,\n             LPVOID lpvReserved )\n{\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( lpvReserved )\n\n\tswitch( fdwReason )\n\t{\n\t\tcase DLL_PROCESS_ATTACH:\n\t\t\tDisableThreadLibraryCalls(\n\t\t\t hinstDLL );\n\t\t\tbreak;\n\n\t\tcase DLL_THREAD_ATTACH:\n\t\t\tbreak;\n\n\t\tcase DLL_THREAD_DETACH:\n\t\t\tbreak;\n\n\t\tcase DLL_PROCESS_DETACH:\n\t\t\tbreak;\n\t}\n\treturn( TRUE );\n}\n\n/* Function that indicates the library is a DLL\n * Returns 1\n */\nint libfsntfs_is_dll(\n     void )\n{\n\treturn( 1 );\n}\n\n#endif /* defined( WINAPI ) && defined( HAVE_DLLMAIN ) */\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs.rc.in",
    "content": "#include <windows.h>\r\n\r\n#ifdef GCC_WINDRES\r\nVS_VERSION_INFO\t\t\t\tVERSIONINFO\r\n#else\r\nVS_VERSION_INFO\t\t\t\tVERSIONINFO\tMOVEABLE IMPURE LOADONCALL DISCARDABLE\r\n#endif\r\n  FILEVERSION\t\t\t\t1,0,0,0\r\n  PRODUCTVERSION\t\t\t1,0,0,0\r\n  FILEFLAGSMASK\t\t\t\tVS_FFI_FILEFLAGSMASK\r\n#ifdef _DEBUG\r\n  FILEFLAGS\t\t\t\t0x1L\r\n#else\r\n  FILEFLAGS\t\t\t\t0x0L\r\n#endif\r\n  FILEOS\t\t\t\tVOS__WINDOWS32\r\n  FILETYPE\t\t\t\tVFT_DLL\r\n  FILESUBTYPE\t\t\t\t0x0L\r\nBEGIN\r\n  BLOCK \"StringFileInfo\"\r\n  BEGIN\r\n    BLOCK \"040904E4\"\r\n    BEGIN\r\n      VALUE \"FileDescription\",\t\t\"Library to access the New Technology File System (NTFS) format\\0\"\r\n      VALUE \"FileVersion\",\t\t\"@VERSION@\" \"\\0\"\r\n      VALUE \"InternalName\",\t\t\"libfsntfs.dll\\0\"\r\n      VALUE \"LegalCopyright\",\t\t\"(C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\\0\"\r\n      VALUE \"OriginalFilename\",\t\t\"libfsntfs.dll\\0\"\r\n      VALUE \"ProductName\",\t\t\"libfsntfs\\0\"\r\n      VALUE \"ProductVersion\",\t\t\"@VERSION@\" \"\\0\"\r\n      VALUE \"Comments\",\t\t\t\"For more information visit https://github.com/libyal/libfsntfs/\\0\"\r\n    END\r\n  END\r\n  BLOCK \"VarFileInfo\"\r\n  BEGIN\r\n    VALUE \"Translation\", 0x0409, 1200\r\n  END\r\nEND\r\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute.c",
    "content": "/*\n * Attribute functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_bitmap_values.h\"\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_logged_utility_stream_values.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_object_identifier_values.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_reparse_point_values.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n#include \"libfsntfs_standard_information_values.h\"\n#include \"libfsntfs_txf_data_values.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_unused.h\"\n#include \"libfsntfs_volume_information_values.h\"\n#include \"libfsntfs_volume_name_values.h\"\n\n/* Creates an attribute\n * Make sure the value attribute is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_initialize(\n     libfsntfs_attribute_t **attribute,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_initialize\";\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = memory_allocate_structure(\n\t                      libfsntfs_internal_attribute_t );\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_attribute,\n\t     0,\n\t     sizeof( libfsntfs_internal_attribute_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear attribute.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_attribute );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_attribute->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_attribute->mft_attribute = mft_attribute;\n\n\t*attribute = (libfsntfs_attribute_t *) internal_attribute;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_attribute != NULL )\n\t{\n\t\tmemory_free(\n\t\t internal_attribute );\n\t}\n\treturn( -1 );\n}\n\n/* Frees an attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_free(\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_attribute_free\";\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute != NULL )\n\t{\n\t\t*attribute = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Frees an attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_attribute_free(\n     libfsntfs_internal_attribute_t **internal_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_attribute_free\";\n\tint result            = 1;\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *internal_attribute != NULL )\n\t{\n\t\t/* The mft_attribute reference is freed elsewhere\n\t\t */\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( ( *internal_attribute )->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\tif( ( *internal_attribute )->path_hint != NULL )\n\t\t{\n\t\t\tif( libfsntfs_path_hint_free(\n\t\t\t     &( ( *internal_attribute )->path_hint ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attribute path hint.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *internal_attribute )->value != NULL )\n\t\t{\n\t\t\tif( ( *internal_attribute )->free_value != NULL )\n\t\t\t{\n\t\t\t\tif( ( *internal_attribute )->free_value(\n\t\t\t\t     &( ( *internal_attribute )->value ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free attribute value.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *internal_attribute );\n\n\t\t*internal_attribute = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the attribute value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_attribute_read_value(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"libfsntfs_internal_attribute_read_value\";\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_attribute->value != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute - value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_bitmap_values_free;\n\n\t\t\tif( libfsntfs_bitmap_values_initialize(\n\t\t\t     (libfsntfs_bitmap_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create bitmap values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_bitmap_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_bitmap_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     io_handle,\n\t\t\t     file_io_handle,\n\t\t\t     io_handle->cluster_block_size,\n\t\t\t     flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read bitmap values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_file_name_values_free;\n\n\t\t\tif( libfsntfs_file_name_values_initialize(\n\t\t\t     (libfsntfs_file_name_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM:\n\t\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t\t\t          internal_attribute->mft_attribute,\n\t\t\t          (uint8_t *) \"$TXF_DATA\",\n\t\t\t          9,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t\t \"%s: unable to compare UTF-8 string with attribute name.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result != 0 )\n\t\t\t{\n\t\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_txf_data_values_free;\n\n\t\t\t\tif( libfsntfs_txf_data_values_initialize(\n\t\t\t\t     (libfsntfs_txf_data_values_t **) &( internal_attribute->value ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create TxF data values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_txf_data_values_read_from_mft_attribute(\n\t\t\t\t     (libfsntfs_txf_data_values_t *) internal_attribute->value,\n\t\t\t\t     internal_attribute->mft_attribute,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read TxF data values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_logged_utility_stream_values_free;\n\n\t\t\t\tif( libfsntfs_logged_utility_stream_values_initialize(\n\t\t\t\t     (libfsntfs_logged_utility_stream_values_t **) &( internal_attribute->value ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create logged utility stream values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n\t\t\t\t     (libfsntfs_logged_utility_stream_values_t *) internal_attribute->value,\n\t\t\t\t     internal_attribute->mft_attribute,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read logged utility stream values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_object_identifier_values_free;\n\n\t\t\tif( libfsntfs_object_identifier_values_initialize(\n\t\t\t     (libfsntfs_object_identifier_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create object identifier values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_object_identifier_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_object_identifier_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read object identifier values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_reparse_point_values_free;\n\n\t\t\tif( libfsntfs_reparse_point_values_initialize(\n\t\t\t     (libfsntfs_reparse_point_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create reparse point values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_reparse_point_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read reparse point values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_security_descriptor_values_free;\n\n\t\t\tif( libfsntfs_security_descriptor_values_initialize(\n\t\t\t     (libfsntfs_security_descriptor_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create security descriptor values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_security_descriptor_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_security_descriptor_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     io_handle,\n\t\t\t     file_io_handle,\n\t\t\t     flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read security descriptor values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_standard_information_values_free;\n\n\t\t\tif( libfsntfs_standard_information_values_initialize(\n\t\t\t     (libfsntfs_standard_information_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_standard_information_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_volume_information_values_free;\n\n\t\t\tif( libfsntfs_volume_information_values_initialize(\n\t\t\t     (libfsntfs_volume_information_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create volume information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_volume_information_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_volume_information_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read volume information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\tinternal_attribute->free_value = (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_volume_name_values_free;\n\n\t\t\tif( libfsntfs_volume_name_values_initialize(\n\t\t\t     (libfsntfs_volume_name_values_t **) &( internal_attribute->value ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create volume name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_volume_name_values_read_from_mft_attribute(\n\t\t\t     (libfsntfs_volume_name_values_t *) internal_attribute->value,\n\t\t\t     internal_attribute->mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read volume name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION:\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( ( internal_attribute->value != NULL )\n\t && ( internal_attribute->free_value != NULL ) )\n\t{\n\t\tinternal_attribute->free_value(\n\t\t &( internal_attribute->value ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_attribute_get_type(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     uint32_t *type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_attribute_get_type\";\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     internal_attribute->mft_attribute,\n\t     type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_type(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *type,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_type\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the data flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_data_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *data_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_data_flags\";\n\tuint16_t safe_data_flags                           = 0;\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( data_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_attribute->mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_flags(\n\t\t     internal_attribute->mft_attribute,\n\t\t     &safe_data_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data flags from MFT attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*data_flags = safe_data_flags;\n\t}\n\treturn( result );\n}\n\n/* Retrieves the value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_attribute_get_value(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     intptr_t **value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_attribute_get_value\";\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*value = internal_attribute->value;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_utf8_name_size\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf8_name_size(\n\t     internal_attribute->mft_attribute,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name size from MFT attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_utf8_name\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf8_name(\n\t     internal_attribute->mft_attribute,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name from MFT attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_utf16_name_size\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf16_name_size(\n\t     internal_attribute->mft_attribute,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name size from MFT attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_utf16_name\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf16_name(\n\t     internal_attribute->mft_attribute,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name from MFT attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the data VCN range\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_attribute_get_data_vcn_range(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *data_first_vcn,\n     uint64_t *data_last_vcn,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_data_vcn_range\";\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( data_first_vcn == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data first VCN.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_last_vcn == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data last VCN.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_attribute->mft_attribute != NULL )\n\t{\n\t\tresult = libfsntfs_mft_attribute_get_data_vcn_range(\n\t\t          internal_attribute->mft_attribute,\n\t\t          data_first_vcn,\n\t\t          data_last_vcn,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data VCN range from MFT attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n/* TODO add support for attribute list entry ? */\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_attribute_get_data_size(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     size64_t *data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_attribute_get_data_size\";\n\n\tif( internal_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_attribute->mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_size(\n\t\t     internal_attribute->mft_attribute,\n\t\t     (uint64_t *) data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( data_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid data size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*data_size = 0;\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_data_size\";\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the valid data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_get_valid_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *valid_data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_get_valid_data_size\";\n\tuint64_t safe_valid_data_size                      = 0;\n\tint result                                         = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( valid_data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid valid data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_attribute->mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_valid_data_size(\n\t\t     internal_attribute->mft_attribute,\n\t\t     &safe_valid_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve valid data size.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*valid_data_size = safe_valid_data_size;\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute.h",
    "content": "/*\n * Attribute functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_ATTRIBUTE_H )\n#define _LIBFSNTFS_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_attribute libfsntfs_internal_attribute_t;\n\nstruct libfsntfs_internal_attribute\n{\n\t/* The MFT attribute\n\t */\n\tlibfsntfs_mft_attribute_t *mft_attribute;\n\n\t/* The path hint\n\t */\n\tlibfsntfs_path_hint_t *path_hint;\n\n\t/* The item value\n\t */\n\tintptr_t *value;\n\n\t/* The item free value function\n\t */\n\tint (*free_value)(\n\t       intptr_t **value,\n\t       libcerror_error_t **error );\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nint libfsntfs_attribute_initialize(\n     libfsntfs_attribute_t **attribute,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_free(\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_attribute_free(\n     libfsntfs_internal_attribute_t **internal_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_attribute_read_value(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_attribute_get_type(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     uint32_t *type,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_type(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *type,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *data_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_attribute_get_value(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     intptr_t **value,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_vcn_range(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *data_first_vcn,\n     uint64_t *data_last_vcn,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_attribute_get_data_size(\n     libfsntfs_internal_attribute_t *internal_attribute,\n     size64_t *data_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *data_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_get_valid_data_size(\n     libfsntfs_attribute_t *attribute,\n     size64_t *valid_data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute_list_attribute.c",
    "content": "/*\n * Attribute list attribute ($ATTRIBUTE_LIST) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_attribute_list_attribute.h\"\n#include \"libfsntfs_attribute_list_entry.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the number of attribute list entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_attribute_get_number_of_entries(\n     libfsntfs_attribute_t *attribute,\n     int *number_of_entries,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_attribute_list_attribute_get_number_of_entries\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 1;\n\tint safe_number_of_entries                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( number_of_entries == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( internal_attribute->value != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_list_get_number_of_entries(\n\t\t     (libfsntfs_mft_attribute_list_t *) internal_attribute->value,\n\t\t     &safe_number_of_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of attribute list entries.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*number_of_entries = safe_number_of_entries;\n\t}\n\treturn( result );\n}\n\n/* Retrieves a specific attribute list entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_attribute_get_entry_by_index(\n     libfsntfs_attribute_t *attribute,\n     int entry_index,\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute             = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tstatic char *function                                          = \"libfsntfs_attribute_list_attribute_get_entry_by_index\";\n\tuint32_t attribute_type                                        = 0;\n\tint result                                                     = 1;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( internal_attribute->value != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_list_get_entry_by_index(\n\t\t     (libfsntfs_mft_attribute_list_t *) internal_attribute->value,\n\t\t     entry_index,\n\t\t     &mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t entry_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\tif( libfsntfs_attribute_list_entry_initialize(\n\t\t     attribute_list_entry,\n\t\t     mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t entry_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute_list_attribute.h",
    "content": "/*\n * Attribute list attribute ($ATTRIBUTE_LIST) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_ATTRIBUTE_LIST_ATTRIBUTE_H )\n#define _LIBFSNTFS_ATTRIBUTE_LIST_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_attribute_get_number_of_entries(\n     libfsntfs_attribute_t *attribute,\n     int *number_of_entries,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_attribute_get_entry_by_index(\n     libfsntfs_attribute_t *attribute,\n     int entry_index,\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_ATTRIBUTE_LIST_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute_list_entry.c",
    "content": "/*\n * Attribute list entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute_list_entry.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n#include \"libfsntfs_types.h\"\n\n/* Creates an attribute list entry\n * Make sure the value attribute_list_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_initialize(\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_initialize\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute list entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = memory_allocate_structure(\n\t                                 libfsntfs_internal_attribute_list_entry_t );\n\n\tif( internal_attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create attribute list entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_attribute_list_entry,\n\t     0,\n\t     sizeof( libfsntfs_internal_attribute_list_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear attribute list entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_attribute_list_entry );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_attribute_list_entry->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_attribute_list_entry->mft_attribute_list_entry = mft_attribute_list_entry;\n\n\t*attribute_list_entry = (libfsntfs_attribute_list_entry_t *) internal_attribute_list_entry;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_attribute_list_entry != NULL )\n\t{\n\t\tmemory_free(\n\t\t internal_attribute_list_entry );\n\t}\n\treturn( -1 );\n}\n\n/* Frees an attribute list entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_free(\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_free\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list_entry != NULL )\n\t{\n\t\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) *attribute_list_entry;\n\t\t*attribute_list_entry         = NULL;\n\n\t\t/* The mft_attribute_list_entry references is freed elsewhere\n\t\t */\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( internal_attribute_list_entry->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\tmemory_free(\n\t\t internal_attribute_list_entry );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the attribute type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_attribute_type(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint32_t *attribute_type,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_type\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_attribute_type(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_file_reference(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_type\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_file_reference(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_utf8_name_size\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name size from attribute list entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_utf8_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_utf8_name\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name from attribute list entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_utf16_name_size\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name size from attribute list entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_attribute_list_entry_get_utf16_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_list_entry_t *internal_attribute_list_entry = NULL;\n\tstatic char *function                                                    = \"libfsntfs_attribute_list_entry_get_utf16_name\";\n\tint result                                                               = 1;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute_list_entry = (libfsntfs_internal_attribute_list_entry_t *) attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t     internal_attribute_list_entry->mft_attribute_list_entry,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name from attribute list entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_attribute_list_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_attribute_list_entry.h",
    "content": "/*\n * Attribute list entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_ATTRIBUTE_LIST_ENTRY_H )\n#define _LIBFSNTFS_ATTRIBUTE_LIST_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_attribute_list_entry libfsntfs_internal_attribute_list_entry_t;\n\nstruct libfsntfs_internal_attribute_list_entry\n{\n\t/* The MFT attribute list entry\n\t */\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nint libfsntfs_attribute_list_entry_initialize(\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_free(\n     libfsntfs_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_attribute_type(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint32_t *attribute_type,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_file_reference(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf8_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_attribute_list_entry_get_utf16_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_ATTRIBUTE_LIST_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_bitmap_values.c",
    "content": "/*\n * Bitmap attribute ($BITMAP) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_bitmap_values.h\"\n#include \"libfsntfs_cluster_block.h\"\n#include \"libfsntfs_cluster_block_vector.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n\n/* Creates bitmap values\n * Make sure the value bitmap_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_bitmap_values_initialize(\n     libfsntfs_bitmap_values_t **bitmap_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_bitmap_values_initialize\";\n\n\tif( bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid bitmap values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *bitmap_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid bitmap values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*bitmap_values = memory_allocate_structure(\n\t                  libfsntfs_bitmap_values_t );\n\n\tif( *bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create bitmap values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *bitmap_values,\n\t     0,\n\t     sizeof( libfsntfs_bitmap_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear bitmap values.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *bitmap_values );\n\n\t\t*bitmap_values = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_range_list_initialize(\n\t     &( ( *bitmap_values )->allocated_block_list ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create allocated block list.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *bitmap_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *bitmap_values );\n\n\t\t*bitmap_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees bitmap values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_bitmap_values_free(\n     libfsntfs_bitmap_values_t **bitmap_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_bitmap_values_free\";\n\tint result            = 1;\n\n\tif( bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid bitmap values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *bitmap_values != NULL )\n\t{\n\t\tif( libcdata_range_list_free(\n\t\t     &( ( *bitmap_values )->allocated_block_list ),\n\t\t     NULL,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free allocated data block list.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *bitmap_values );\n\n\t\t*bitmap_values = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the bitmap values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_bitmap_values_read_data(\n     libfsntfs_bitmap_values_t *bitmap_values,\n     const uint8_t *data,\n     size_t data_size,\n     size_t element_data_size,\n     off64_t *base_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function             = \"libfsntfs_bitmap_values_read_data\";\n\tsize64_t allocated_range_size     = 0;\n\tsize_t data_offset                = 0;\n\toff64_t allocated_range_offset    = 0;\n\toff64_t safe_base_offset          = 0;\n\tuint8_t bit_index                 = 0;\n\tuint8_t byte_value                = 0;\n\tuint8_t in_allocated_range        = 0;\n\tint allocated_element_index       = 0;\n\tint first_allocated_element_index = 0;\n\tint result                        = 0;\n\n\tif( bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid bitmap values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( base_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid base offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_base_offset = *base_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: bitmap data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t}\n#endif\n\twhile( data_offset < data_size )\n\t{\n\t\tbyte_value = data[ data_offset ];\n\n\t\tdata_offset++;\n\n\t\tfor( bit_index = 0;\n\t\t     bit_index < 8;\n\t\t     bit_index++ )\n\t\t{\n\t\t\tif( in_allocated_range == 0 )\n\t\t\t{\n\t\t\t\tif( ( byte_value & 0x01 ) != 0 )\n\t\t\t\t{\n\t\t\t\t\tin_allocated_range            = 1;\n\t\t\t\t\tfirst_allocated_element_index = allocated_element_index;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( ( byte_value & 0x01 ) == 0 )\n\t\t\t{\n\t\t\t\tallocated_range_offset = safe_base_offset + ( (off64_t) first_allocated_element_index * element_data_size );\n\t\t\t\tallocated_range_size   = ( (size64_t) allocated_element_index - first_allocated_element_index ) * element_data_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t{\n\t\t\t\t\tif( first_allocated_element_index == ( allocated_element_index - 1 ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t \"%s: allocated element\\t\\t\\t: %d\\n\",\n\t\t\t\t\t\t function,\n\t\t\t\t\t\t first_allocated_element_index );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t \"%s: allocated elements\\t\\t\\t: %d - %d\\n\",\n\t\t\t\t\t\t function,\n\t\t\t\t\t\t first_allocated_element_index,\n\t\t\t\t\t\t allocated_element_index - 1 );\n\t\t\t\t\t}\n\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t \"%s: allocated block range\\t\\t: 0x%\" PRIx64 \" - 0x%\" PRIx64 \"\\n\",\n\t\t\t\t\t function,\n\t\t\t\t\t allocated_range_offset,\n\t\t\t\t\t allocated_range_offset + allocated_range_size );\n\t\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\t\tresult = libcdata_range_list_insert_range(\n\t\t\t\t          bitmap_values->allocated_block_list,\n\t\t\t\t          allocated_range_offset,\n\t\t\t\t          allocated_range_size,\n\t\t\t\t          NULL,\n\t\t\t\t          NULL,\n\t\t\t\t          NULL,\n\t\t\t\t          error );\n\n\t\t\t\tif( result == -1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t \"%s: unable to append allocated block range to list.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\treturn( -1 );\n\t\t\t\t}\n\t\t\t\tin_allocated_range = 0;\n\t\t\t}\n\t\t\tbyte_value >>= 1;\n\n\t\t\tallocated_element_index++;\n\t\t}\n\t}\n\tif( in_allocated_range != 0 )\n\t{\n\t\tallocated_range_offset = safe_base_offset + ( (off64_t) first_allocated_element_index * element_data_size );\n\t\tallocated_range_size   = ( (size64_t) allocated_element_index - first_allocated_element_index ) * element_data_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( first_allocated_element_index == ( allocated_element_index - 1 ) )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: allocated element\\t\\t\\t: %d\\n\",\n\t\t\t\t function,\n\t\t\t\t first_allocated_element_index );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: allocated elements\\t\\t\\t: %d - %d\\n\",\n\t\t\t\t function,\n\t\t\t\t first_allocated_element_index,\n\t\t\t\t allocated_element_index - 1 );\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: allocated block range\\t\\t: 0x%\" PRIx64 \" - 0x%\" PRIx64 \"\\n\",\n\t\t\t function,\n\t\t\t allocated_range_offset,\n\t\t\t allocated_range_offset + allocated_range_size );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\tresult = libcdata_range_list_insert_range(\n\t\t          bitmap_values->allocated_block_list,\n\t\t          allocated_range_offset,\n\t\t          allocated_range_size,\n\t\t          NULL,\n\t\t          NULL,\n\t\t          NULL,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append allocated block range to list.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\t*base_offset = safe_base_offset + ( (off64_t) allocated_element_index * element_data_size );\n\n\treturn( 1 );\n}\n\n/* Reads the bitmap values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_bitmap_values_read_from_mft_attribute(\n     libfsntfs_bitmap_values_t *bitmap_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     size_t element_data_size,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfcache_cache_t *cluster_block_cache   = NULL;\n\tlibfdata_vector_t *cluster_block_vector  = NULL;\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tuint8_t *data                            = NULL;\n\tstatic char *function                    = \"libfsntfs_bitmap_values_read_from_mft_attribute\";\n\tsize64_t segment_size                    = 0;\n\tsize_t data_size                         = 0;\n\toff64_t base_offset                      = 0;\n\toff64_t segment_offset                   = 0;\n\tuint32_t attribute_type                  = 0;\n\tuint32_t segment_flags                   = 0;\n\tint cluster_block_index                  = 0;\n\tint number_of_cluster_blocks             = 0;\n\tint number_of_segments                   = 0;\n\tint result                               = 0;\n\tint segment_file_index                   = 0;\n\tint segment_index                        = 0;\n\n\tif( bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid bitmap values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_resident_data(\n\t\t     mft_attribute,\n\t\t     &data,\n\t\t     &data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_bitmap_values_read_data(\n\t\t     bitmap_values,\n\t\t     data,\n\t\t     data_size,\n\t\t     element_data_size,\n\t\t     &base_offset,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read bitmap values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse if( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) == 0 )\n\t{\n\t\tif( libfsntfs_cluster_block_vector_initialize(\n\t\t     &cluster_block_vector,\n\t\t     io_handle,\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create cluster block vector.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfcache_cache_initialize(\n\t\t     &cluster_block_cache,\n\t\t     1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create cluster block cache.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdata_vector_get_number_of_elements(\n\t\t     cluster_block_vector,\n\t\t     &number_of_cluster_blocks,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of cluster blocks.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdata_vector_get_number_of_segments(\n\t\t     cluster_block_vector,\n\t\t     &number_of_segments,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of cluster block vector segments.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( segment_index = 0;\n\t\t     segment_index < number_of_segments;\n\t\t     segment_index++ )\n\t\t{\n\t\t\tif( libfdata_vector_get_segment_by_index(\n\t\t\t     cluster_block_vector,\n\t\t\t     segment_index,\n\t\t\t     &segment_file_index,\n\t\t\t     &segment_offset,\n\t\t\t     &segment_size,\n\t\t\t     &segment_flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve cluster block vector segment: %d.\",\n\t\t\t\t function,\n\t\t\t\t segment_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( ( segment_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t\t{\n\t\t\t\tcluster_block_index += segment_size / io_handle->cluster_block_size;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twhile( segment_size > 0 )\n\t\t\t{\n\t\t\t\tif( cluster_block_index >= number_of_cluster_blocks )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( libfdata_vector_get_element_value_by_index(\n\t\t\t\t     cluster_block_vector,\n\t\t\t\t     (intptr_t *) file_io_handle,\n\t\t\t\t     (libfdata_cache_t *) cluster_block_cache,\n\t\t\t\t     cluster_block_index,\n\t\t\t\t     (intptr_t **) &cluster_block,\n\t\t\t\t     0,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve cluster block: %d from vector.\",\n\t\t\t\t\t function,\n\t\t\t\t\t cluster_block_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( cluster_block == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t\t \"%s: missing cluster block: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t cluster_block_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_bitmap_values_read_data(\n\t\t\t\t     bitmap_values,\n\t\t\t\t     cluster_block->data,\n\t\t\t\t     cluster_block->data_size,\n\t\t\t\t     element_data_size,\n\t\t\t\t     &base_offset,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read bitmap values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tsegment_size -= io_handle->cluster_block_size;\n\n\t\t\t\tcluster_block_index++;\n\t\t\t}\n\t\t\tif( cluster_block_index >= number_of_cluster_blocks )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif( libfdata_vector_free(\n\t\t     &cluster_block_vector,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free cluster block vector.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfcache_cache_free(\n\t\t     &cluster_block_cache,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free cluster block cache.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( cluster_block_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &cluster_block_cache,\n\t\t NULL );\n\t}\n\tif( cluster_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &cluster_block_vector,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_bitmap_values.h",
    "content": "/*\n * Bitmap attribute ($BITMAP) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_BITMAP_VALUES_H )\n#define _LIBFSNTFS_BITMAP_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_bitmap_values libfsntfs_bitmap_values_t;\n\nstruct libfsntfs_bitmap_values\n{\n\t/* The allocated block (range) list\n\t */\n\tlibcdata_range_list_t *allocated_block_list;\n};\n\nint libfsntfs_bitmap_values_initialize(\n     libfsntfs_bitmap_values_t **bitmap_values,\n     libcerror_error_t **error );\n\nint libfsntfs_bitmap_values_free(\n     libfsntfs_bitmap_values_t **bitmap_values,\n     libcerror_error_t **error );\n\nint libfsntfs_bitmap_values_read_data(\n     libfsntfs_bitmap_values_t *bitmap_values,\n     const uint8_t *data,\n     size_t data_size,\n     size_t element_data_size,\n     off64_t *base_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_bitmap_values_read_from_mft_attribute(\n     libfsntfs_bitmap_values_t *bitmap_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     size_t element_data_size,\n     uint8_t flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_BITMAP_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_buffer_data_handle.c",
    "content": "/*\n * The buffer data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_buffer_data_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates a buffer data handle\n * Make sure the value data_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_buffer_data_handle_initialize(\n     libfsntfs_buffer_data_handle_t **data_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_buffer_data_handle_initialize\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > 0 )\n\t{\n\t\tif( data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid data.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*data_handle = memory_allocate_structure(\n\t                libfsntfs_buffer_data_handle_t );\n\n\tif( *data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *data_handle,\n\t     0,\n\t     sizeof( libfsntfs_buffer_data_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *data_handle )->data      = data;\n\t( *data_handle )->data_size = data_size;\n\n\treturn( 1 );\n\non_error:\n\tif( *data_handle != NULL )\n\t{\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a buffer data handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_buffer_data_handle_free(\n     libfsntfs_buffer_data_handle_t **data_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_buffer_data_handle_free\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads data from the current offset into a buffer\n * Callback for the data stream\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_buffer_data_handle_read_segment_data(\n         libfsntfs_buffer_data_handle_t *data_handle,\n         intptr_t *file_io_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_index,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_buffer_data_handle_read_segment_data\";\n\tsize_t read_size      = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( file_io_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_flags )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_handle->current_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data handle - current offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_index != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid segment data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid segment data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_handle->current_offset >= (off64_t) data_handle->data_size )\n\t{\n\t\treturn( 0 );\n\t}\n\tread_size = data_handle->data_size - (size_t) data_handle->current_offset;\n\n\tif( read_size > segment_data_size )\n\t{\n\t\tread_size = segment_data_size;\n\t}\n\tif( memory_copy(\n\t     segment_data,\n\t     &( data_handle->data[ data_handle->current_offset ] ),\n\t     read_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tdata_handle->current_offset += read_size;\n\n\treturn( (ssize_t) read_size );\n}\n\n/* Seeks a certain offset of the data\n * Callback for the data stream\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_buffer_data_handle_seek_segment_offset(\n         libfsntfs_buffer_data_handle_t *data_handle,\n         intptr_t *file_io_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_index,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         off64_t segment_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_buffer_data_handle_seek_segment_offset\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( file_io_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_index != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tdata_handle->current_offset = segment_offset;\n\n\treturn( segment_offset );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_buffer_data_handle.h",
    "content": "/*\n * The buffer data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_BUFFER_DATA_HANDLE_H )\n#define _LIBFSNTFS_BUFFER_DATA_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_buffer_data_handle libfsntfs_buffer_data_handle_t;\n\nstruct libfsntfs_buffer_data_handle\n{\n\t/* The current offset\n\t */\n\toff64_t current_offset;\n\n\t/* The data\n\t */\n\tconst uint8_t *data;\n\n\t/* The data size\n\t */\n\tsize_t data_size;\n};\n\nint libfsntfs_buffer_data_handle_initialize(\n     libfsntfs_buffer_data_handle_t **data_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_buffer_data_handle_free(\n     libfsntfs_buffer_data_handle_t **data_handle,\n     libcerror_error_t **error );\n\nssize_t libfsntfs_buffer_data_handle_read_segment_data(\n         libfsntfs_buffer_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags,\n         uint8_t read_flags,\n         libcerror_error_t **error );\n\noff64_t libfsntfs_buffer_data_handle_seek_segment_offset(\n         libfsntfs_buffer_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         off64_t segment_offset,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_BUFFER_DATA_HANDLE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block.c",
    "content": "/*\n * Cluster block functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n/* Creates a cluster block\n * Make sure the value cluster_block is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_initialize(\n     libfsntfs_cluster_block_t **cluster_block,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_initialize\";\n\n\tif( cluster_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *cluster_block != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid cluster block value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size == 0 )\n\t || ( data_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*cluster_block = memory_allocate_structure(\n\t                  libfsntfs_cluster_block_t );\n\n\tif( *cluster_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create cluster block.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *cluster_block,\n\t     0,\n\t     sizeof( libfsntfs_cluster_block_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear cluster block.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *cluster_block );\n\n\t\t*cluster_block = NULL;\n\n\t\treturn( -1 );\n\t}\n\t( *cluster_block )->data = (uint8_t *) memory_allocate(\n\t                                        sizeof( uint8_t ) * data_size );\n\n\tif( ( *cluster_block )->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *cluster_block )->data_size = data_size;\n\n\treturn( 1 );\n\non_error:\n\tif( *cluster_block != NULL )\n\t{\n\t\tmemory_free(\n\t\t *cluster_block );\n\n\t\t*cluster_block = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a cluster block\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_free(\n     libfsntfs_cluster_block_t **cluster_block,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_free\";\n\n\tif( cluster_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *cluster_block != NULL )\n\t{\n\t\tmemory_free(\n\t\t ( *cluster_block )->data );\n\n\t\tmemory_free(\n\t\t *cluster_block );\n\n\t\t*cluster_block = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Clears a cluster block\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_clear(\n     libfsntfs_cluster_block_t *cluster_block,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_clear\";\n\n\tif( cluster_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( cluster_block->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid cluster block - missing data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( memory_set(\n\t     cluster_block->data,\n\t     0,\n\t     cluster_block->data_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear cluster block data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Reads a cluster block\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_read_file_io_handle(\n     libfsntfs_cluster_block_t *cluster_block,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_read_file_io_handle\";\n\tssize_t read_count    = 0;\n\n\tif( cluster_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading cluster block at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") with size: %\" PRIu64 \".\\n\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset,\n\t\t cluster_block->data_size );\n\t}\n#endif\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              cluster_block->data,\n\t              cluster_block->data_size,\n\t              file_offset,\n\t              error );\n\n\tif( read_count != (ssize_t) cluster_block->data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read cluster block at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block.h",
    "content": "/*\n * Cluster block functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_CLUSTER_BLOCK_H )\n#define _LIBFSNTFS_CLUSTER_BLOCK_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_cluster_block libfsntfs_cluster_block_t;\n\nstruct libfsntfs_cluster_block\n{\n\t/* The data\n\t */\n\tuint8_t *data;\n\n\t/* The data size\n\t */\n\tsize_t data_size;\n};\n\nint libfsntfs_cluster_block_initialize(\n     libfsntfs_cluster_block_t **cluster_block,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_free(\n     libfsntfs_cluster_block_t **cluster_block,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_clear(\n     libfsntfs_cluster_block_t *cluster_block,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_read_file_io_handle(\n     libfsntfs_cluster_block_t *cluster_block,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_CLUSTER_BLOCK_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_data.c",
    "content": "/*\n * Cluster block data functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block_data.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Reads data from the current offset into a buffer\n * Callback for the cluster block data stream\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_cluster_block_data_read_segment_data(\n         intptr_t *data_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libbfio_handle_t *file_io_handle,\n         int segment_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags,\n         uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_data_read_segment_data\";\n\tssize_t read_count    = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( data_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid segment data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid segment data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( segment_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t{\n\t\tif( memory_set(\n\t\t     segment_data,\n\t\t     0,\n\t\t     segment_data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to clear segment data.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tread_count = (ssize_t) segment_data_size;\n\t}\n\telse\n\t{\n\t\tread_count = libbfio_handle_read_buffer(\n\t\t              file_io_handle,\n\t\t              segment_data,\n\t\t              segment_data_size,\n\t\t              error );\n\n\t\tif( read_count < 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read segment data.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( read_count );\n}\n\n/* Seeks a certain offset of the data\n * Callback for the cluster block data stream\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_cluster_block_data_seek_segment_offset(\n         intptr_t *data_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libbfio_handle_t *file_io_handle,\n         int segment_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         off64_t segment_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_cluster_block_data_seek_segment_offset\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( data_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\n\tif( segment_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_handle_seek_offset(\n\t     file_io_handle,\n\t     segment_offset,\n\t     SEEK_SET,\n\t     error ) == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek segment offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t segment_offset,\n\t\t segment_offset );\n\n\t\treturn( -1 );\n\t}\n\treturn( segment_offset );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_data.h",
    "content": "/*\n * Cluster block data functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_CLUSTER_BLOCK_DATA_H )\n#define _LIBFSNTFS_CLUSTER_BLOCK_DATA_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nssize_t libfsntfs_cluster_block_data_read_segment_data(\n         intptr_t *data_handle,\n         libbfio_handle_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags,\n         uint8_t read_flags,\n         libcerror_error_t **error );\n\noff64_t libfsntfs_cluster_block_data_seek_segment_offset(\n         intptr_t *data_handle,\n         libbfio_handle_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         off64_t segment_offset,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_CLUSTER_BLOCK_DATA_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_stream.c",
    "content": "/*\n * Cluster block stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_buffer_data_handle.h\"\n#include \"libfsntfs_cluster_block_data.h\"\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_compressed_block_data_handle.h\"\n#include \"libfsntfs_compressed_data_handle.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n/* Creates cluster block stream from a buffer of data\n * Make sure the value cluster_block_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_stream_initialize_from_data(\n     libfdata_stream_t **cluster_block_stream,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *safe_data_stream         = NULL;\n\tlibfsntfs_buffer_data_handle_t *data_handle = NULL;\n\tstatic char *function                       = \"libfsntfs_cluster_block_stream_initialize_from_data\";\n\tint segment_index                           = 0;\n\n\tif( cluster_block_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_buffer_data_handle_initialize(\n\t     &data_handle,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create buffer data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_initialize(\n\t     &safe_data_stream,\n\t     (intptr_t *) data_handle,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_buffer_data_handle_free,\n\t     NULL,\n\t     NULL,\n\t     (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_buffer_data_handle_read_segment_data,\n\t     NULL,\n\t     (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfsntfs_buffer_data_handle_seek_segment_offset,\n\t     LIBFDATA_DATA_HANDLE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_handle = NULL;\n\n\tif( libfdata_stream_append_segment(\n\t     safe_data_stream,\n\t     &segment_index,\n\t     0,\n\t     0,\n\t     (size64_t) data_size,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t \"%s: unable to append data stream segment.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t*cluster_block_stream = safe_data_stream;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &safe_data_stream,\n\t\t NULL );\n\t}\n\tif( data_handle != NULL )\n\t{\n\t\tlibfsntfs_buffer_data_handle_free(\n\t\t &data_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Creates cluster block stream from data runs\n * Make sure the value data_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_stream_initialize_from_data_runs(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     size64_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *safe_data_stream          = NULL;\n\tlibfsntfs_data_run_t *data_run               = NULL;\n\tstatic char *function                        = \"libfsntfs_cluster_block_stream_initialize_from_data_runs\";\n\tsize64_t attribute_data_vcn_size             = 0;\n\tsize64_t calculated_allocated_data_size      = 0;\n\tsize64_t data_segment_size                   = 0;\n\tsize64_t stored_allocated_data_size          = 0;\n\tsize64_t valid_data_size                     = 0;\n\toff64_t attribute_data_vcn_offset            = 0;\n\toff64_t calculated_attribute_data_vcn_offset = 0;\n\toff64_t data_segment_offset                  = 0;\n\tuint16_t attribute_data_flags                = 0;\n\tint attribute_index                          = 0;\n\tint data_run_index                           = 0;\n\tint number_of_data_runs                      = 0;\n\tint segment_index                            = 0;\n\n\tif( cluster_block_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_valid_data_size(\n\t     data_attribute,\n\t     &valid_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve valid data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     data_attribute,\n\t     &attribute_data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( attribute_data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported compressed attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_allocated_data_size(\n\t     data_attribute,\n\t     &stored_allocated_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute allocated data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_initialize(\n\t     &safe_data_stream,\n\t     NULL,\n\t     NULL,\n\t     NULL,\n\t     NULL,\n\t     (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_cluster_block_data_read_segment_data,\n\t     NULL,\n\t     (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfsntfs_cluster_block_data_seek_segment_offset,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( data_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_vcn_range(\n\t\t     data_attribute,\n\t\t     (uint64_t *) &attribute_data_vcn_offset,\n\t\t     (uint64_t *) &attribute_data_vcn_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute data VCN range.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_data_vcn_size != 0xffffffffffffffffULL )\n\t\t{\n\t\t\tif( (uint64_t) attribute_data_vcn_offset > (uint64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_size > (size64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data last VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_offset > (off64_t) attribute_data_vcn_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value exceeds last VCN value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tattribute_data_vcn_size   += 1;\n\t\t\tattribute_data_vcn_size   -= attribute_data_vcn_offset;\n\t\t\tattribute_data_vcn_offset *= io_handle->cluster_block_size;\n\t\t\tattribute_data_vcn_size   *= io_handle->cluster_block_size;\n\n\t\t\tif( ( calculated_attribute_data_vcn_offset != 0 )\n\t\t\t && ( calculated_attribute_data_vcn_offset != attribute_data_vcn_offset ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data VCN offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_attribute_data_vcn_offset = attribute_data_vcn_offset + (off64_t) attribute_data_vcn_size;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     data_attribute,\n\t\t     &number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d number of data runs.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( data_run_index = 0;\n\t\t     data_run_index < number_of_data_runs;\n\t\t     data_run_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t     data_attribute,\n\t\t\t     data_run_index,\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run->size > ( valid_data_size - data_segment_offset ) )\n\t\t\t{\n\t\t\t\tdata_segment_size = valid_data_size - data_segment_offset;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdata_segment_size = data_run->size;\n\t\t\t}\n\t\t\tif( (size64_t) data_segment_offset < valid_data_size )\n\t\t\t{\n\t\t\t\tif( libfdata_stream_append_segment(\n\t\t\t\t     safe_data_stream,\n\t\t\t\t     &segment_index,\n\t\t\t\t     0,\n\t\t\t\t     data_run->start_offset,\n\t\t\t\t     data_segment_size,\n\t\t\t\t     data_run->range_flags,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t \"%s: unable to append attribute: %d data run: %d data stream segment.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tdata_segment_offset += data_segment_size;\n\t\t\t}\n\t\t\tcalculated_allocated_data_size += data_run->size;\n\t\t}\n\t\tattribute_index++;\n\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     data_attribute,\n\t\t     &data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( calculated_allocated_data_size != stored_allocated_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size of data runs: %\" PRIu64 \" does not match allocated data size: %\" PRIu64 \".\",\n\t\t function,\n\t\t calculated_allocated_data_size,\n\t\t stored_allocated_data_size );\n\n\t\tgoto on_error;\n\t}\n\tif( (size64_t) data_segment_offset < data_size )\n\t{\n\t\tif( libfdata_stream_append_segment(\n\t\t     safe_data_stream,\n\t\t     &segment_index,\n\t\t     0,\n\t\t     0,\n\t\t     data_size - data_segment_offset,\n\t\t     LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append sparse data stream segment.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\t*cluster_block_stream = safe_data_stream;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &safe_data_stream,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Creates cluster block stream from compressed data runs\n * Make sure the value data_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     size64_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *safe_data_stream                   = NULL;\n\tlibfsntfs_compressed_block_data_handle_t *data_handle = NULL;\n\tstatic char *function                                 = \"libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs\";\n\tsize64_t valid_data_size                              = 0;\n\tint segment_index                                     = 0;\n\n\tif( cluster_block_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_valid_data_size(\n\t     data_attribute,\n\t     &valid_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve valid data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( valid_data_size == 0 )\n\t{\n\t\tvalid_data_size = data_size;\n\t}\n\tif( libfsntfs_compressed_block_data_handle_initialize(\n\t     &data_handle,\n\t     io_handle,\n\t     data_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_initialize(\n\t     &safe_data_stream,\n\t     (intptr_t *) data_handle,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compressed_block_data_handle_free,\n\t     NULL,\n\t     NULL,\n\t     (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_compressed_block_data_handle_read_segment_data,\n\t     NULL,\n\t     (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfsntfs_compressed_block_data_handle_seek_segment_offset,\n\t     LIBFDATA_DATA_HANDLE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_handle = NULL;\n\n\tif( libfdata_stream_append_segment(\n\t     safe_data_stream,\n\t     &segment_index,\n\t     0,\n\t     0,\n\t     valid_data_size,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t \"%s: unable to append data stream segment.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( valid_data_size < data_size )\n\t{\n\t\tif( libfdata_stream_append_segment(\n\t\t     safe_data_stream,\n\t\t     &segment_index,\n\t\t     0,\n\t\t     0,\n\t\t     data_size - valid_data_size,\n\t\t     LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append sparse data stream segment.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\t*cluster_block_stream = safe_data_stream;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &safe_data_stream,\n\t\t NULL );\n\t}\n\tif( data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t &data_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Creates cluster block stream from a compressed stream\n * Make sure the value data_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n     libfdata_stream_t **cluster_block_stream,\n     libfdata_stream_t *compressed_data_stream,\n     libfsntfs_mft_attribute_t *data_attribute,\n     uint32_t compression_method,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *safe_data_stream             = NULL;\n\tlibfsntfs_compressed_data_handle_t *data_handle = NULL;\n\tstatic char *function                           = \"libfsntfs_cluster_block_stream_initialize_from_compressed_stream\";\n\tsize64_t data_size                              = 0;\n\tsize64_t valid_data_size                        = 0;\n\tint segment_index                               = 0;\n\n\tif( cluster_block_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_data_size(\n\t     data_attribute,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_valid_data_size(\n\t     data_attribute,\n\t     &valid_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve valid data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( valid_data_size == 0 )\n\t{\n\t\tvalid_data_size = data_size;\n\t}\n\tif( libfsntfs_compressed_data_handle_initialize(\n\t     &data_handle,\n\t     compressed_data_stream,\n\t     compression_method,\n\t     valid_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_initialize(\n\t     &safe_data_stream,\n\t     (intptr_t *) data_handle,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compressed_data_handle_free,\n\t     NULL,\n\t     NULL,\n\t     (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_compressed_data_handle_read_segment_data,\n\t     NULL,\n\t     (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfsntfs_compressed_data_handle_seek_segment_offset,\n\t     LIBFDATA_DATA_HANDLE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_handle = NULL;\n\n\tif( libfdata_stream_append_segment(\n\t     safe_data_stream,\n\t     &segment_index,\n\t     0,\n\t     0,\n\t     valid_data_size,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t \"%s: unable to append data stream segment.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( valid_data_size < data_size )\n\t{\n\t\tif( libfdata_stream_append_segment(\n\t\t     safe_data_stream,\n\t\t     &segment_index,\n\t\t     0,\n\t\t     0,\n\t\t     data_size - valid_data_size,\n\t\t     LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append sparse data stream segment.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\t*cluster_block_stream = safe_data_stream;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &safe_data_stream,\n\t\t NULL );\n\t}\n\tif( data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_data_handle_free(\n\t\t &data_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Creates a cluster block stream\n * Make sure the value cluster_block_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_stream_initialize(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libfsntfs_mft_attribute_t *wof_compressed_data_attribute,\n     uint32_t compression_method,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *safe_cluster_block_stream = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute     = NULL;\n\tuint8_t *resident_data                       = NULL;\n\tstatic char *function                        = \"libfsntfs_cluster_block_stream_initialize\";\n\tsize64_t data_size                           = 0;\n\tsize_t resident_data_size                    = 0;\n\tuint16_t data_flags                          = 0;\n\tint result                                   = 0;\n\n\tif( cluster_block_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( wof_compressed_data_attribute == NULL )\n\t{\n\t\tmft_attribute = data_attribute;\n\t}\n\telse\n\t{\n\t\tmft_attribute = wof_compressed_data_attribute;\n\t}\n\tif( libfsntfs_mft_attribute_get_data_size(\n\t     mft_attribute,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_resident_data(\n\t\t     mft_attribute,\n\t\t     &resident_data,\n\t\t     &resident_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     mft_attribute,\n\t     &data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data flags from attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( resident_data != NULL )\n\t || ( data_size == 0 ) )\n\t{\n\t\tif( data_size != (size64_t) resident_data_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: unuspported data size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t\t          &safe_cluster_block_stream,\n\t\t          resident_data,\n\t\t          resident_data_size,\n\t\t          error );\n\t}\n\telse if( ( data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t\t          &safe_cluster_block_stream,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          data_size,\n\t\t          error );\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t\t          &safe_cluster_block_stream,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          data_size,\n\t\t          error );\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( wof_compressed_data_attribute == NULL )\n\t{\n\t\t*cluster_block_stream = safe_cluster_block_stream;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t\t     cluster_block_stream,\n\t\t     safe_cluster_block_stream,\n\t\t     data_attribute,\n\t\t     compression_method,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create cluster block stream.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( safe_cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &safe_cluster_block_stream,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_stream.h",
    "content": "/*\n * Cluster block stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_CLUSTER_BLOCK_STREAM_H )\n#define _LIBFSNTFS_CLUSTER_BLOCK_STREAM_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_cluster_block_stream_initialize_from_data(\n     libfdata_stream_t **cluster_block_stream,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_stream_initialize_from_data_runs(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     size64_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     size64_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n     libfdata_stream_t **cluster_block_stream,\n     libfdata_stream_t *compressed_data_stream,\n     libfsntfs_mft_attribute_t *data_attribute,\n     uint32_t compression_method,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_stream_initialize(\n     libfdata_stream_t **cluster_block_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libfsntfs_mft_attribute_t *wof_compressed_data_attribute,\n     uint32_t compression_method,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_CLUSTER_BLOCK_STREAM_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_vector.c",
    "content": "/*\n * Cluster block vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block.h\"\n#include \"libfsntfs_cluster_block_vector.h\"\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates a cluster block vector\n * Make sure the value cluster_block_vector is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_vector_initialize(\n     libfdata_vector_t **cluster_block_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tlibfdata_vector_t *safe_cluster_block_vector = NULL;\n\tlibfsntfs_data_run_t *data_run               = NULL;\n\tstatic char *function                        = \"libfsntfs_cluster_block_vector_initialize\";\n\tsize64_t attribute_data_vcn_size             = 0;\n\tsize64_t calculated_allocated_data_size      = 0;\n\tsize64_t stored_allocated_data_size          = 0;\n\toff64_t attribute_data_vcn_offset            = 0;\n\toff64_t calculated_attribute_data_vcn_offset = 0;\n\tuint16_t attribute_data_flags                = 0;\n\tint attribute_index                          = 0;\n\tint data_run_index                           = 0;\n\tint number_of_data_runs                      = 0;\n\tint segment_index                            = 0;\n\n\tif( cluster_block_vector == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block vector.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *cluster_block_vector != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid cluster block vector value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     mft_attribute,\n\t     &attribute_data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( attribute_data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported compressed attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_allocated_data_size(\n\t     mft_attribute,\n\t     &stored_allocated_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute allocated data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_initialize(\n\t     &safe_cluster_block_vector,\n\t     (size64_t) io_handle->cluster_block_size,\n\t     (intptr_t *) io_handle,\n\t     NULL,\n\t     NULL,\n\t     (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_cluster_block_vector_read_element_data,\n\t     NULL,\n\t     LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_vcn_range(\n\t\t     mft_attribute,\n\t\t     (uint64_t *) &attribute_data_vcn_offset,\n\t\t     (uint64_t *) &attribute_data_vcn_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute data VCN range.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_data_vcn_size != 0xffffffffffffffffULL )\n\t\t{\n\t\t\tif( (uint64_t) attribute_data_vcn_offset > (uint64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_size > (size64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data last VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_offset > (off64_t) attribute_data_vcn_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value exceeds last VCN value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tattribute_data_vcn_size   += 1;\n\t\t\tattribute_data_vcn_size   -= attribute_data_vcn_offset;\n\t\t\tattribute_data_vcn_offset *= io_handle->cluster_block_size;\n\t\t\tattribute_data_vcn_size   *= io_handle->cluster_block_size;\n\n\t\t\tif( ( calculated_attribute_data_vcn_offset != 0 )\n\t\t\t && ( calculated_attribute_data_vcn_offset != attribute_data_vcn_offset ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data VCN offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_attribute_data_vcn_offset = attribute_data_vcn_offset + (off64_t) attribute_data_vcn_size;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     mft_attribute,\n\t\t     &number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d number of data runs.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( data_run_index = 0;\n\t\t     data_run_index < number_of_data_runs;\n\t\t     data_run_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t     mft_attribute,\n\t\t\t     data_run_index,\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfdata_vector_append_segment(\n\t\t\t     safe_cluster_block_vector,\n\t\t\t     &segment_index,\n\t\t\t     0,\n\t\t\t     data_run->start_offset,\n\t\t\t     data_run->size,\n\t\t\t     data_run->range_flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append attribute: %d data run: %d vector segment.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_allocated_data_size += data_run->size;\n\t\t}\n\t\tattribute_index++;\n\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     mft_attribute,\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( calculated_allocated_data_size != stored_allocated_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size of data runs: %\" PRIu64 \" does not match allocated data size: %\" PRIu64 \".\",\n\t\t function,\n\t\t calculated_allocated_data_size,\n\t\t stored_allocated_data_size );\n\n\t\tgoto on_error;\n\t}\n\t*cluster_block_vector = safe_cluster_block_vector;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_cluster_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &safe_cluster_block_vector,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads a cluster block\n * Callback function for the cluster block vector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_cluster_block_vector_read_element_data(\n     intptr_t *data_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n     int element_data_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n     off64_t cluster_block_offset,\n     size64_t cluster_block_size,\n     uint32_t range_flags,\n     uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tstatic char *function                    = \"libfsntfs_cluster_block_vector_read_element_data\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( data_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_data_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( ( cluster_block_size == 0 )\n\t || ( cluster_block_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_cluster_block_initialize(\n\t     &cluster_block,\n\t     (size_t) cluster_block_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t{\n\t\tif( libfsntfs_cluster_block_clear(\n\t\t     cluster_block,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to clear cluster block.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_cluster_block_read_file_io_handle(\n\t\t     cluster_block,\n\t\t     file_io_handle,\n\t\t     cluster_block_offset,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read cluster block at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t cluster_block_offset,\n\t\t\t cluster_block_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfdata_vector_set_element_value_by_index(\n\t     vector,\n\t     (intptr_t *) file_io_handle,\n\t     cache,\n\t     element_index,\n\t     (intptr_t *) cluster_block,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_cluster_block_free,\n\t     LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set cluster block as element value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( cluster_block != NULL )\n\t{\n\t\tlibfsntfs_cluster_block_free(\n\t\t &cluster_block,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_cluster_block_vector.h",
    "content": "/*\n * Cluster block vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_CLUSTER_BLOCK_VECTOR_H )\n#define _LIBFSNTFS_CLUSTER_BLOCK_VECTOR_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_cluster_block_vector_initialize(\n     libfdata_vector_t **cluster_block_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_cluster_block_vector_read_element_data(\n     intptr_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index,\n     off64_t cluster_block_offset,\n     size64_t cluster_block_size,\n     uint32_t range_flags,\n     uint8_t read_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_CLUSTER_BLOCK_VECTOR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block.c",
    "content": "/*\n * Compressed block functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_compressed_block.h\"\n#include \"libfsntfs_libcerror.h\"\n\n/* Creates a compressed block\n * Make sure the value compressed_block is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_initialize(\n     libfsntfs_compressed_block_t **compressed_block,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_block_initialize\";\n\n\tif( compressed_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *compressed_block != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid compressed block value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size == 0 )\n\t || ( data_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*compressed_block = memory_allocate_structure(\n\t                     libfsntfs_compressed_block_t );\n\n\tif( *compressed_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create compressed block.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *compressed_block,\n\t     0,\n\t     sizeof( libfsntfs_compressed_block_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear compressed block.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *compressed_block );\n\n\t\t*compressed_block = NULL;\n\n\t\treturn( -1 );\n\t}\n\t( *compressed_block )->data = (uint8_t *) memory_allocate(\n\t                                           sizeof( uint8_t ) * data_size );\n\n\tif( ( *compressed_block )->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *compressed_block )->data_size = data_size;\n\n\treturn( 1 );\n\non_error:\n\tif( *compressed_block != NULL )\n\t{\n\t\tmemory_free(\n\t\t *compressed_block );\n\n\t\t*compressed_block = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a compressed block\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_free(\n     libfsntfs_compressed_block_t **compressed_block,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_block_free\";\n\n\tif( compressed_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed block.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *compressed_block != NULL )\n\t{\n\t\tif( ( *compressed_block )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *compressed_block )->data );\n\t\t}\n\t\tmemory_free(\n\t\t *compressed_block );\n\n\t\t*compressed_block = NULL;\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block.h",
    "content": "/*\n * Compressed block functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSED_BLOCK_H )\n#define _LIBFSNTFS_COMPRESSED_BLOCK_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_compressed_block libfsntfs_compressed_block_t;\n\nstruct libfsntfs_compressed_block\n{\n\t/* The data\n\t */\n\tuint8_t *data;\n\n\t/* The data size\n\t */\n\tsize_t data_size;\n};\n\nint libfsntfs_compressed_block_initialize(\n     libfsntfs_compressed_block_t **compressed_block,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_compressed_block_free(\n     libfsntfs_compressed_block_t **compressed_block,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSED_BLOCK_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block_data_handle.c",
    "content": "/*\n * The compressed block data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_compressed_block.h\"\n#include \"libfsntfs_compressed_block_data_handle.h\"\n#include \"libfsntfs_compressed_block_vector.h\"\n#include \"libfsntfs_compression.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates compressed block data handle\n * Make sure the value data_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_data_handle_initialize(\n     libfsntfs_compressed_block_data_handle_t **data_handle,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_block_data_handle_initialize\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*data_handle = memory_allocate_structure(\n\t                libfsntfs_compressed_block_data_handle_t );\n\n\tif( *data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *data_handle,\n\t     0,\n\t     sizeof( libfsntfs_compressed_block_data_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data handle.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_compressed_block_vector_initialize(\n\t     &( ( *data_handle )->compressed_block_vector ),\n\t     io_handle,\n\t     mft_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create compressed block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_get_size(\n\t     ( *data_handle )->compressed_block_vector,\n\t     &( ( *data_handle )->data_size ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of compressed block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfcache_cache_initialize(\n\t     &( ( *data_handle )->compressed_block_cache ),\n\t     LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_COMPRESSED_BLOCKS,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create compressed block cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *data_handle != NULL )\n\t{\n\t\tif( ( *data_handle )->compressed_block_vector != NULL )\n\t\t{\n\t\t\tlibfdata_vector_free(\n\t\t\t &( ( *data_handle )->compressed_block_vector ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a data handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_data_handle_free(\n     libfsntfs_compressed_block_data_handle_t **data_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_block_data_handle_free\";\n\tint result            = 1;\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tif( libfcache_cache_free(\n\t\t     &( ( *data_handle )->compressed_block_cache ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free compressed_block cache.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libfdata_vector_free(\n\t\t     &( ( *data_handle )->compressed_block_vector ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free compressed block vector.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads data from the current offset into a compressed block\n * Callback for the data stream\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_compressed_block_data_handle_read_segment_data(\n         libfsntfs_compressed_block_data_handle_t *data_handle,\n         libbfio_handle_t *file_io_handle,\n         int segment_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_compressed_block_t *compressed_block = NULL;\n\tstatic char *function                          = \"libfsntfs_compressed_block_data_handle_read_segment_data\";\n\tsize_t read_size                               = 0;\n\tsize_t segment_data_offset                     = 0;\n\tssize_t read_count                             = 0;\n\toff64_t compressed_block_offset                = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_flags )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_handle->current_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data handle - current offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid segment data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid segment data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( segment_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t{\n\t\tif( memory_set(\n\t\t     segment_data,\n\t\t     0,\n\t\t     segment_data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to clear segment data.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tread_count = (ssize_t) segment_data_size;\n\t}\n\telse\n\t{\n\t\tif( (size64_t) data_handle->current_offset >= data_handle->data_size )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\twhile( segment_data_size > 0 )\n\t\t{\n\t\t\tif( libfdata_vector_get_element_value_at_offset(\n\t\t\t     data_handle->compressed_block_vector,\n\t\t\t     (intptr_t *) file_io_handle,\n\t\t\t     (libfdata_cache_t *) data_handle->compressed_block_cache,\n\t\t\t     data_handle->current_offset,\n\t\t\t     &compressed_block_offset,\n\t\t\t     (intptr_t **) &compressed_block,\n\t\t\t     0,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve compressed block at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t\t function,\n\t\t\t\t data_handle->current_offset,\n\t\t\t\t data_handle->current_offset );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( compressed_block == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: invalid compressed block.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( compressed_block->data == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: invalid compressed block - missing data.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( ( compressed_block_offset < 0 )\n\t\t\t || ( (size64_t) compressed_block_offset >= compressed_block->data_size ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid compressed block offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tread_size = compressed_block->data_size - compressed_block_offset;\n\n\t\t\tif( read_size > segment_data_size )\n\t\t\t{\n\t\t\t\tread_size = segment_data_size;\n\t\t\t}\n\t\t\tif( memory_copy(\n\t\t\t     &( segment_data[ segment_data_offset ] ),\n\t\t\t     &( ( compressed_block->data )[ compressed_block_offset ] ),\n\t\t\t     read_size ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy compressed block data.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tsegment_data_offset += read_size;\n\t\t\tsegment_data_size   -= read_size;\n\n\t\t\tdata_handle->current_offset += read_size;\n\n\t\t\tif( (size64_t) data_handle->current_offset >= data_handle->data_size )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tread_count = (ssize_t) segment_data_offset;\n\t}\n\treturn( read_count );\n}\n\n/* Seeks a certain offset of the data\n * Callback for the data stream\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_compressed_block_data_handle_seek_segment_offset(\n         libfsntfs_compressed_block_data_handle_t *data_handle,\n         intptr_t *file_io_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         off64_t segment_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_block_data_handle_seek_segment_offset\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( file_io_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tdata_handle->current_offset = segment_offset;\n\n\treturn( segment_offset );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block_data_handle.h",
    "content": "/*\n * The compressed block data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSED_BLOCK_DATA_HANDLE_H )\n#define _LIBFSNTFS_COMPRESSED_BLOCK_DATA_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_compressed_block_data_handle libfsntfs_compressed_block_data_handle_t;\n\nstruct libfsntfs_compressed_block_data_handle\n{\n\t/* The current offset\n\t */\n\toff64_t current_offset;\n\n\t/* The data size\n\t */\n\tsize64_t data_size;\n\n\t/* The compressed block vector\n\t */\n\tlibfdata_vector_t *compressed_block_vector;\n\n\t/* The compressed block cache\n\t */\n\tlibfcache_cache_t *compressed_block_cache;\n};\n\nint libfsntfs_compressed_block_data_handle_initialize(\n     libfsntfs_compressed_block_data_handle_t **data_handle,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_compressed_block_data_handle_free(\n     libfsntfs_compressed_block_data_handle_t **data_handle,\n     libcerror_error_t **error );\n\nssize_t libfsntfs_compressed_block_data_handle_read_segment_data(\n         libfsntfs_compressed_block_data_handle_t *data_handle,\n         libbfio_handle_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags,\n         uint8_t read_flags,\n         libcerror_error_t **error );\n\noff64_t libfsntfs_compressed_block_data_handle_seek_segment_offset(\n         libfsntfs_compressed_block_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         off64_t segment_offset,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSED_BLOCK_DATA_HANDLE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block_vector.c",
    "content": "/*\n * Compressed block vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_compressed_block.h\"\n#include \"libfsntfs_compressed_block_vector.h\"\n#include \"libfsntfs_compression_unit_data_handle.h\"\n#include \"libfsntfs_compression_unit_descriptor.h\"\n#include \"libfsntfs_compression.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates a compressed block vector\n * Make sure the value compressed_block_vector is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_vector_initialize(\n     libfdata_vector_t **compressed_block_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tlibfdata_vector_t *safe_compressed_block_vector       = NULL;\n\tlibfsntfs_compression_unit_data_handle_t *data_handle = NULL;\n\tlibfsntfs_compression_unit_descriptor_t *descriptor   = NULL;\n\tstatic char *function                                 = \"libfsntfs_compressed_block_vector_initialize\";\n\tint descriptor_index                                  = 0;\n\tint number_of_descriptors                             = 0;\n\tint segment_index                                     = 0;\n\n\tif( compressed_block_vector == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed block vector.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *compressed_block_vector != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid compressed block vector value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_compression_unit_data_handle_initialize(\n\t     &data_handle,\n\t     io_handle,\n\t     mft_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create compression unit data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_initialize(\n\t     &safe_compressed_block_vector,\n\t     (size64_t) data_handle->compression_unit_size,\n\t     (intptr_t *) data_handle,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compression_unit_data_handle_free,\n\t     NULL,\n\t     (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_compressed_block_vector_read_element_data,\n\t     NULL,\n\t     LIBFDATA_DATA_HANDLE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create compressed block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_compression_unit_data_handle_get_number_of_descriptors(\n\t     data_handle,\n\t     &number_of_descriptors,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of descriptors.\",\n\t\t function );\n\n\t\tdata_handle = NULL;\n\n\t\tgoto on_error;\n\t}\n\tfor( descriptor_index = 0;\n\t     descriptor_index < number_of_descriptors;\n\t     descriptor_index++ )\n\t{\n\t\tif( libfsntfs_compression_unit_data_handle_get_descriptor_by_index(\n\t\t     data_handle,\n\t\t     descriptor_index,\n\t\t     &descriptor,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve descriptor: %d.\",\n\t\t\t function,\n\t\t\t descriptor_index );\n\n\t\t\tdata_handle = NULL;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( descriptor == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: missing descriptor: %d.\",\n\t\t\t function,\n\t\t\t descriptor_index );\n\n\t\t\tdata_handle = NULL;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdata_vector_append_segment(\n\t\t     safe_compressed_block_vector,\n\t\t     &segment_index,\n\t\t     descriptor_index,\n\t\t     descriptor->data_offset,\n\t\t     descriptor->compression_unit_size,\n\t\t     descriptor->data_range_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append compression unit: %d segment to compressed block vector.\",\n\t\t\t function,\n\t\t\t descriptor_index );\n\n\t\t\tdata_handle = NULL;\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\t*compressed_block_vector = safe_compressed_block_vector;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_compressed_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &safe_compressed_block_vector,\n\t\t NULL );\n\t}\n\tif( data_handle != NULL )\n\t{\n\t\tlibfsntfs_compression_unit_data_handle_free(\n\t\t &data_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads a compressed block\n * Callback function for the compressed block vector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_block_vector_read_element_data(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index,\n     off64_t element_data_offset,\n     size64_t compressed_block_size,\n     uint32_t range_flags,\n     uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_compressed_block_t *compressed_block                       = NULL;\n\tlibfsntfs_compression_unit_descriptor_t *compression_unit_descriptor = NULL;\n\tuint8_t *compressed_block_data                                       = NULL;\n\tuint8_t *compressed_data                                             = NULL;\n\tconst char *block_type                                               = NULL;\n\tstatic char *function                                                = \"libfsntfs_compressed_block_vector_read_element_data\";\n\tssize_t read_count                                                   = 0;\n\toff64_t data_stream_offset                                           = 0;\n\tint result                                                           = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( ( compressed_block_size == 0 )\n\t || ( compressed_block_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid compressed block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_compression_unit_data_handle_get_descriptor_by_index(\n\t     data_handle,\n\t     element_data_file_index,\n\t     &compression_unit_descriptor,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compression unit descriptor: %d.\",\n\t\t function,\n\t\t element_data_file_index );\n\n\t\tgoto on_error;\n\t}\n\tif( compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing compression unit descriptor: %d.\",\n\t\t function,\n\t\t element_data_file_index );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_compressed_block_initialize(\n\t     &compressed_block,\n\t     compressed_block_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create compressed block.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( compressed_block == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing compressed block.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( range_flags & LIBFDATA_RANGE_FLAG_IS_COMPRESSED ) != 0 )\n\t{\n\t\tcompressed_data = (uint8_t *) memory_allocate(\n\t\t                               sizeof( uint8_t ) * (size_t) compressed_block_size );\n\n\t\tif( compressed_data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create compressed data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tcompressed_block_data = compressed_data;\n\n\t\t/* Make sure to read from the start of the data stream\n\t\t * otherwise successive reads will fail\n\t\t */\n\t\tdata_stream_offset = 0;\n\n\t\tblock_type = \"compressed\";\n\t}\n\telse\n\t{\n\t\tcompressed_block_data = compressed_block->data;\n\t\tdata_stream_offset    = element_data_offset - compression_unit_descriptor->data_offset;\n\n\t\tblock_type = \"uncompressed\";\n\t}\n\tread_count = libfdata_stream_read_buffer_at_offset(\n\t              compression_unit_descriptor->data_stream,\n\t              (intptr_t *) file_io_handle,\n\t              compressed_block_data,\n\t              compressed_block_size,\n\t              data_stream_offset,\n\t              0,\n\t              error );\n\n\tif( read_count != (ssize_t) compressed_block_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read %s block at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t block_type,\n\t\t data_stream_offset,\n\t\t data_stream_offset );\n\n\t\tgoto on_error;\n\t}\n\tif( ( range_flags & LIBFDATA_RANGE_FLAG_IS_COMPRESSED ) != 0 )\n\t{\n\t\tresult = libfsntfs_decompress_data(\n\t\t          compressed_data,\n\t\t          (size_t) compressed_block_size,\n\t\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t\t          compressed_block->data,\n\t\t          &( compressed_block->data_size ),\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_COMPRESSION,\n\t\t\t LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,\n\t\t\t \"%s: unable to decompress compressed data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmemory_free(\n\t\t compressed_data );\n\n\t\tcompressed_data = NULL;\n\n\t\t/* If the compressed block data size is 0 or the compressed block was truncated\n\t\t * fill the remainder of the compressed block with 0-byte values\n\t\t */\n\t\tif( compressed_block->data_size < compressed_block_size )\n\t\t{\n\t\t\tif( memory_set(\n\t\t\t     &( compressed_block->data[ compressed_block->data_size ] ),\n\t\t\t     0,\n\t\t\t     compressed_block_size - compressed_block->data_size ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to clear remainder of compressed block.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcompressed_block->data_size = compressed_block_size;\n\t\t}\n\t}\n\tif( libfdata_vector_set_element_value_by_index(\n\t     vector,\n\t     (intptr_t *) file_io_handle,\n\t     cache,\n\t     element_index,\n\t     (intptr_t *) compressed_block,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compressed_block_free,\n\t     LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set cluster block as element value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( compressed_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t compressed_data );\n\t}\n\tif( compressed_block != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_free(\n\t\t &compressed_block,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_block_vector.h",
    "content": "/*\n * Compressed block vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSED_BLOCK_VECTOR_H )\n#define _LIBFSNTFS_COMPRESSED_BLOCK_VECTOR_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_compression_unit_data_handle.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_compressed_block_vector_initialize(\n     libfdata_vector_t **compressed_block_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_compressed_block_vector_read_element_data(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index,\n     off64_t element_data_offset,\n     size64_t compressed_block_size,\n     uint32_t range_flags,\n     uint8_t read_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSED_BLOCK_VECTOR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_data_handle.c",
    "content": "/*\n * The compressed data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_compressed_data_handle.h\"\n#include \"libfsntfs_compression.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates compressed data handle\n * Make sure the value data_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_data_handle_initialize(\n     libfsntfs_compressed_data_handle_t **data_handle,\n     libfdata_stream_t *compressed_data_stream,\n     uint32_t compression_method,\n     size64_t uncompressed_data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function        = \"libfsntfs_compressed_data_handle_initialize\";\n\tsize_t compression_unit_size = 0;\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( compressed_data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tswitch( compression_method )\n\t{\n\t\tcase 0:\n\t\t\tcompression_method    = LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN;\n\t\t\tcompression_unit_size = 4096;\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tcompression_method    = LIBFSNTFS_COMPRESSION_METHOD_LZX;\n\t\t\tcompression_unit_size = 32768;\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tcompression_method    = LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN;\n\t\t\tcompression_unit_size = 8192;\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tcompression_method    = LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN;\n\t\t\tcompression_unit_size = 16384;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported compression method: %\" PRIu32 \".\",\n\t\t\t function,\n\t\t\t compression_method );\n\n\t\t\treturn( -1 );\n\t}\n\t*data_handle = memory_allocate_structure(\n\t                libfsntfs_compressed_data_handle_t );\n\n\tif( *data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *data_handle,\n\t     0,\n\t     sizeof( libfsntfs_compressed_data_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data handle.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\n\t\treturn( -1 );\n\t}\n\t( *data_handle )->compressed_segment_data = (uint8_t *) memory_allocate(\n\t                                                         sizeof( uint8_t ) * compression_unit_size );\n\n\tif( ( *data_handle )->compressed_segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create compressed segment data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *data_handle )->segment_data = (uint8_t *) memory_allocate(\n\t                                              sizeof( uint8_t ) * compression_unit_size );\n\n\tif( ( *data_handle )->segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create segment data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *data_handle )->compressed_data_stream         = compressed_data_stream;\n\t( *data_handle )->current_compressed_block_index = (uint32_t) -1;\n\t( *data_handle )->uncompressed_data_size         = uncompressed_data_size;\n\t( *data_handle )->compression_method             = (int) compression_method;\n\t( *data_handle )->compression_unit_size          = compression_unit_size;\n\n\treturn( 1 );\n\non_error:\n\tif( *data_handle != NULL )\n\t{\n\t\tif( ( *data_handle )->segment_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *data_handle )->segment_data );\n\t\t}\n\t\tif( ( *data_handle )->compressed_segment_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *data_handle )->compressed_segment_data );\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees data handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_data_handle_free(\n     libfsntfs_compressed_data_handle_t **data_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_data_handle_free\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tif( ( *data_handle )->segment_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *data_handle )->segment_data );\n\t\t}\n\t\tif( ( *data_handle )->compressed_segment_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *data_handle )->compressed_segment_data );\n\t\t}\n\t\tif( ( *data_handle )->compressed_block_offsets != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *data_handle )->compressed_block_offsets );\n\t\t}\n\t\tif( ( *data_handle )->compressed_data_stream != NULL )\n\t\t{\n\t\t\tlibfdata_stream_free(\n\t\t\t &( ( *data_handle )->compressed_data_stream ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Determines the compressed block offsets\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compressed_data_handle_get_compressed_block_offsets(\n     libfsntfs_compressed_data_handle_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tuint8_t *chunk_offsets_data               = NULL;\n\tstatic char *function                     = \"libfsntfs_compressed_data_handle_get_compressed_block_offsets\";\n\tsize64_t compressed_data_size             = 0;\n\tsize_t chunk_offset_data_size             = 0;\n\tsize_t chunk_offsets_data_size            = 0;\n\tsize_t data_offset                        = 0;\n\tssize_t read_count                        = 0;\n\tuint64_t compressed_block_index           = 0;\n\tuint64_t compressed_block_offset          = 0;\n\tuint64_t previous_compressed_block_offset = 0;\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_handle->compressed_block_offsets != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data handle - compressed block offsets value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_stream_get_size(\n\t     data_handle->compressed_data_stream,\n\t     &compressed_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compressed data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( compressed_data_size > (size64_t) UINT32_MAX )\n\t{\n\t\tchunk_offset_data_size = 8;\n\t}\n\telse\n\t{\n\t\tchunk_offset_data_size = 4;\n\t}\n\tchunk_offsets_data_size = data_handle->uncompressed_data_size / data_handle->compression_unit_size;\n\n\tif( ( data_handle->uncompressed_data_size % data_handle->compression_unit_size ) != 0 )\n\t{\n\t\tchunk_offsets_data_size++;\n\t}\n\tif( chunk_offsets_data_size > ( (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE / chunk_offset_data_size ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid number of chunk offsets data size value exceeds maximum allocation size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tchunk_offsets_data_size *= chunk_offset_data_size;\n\n\tchunk_offsets_data = (uint8_t *) memory_allocate(\n\t                                  sizeof( uint8_t ) * chunk_offsets_data_size );\n\n\tif( chunk_offsets_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create chunk offsets data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tread_count = libfdata_stream_read_buffer_at_offset(\n\t              data_handle->compressed_data_stream,\n\t              (intptr_t *) file_io_handle,\n\t              chunk_offsets_data,\n\t              chunk_offsets_data_size,\n\t              0,\n\t              0,\n\t              error );\n\n\tif( read_count != (ssize_t) chunk_offsets_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read chunk offsets data from compressed data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: chunk offsets data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t chunk_offsets_data,\n\t\t\t chunk_offsets_data_size,\n\t\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t\t}\n#endif\n\tprevious_compressed_block_offset = chunk_offset_data_size;\n\n\tcompressed_block_index++;\n\n\tfor( data_offset = 0;\n\t     data_offset < chunk_offsets_data_size;\n\t     data_offset += chunk_offset_data_size )\n\t{\n\t\tif( chunk_offset_data_size == 8 )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t\t &( chunk_offsets_data[ data_offset ] ),\n\t\t\t compressed_block_offset );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( chunk_offsets_data[ data_offset ] ),\n\t\t\t compressed_block_offset );\n\t\t}\n\t\tif( ( compressed_block_offset <= previous_compressed_block_offset )\n\t\t || ( compressed_block_offset >= compressed_data_size ) )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tprevious_compressed_block_offset = compressed_block_offset;\n\n\t\tcompressed_block_index++;\n\t}\n\tdata_handle->number_of_compressed_blocks = compressed_block_index;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: number of compressed blocks\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t data_handle->number_of_compressed_blocks );\n\t}\n#endif\n\tif( (size_t) data_handle->number_of_compressed_blocks > ( (size_t) ( MEMORY_MAXIMUM_ALLOCATION_SIZE / sizeof( uint64_t ) ) - 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid number of compressed blocks value exceeds maximum allocation size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_handle->compressed_block_offsets = (uint64_t *) memory_allocate(\n\t                                                      sizeof( uint64_t ) * ( data_handle->number_of_compressed_blocks + 1 ) );\n\n\tif( data_handle->compressed_block_offsets == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create compressed block offsets.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: compressed block: % 2d offset\\t: %\" PRIzd \" (0x%08\" PRIzx \")\\n\",\n\t\t function,\n\t\t 0,\n\t\t data_offset,\n\t\t data_offset );\n\t}\n#endif\n\tdata_handle->compressed_block_offsets[ 0 ] = data_offset;\n\n\tdata_offset = 0;\n\n\tfor( compressed_block_index = 1;\n\t     compressed_block_index < data_handle->number_of_compressed_blocks;\n\t     compressed_block_index++ )\n\t{\n\t\tif( chunk_offset_data_size == 8 )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t\t &( chunk_offsets_data[ data_offset ] ),\n\t\t\t compressed_block_offset );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( chunk_offsets_data[ data_offset ] ),\n\t\t\t compressed_block_offset );\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: compressed block: % 2\" PRIu64 \" offset\\t: %\" PRIu64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t\t function,\n\t\t\t compressed_block_index,\n\t\t\t compressed_block_offset,\n\t\t\t compressed_block_offset );\n\t\t}\n#endif\n\t\tif( ( compressed_block_offset == 0 )\n\t\t || ( compressed_block_offset >= ( (uint64_t) INT64_MAX - data_handle->compressed_block_offsets[ 0 ] ) ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid compressed block offset: %d value out of bounds.\",\n\t\t\t function,\n\t\t\t compressed_block_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += chunk_offset_data_size;\n\n\t\tdata_handle->compressed_block_offsets[ compressed_block_index ] = data_handle->compressed_block_offsets[ 0 ] + compressed_block_offset;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: compressed block: % 2\" PRIu64 \" offset\\t: %\" PRIu64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t compressed_block_index,\n\t\t compressed_data_size,\n\t\t compressed_data_size );\n\t}\n#endif\n\tdata_handle->compressed_block_offsets[ compressed_block_index ] = (uint64_t) compressed_data_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\tmemory_free(\n\t chunk_offsets_data );\n\n\treturn( 1 );\n\non_error:\n\tif( data_handle->compressed_block_offsets != NULL )\n\t{\n\t\tmemory_free(\n\t\t data_handle->compressed_block_offsets );\n\n\t\tdata_handle->compressed_block_offsets = NULL;\n\t}\n\tif( chunk_offsets_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t chunk_offsets_data );\n\t}\n\treturn( -1 );\n}\n\n/* Reads data from the current offset into a compressed\n * Callback for the data stream\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_compressed_data_handle_read_segment_data(\n         libfsntfs_compressed_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n         libcerror_error_t **error )\n{\n\tuint8_t *read_buffer              = NULL;\n\tstatic char *function             = \"libfsntfs_compressed_data_handle_read_segment_data\";\n\tsize_t data_offset                = 0;\n\tsize_t read_size                  = 0;\n\tsize_t segment_data_offset        = 0;\n\tssize_t read_count                = 0;\n\toff64_t data_stream_offset        = 0;\n\toff64_t uncompressed_block_offset = 0;\n\tuint64_t compressed_block_index   = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( file_io_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_flags )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_index != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid segment data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid segment data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_handle->compressed_block_offsets == NULL )\n\t{\n\t\tif( libfsntfs_compressed_data_handle_get_compressed_block_offsets(\n\t\t     data_handle,\n\t\t     (libbfio_handle_t *) file_io_handle,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine compressed block offsets.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( (size64_t) data_handle->current_offset >= data_handle->uncompressed_data_size )\n\t{\n\t\treturn( 0 );\n\t}\n\tcompressed_block_index = (uint64_t) ( data_handle->current_offset / data_handle->compression_unit_size );\n\tdata_offset            = (size_t) ( data_handle->current_offset % data_handle->compression_unit_size );\n\n\twhile( segment_data_size > 0 )\n\t{\n\t\tif( compressed_block_index >= data_handle->number_of_compressed_blocks )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid compressed block index value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( data_handle->current_compressed_block_index != compressed_block_index )\n\t\t{\n\t\t\tdata_stream_offset = data_handle->compressed_block_offsets[ compressed_block_index ];\n\t\t\tread_size          = (size_t) ( data_handle->compressed_block_offsets[ compressed_block_index + 1 ] - data_stream_offset );\n\n\t\t\tdata_handle->segment_data_size = data_handle->compression_unit_size;\n\n\t\t\tif( data_handle->segment_data_size > ( data_handle->uncompressed_data_size - data_handle->current_offset ) )\n\t\t\t{\n\t\t\t\tdata_handle->segment_data_size = data_handle->uncompressed_data_size - data_handle->current_offset;\n\t\t\t}\n\t\t\tif( read_size > data_handle->segment_data_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid segment data size value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( read_size < data_handle->segment_data_size )\n\t\t\t{\n\t\t\t\tread_buffer = data_handle->compressed_segment_data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tread_buffer = data_handle->segment_data;\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: compressed block: % 2\" PRIu64 \" offset\\t: %\" PRIu64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t\t\t function,\n\t\t\t\t compressed_block_index,\n\t\t\t\t data_stream_offset,\n\t\t\t\t data_stream_offset );\n\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"\\n\" );\n\t\t\t}\n#endif\n\t\t\tread_count = libfdata_stream_read_buffer_at_offset(\n\t\t\t              data_handle->compressed_data_stream,\n\t\t\t              (intptr_t *) file_io_handle,\n\t\t\t              read_buffer,\n\t\t\t              read_size,\n\t\t\t              data_stream_offset,\n\t\t\t              0,\n\t\t\t              error );\n\n\t\t\tif( read_count != (ssize_t) read_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read buffer at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") from data stream.\",\n\t\t\t\t function,\n\t\t\t\t data_stream_offset,\n\t\t\t\t data_stream_offset );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( read_buffer == data_handle->compressed_segment_data )\n\t\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t{\n\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t \"%s: compressed block data:\\n\",\n\t\t\t\t\t function );\n\t\t\t\t\tlibcnotify_print_data(\n\t\t\t\t\t data_handle->compressed_segment_data,\n\t\t\t\t\t read_size,\n\t\t\t\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t\t\t\t}\n#endif\n\t\t\t\tif( libfsntfs_decompress_data(\n\t\t\t\t     data_handle->compressed_segment_data,\n\t\t\t\t     (size_t) read_count,\n\t\t\t\t     data_handle->compression_method,\n\t\t\t\t     data_handle->segment_data,\n\t\t\t\t     &( data_handle->segment_data_size ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_ENCRYPTION,\n\t\t\t\t\t LIBCERROR_ENCRYPTION_ERROR_GENERIC,\n\t\t\t\t\t \"%s: unable to decompress data.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\treturn( -1 );\n\t\t\t\t}\n\t\t\t\tuncompressed_block_offset = ( compressed_block_index + 1 ) * data_handle->compression_unit_size;\n\n\t\t\t\tif( ( (size64_t) uncompressed_block_offset < data_handle->uncompressed_data_size )\n\t\t\t\t && ( data_handle->segment_data_size != data_handle->compression_unit_size ) )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid uncompressed segment data size value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\treturn( -1 );\n\t\t\t\t}\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: uncompressed block data:\\n\",\n\t\t\t\t function );\n\t\t\t\tlibcnotify_print_data(\n\t\t\t\t data_handle->segment_data,\n\t\t\t\t data_handle->segment_data_size,\n\t\t\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t\t\t}\n#endif\n\t\t\tdata_handle->current_compressed_block_index = compressed_block_index;\n\t\t}\n\t\tif( data_offset >= data_handle->segment_data_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid data offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tread_size = data_handle->segment_data_size - data_offset;\n\n\t\tif( read_size > segment_data_size )\n\t\t{\n\t\t\tread_size = segment_data_size;\n\t\t}\n\t\tif( memory_copy(\n\t\t     &( segment_data[ segment_data_offset ] ),\n\t\t     &( data_handle->segment_data[ data_offset ] ),\n\t\t     read_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy data.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tdata_offset          = 0;\n\t\tsegment_data_size   -= read_size;\n\t\tsegment_data_offset += read_size;\n\n\t\tcompressed_block_index++;\n\n\t\tdata_handle->current_offset += read_size;\n\n\t\tif( (size64_t) data_handle->current_offset >= data_handle->uncompressed_data_size )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn( (ssize_t) segment_data_offset );\n}\n\n/* Seeks a certain offset of the data\n * Callback for the data stream\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_compressed_data_handle_seek_segment_offset(\n         libfsntfs_compressed_data_handle_t *data_handle,\n         intptr_t *file_io_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n         int segment_index,\n         int segment_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n         off64_t segment_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compressed_data_handle_seek_segment_offset\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( file_io_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( segment_file_index )\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_index != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( segment_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid segment offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tdata_handle->current_offset = segment_offset;\n\n\treturn( segment_offset );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compressed_data_handle.h",
    "content": "/*\n * The compressed data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSED_DATA_HANDLE_H )\n#define _LIBFSNTFS_COMPRESSED_DATA_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_compressed_data_handle libfsntfs_compressed_data_handle_t;\n\nstruct libfsntfs_compressed_data_handle\n{\n\t/* The current offset\n\t */\n\toff64_t current_offset;\n\n\t/* The compressed data steam\n\t */\n\tlibfdata_stream_t *compressed_data_stream;\n\n\t/* The uncompressed data size\n\t */\n\tsize64_t uncompressed_data_size;\n\n\t/* The compression method\n\t */\n\tint compression_method;\n\n\t/* The current compressed block index\n\t */\n\tuint32_t current_compressed_block_index;\n\n\t/* The compressed segment data\n\t */\n\tuint8_t *compressed_segment_data;\n\n\t/* The (uncompressed) segment data\n\t */\n\tuint8_t *segment_data;\n\n\t/* The (uncompressed) segment data size\n\t */\n\tsize_t segment_data_size;\n\n\t/* The number of compressed blocks\n\t */\n\tuint64_t number_of_compressed_blocks;\n\n\t/* The compressed block offsets\n\t */\n\tuint64_t *compressed_block_offsets;\n\n\t/* The compression unit size\n\t */\n\tsize_t compression_unit_size;\n};\n\nint libfsntfs_compressed_data_handle_initialize(\n     libfsntfs_compressed_data_handle_t **data_handle,\n     libfdata_stream_t *compressed_data_stream,\n     uint32_t compression_method,\n     size64_t uncompressed_data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_compressed_data_handle_free(\n     libfsntfs_compressed_data_handle_t **data_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_compressed_data_handle_get_compressed_block_offsets(\n     libfsntfs_compressed_data_handle_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nssize_t libfsntfs_compressed_data_handle_read_segment_data(\n         libfsntfs_compressed_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags,\n         uint8_t read_flags,\n         libcerror_error_t **error );\n\noff64_t libfsntfs_compressed_data_handle_seek_segment_offset(\n         libfsntfs_compressed_data_handle_t *data_handle,\n         intptr_t *file_io_handle,\n         int segment_index,\n         int segment_file_index,\n         off64_t segment_offset,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSED_DATA_HANDLE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression.c",
    "content": "/*\n * Compression functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"libfsntfs_compression.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfwnt.h\"\n\n/* Decompresses data using the compression method\n * Returns 1 on success, 0 on failure or -1 on error\n */\nint libfsntfs_decompress_data(\n     const uint8_t *compressed_data,\n     size_t compressed_data_size,\n     int compression_method,\n     uint8_t *uncompressed_data,\n     size_t *uncompressed_data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_decompress_data\";\n\n\tif( compressed_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed data buffer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( uncompressed_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid uncompressed data buffer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( uncompressed_data == compressed_data )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compressed data buffer equals uncompressed data buffer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( uncompressed_data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid uncompressed data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tswitch( compression_method )\n\t{\n\t\tcase LIBFSNTFS_COMPRESSION_METHOD_LZNT1:\n\t\t\tif( libfwnt_lznt1_decompress(\n\t\t\t     compressed_data,\n\t\t\t     compressed_data_size,\n\t\t\t     uncompressed_data,\n\t\t\t     uncompressed_data_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_COMPRESSION,\n\t\t\t\t LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,\n\t\t\t\t \"%s: unable to decompress LZNT1 compressed data.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_COMPRESSION_METHOD_LZX:\n\t\t\tif( libfwnt_lzx_decompress(\n\t\t\t     compressed_data,\n\t\t\t     compressed_data_size,\n\t\t\t     uncompressed_data,\n\t\t\t     uncompressed_data_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_COMPRESSION,\n\t\t\t\t LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,\n\t\t\t\t \"%s: unable to decompress LZX compressed data.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN:\n\t\t\tif( libfwnt_lzxpress_huffman_decompress(\n\t\t\t     compressed_data,\n\t\t\t     compressed_data_size,\n\t\t\t     uncompressed_data,\n\t\t\t     uncompressed_data_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_COMPRESSION,\n\t\t\t\t LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,\n\t\t\t\t \"%s: unable to decompress LZXPRESS Huffman compressed data.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported compression method.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression.h",
    "content": "/*\n * Compression functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSION_H )\n#define _LIBFSNTFS_COMPRESSION_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_decompress_data(\n     const uint8_t *compressed_data,\n     size_t compressed_data_size,\n     int compression_method,\n     uint8_t *uncompressed_data,\n     size_t *uncompressed_data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSION_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression_unit_data_handle.c",
    "content": "/*\n * The compression unit data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_compression_unit_data_handle.h\"\n#include \"libfsntfs_compression_unit_descriptor.h\"\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n/* Creates compression unit data handle\n * Make sure the value data_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_data_handle_initialize(\n     libfsntfs_compression_unit_data_handle_t **data_handle,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_compression_unit_descriptor_t *descriptor = NULL;\n\tlibfsntfs_data_run_t *data_run                      = NULL;\n\tlibfsntfs_mft_attribute_t *safe_mft_attribute       = NULL;\n\tstatic char *function                               = \"libfsntfs_compression_unit_data_handle_initialize\";\n\tsize64_t attribute_data_vcn_size                    = 0;\n\tsize64_t calculated_allocated_data_size             = 0;\n\tsize64_t data_run_size                              = 0;\n\tsize64_t data_segment_size                          = 0;\n\tsize64_t remaining_compression_unit_size            = 0;\n\tsize64_t stored_allocated_data_size                 = 0;\n\tsize_t compression_unit_size                        = 0;\n\toff64_t attribute_data_vcn_offset                   = 0;\n\toff64_t calculated_attribute_data_vcn_offset        = 0;\n\toff64_t data_offset                                 = 0;\n\toff64_t data_run_offset                             = 0;\n\toff64_t data_segment_offset                         = 0;\n\tuint16_t data_flags                                 = 0;\n\tint attribute_index                                 = 0;\n\tint data_run_index                                  = 0;\n\tint descriptor_index                                = 0;\n\tint entry_index                                     = 0;\n\tint number_of_data_runs                             = 0;\n\tint total_data_run_index                            = 0;\n\tint total_number_of_data_runs                       = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tchar *data_segment_type                             = NULL;\n#endif\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     mft_attribute,\n\t     &data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported uncompressed attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_allocated_data_size(\n\t     mft_attribute,\n\t     &stored_allocated_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute allocated data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_compression_unit_size(\n\t     mft_attribute,\n\t     &compression_unit_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compression unit size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( compression_unit_size == 0 )\n\t || ( compression_unit_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid compression unit size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t*data_handle = memory_allocate_structure(\n\t                libfsntfs_compression_unit_data_handle_t );\n\n\tif( *data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *data_handle,\n\t     0,\n\t     sizeof( libfsntfs_compression_unit_data_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data handle.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *data_handle )->descriptors_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create descriptors array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_mft_attribute = mft_attribute;\n\tattribute_index    = 0;\n\n\twhile( safe_mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_vcn_range(\n\t\t     safe_mft_attribute,\n\t\t     (uint64_t *) &attribute_data_vcn_offset,\n\t\t     (uint64_t *) &attribute_data_vcn_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute data VCN range.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_data_vcn_size != 0xffffffffffffffffULL )\n\t\t{\n\t\t\tif( (uint64_t) attribute_data_vcn_offset > (uint64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_size > (size64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data last VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_offset > (off64_t) attribute_data_vcn_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tattribute_data_vcn_size   += 1;\n\t\t\tattribute_data_vcn_size   -= attribute_data_vcn_offset;\n\t\t\tattribute_data_vcn_offset *= io_handle->cluster_block_size;\n\t\t\tattribute_data_vcn_size   *= io_handle->cluster_block_size;\n\n\t\t\tif( ( calculated_attribute_data_vcn_offset != 0 )\n\t\t\t && ( calculated_attribute_data_vcn_offset != attribute_data_vcn_offset ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data VCN offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_attribute_data_vcn_offset = attribute_data_vcn_offset + (off64_t) attribute_data_vcn_size;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     safe_mft_attribute,\n\t\t     &number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of data runs.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\ttotal_number_of_data_runs += number_of_data_runs;\n\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     safe_mft_attribute,\n\t\t     &safe_mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tattribute_index++;\n\t}\n\tsafe_mft_attribute = mft_attribute;\n\tattribute_index    = 0;\n\n\twhile( safe_mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     safe_mft_attribute,\n\t\t     &number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of data runs.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( data_run_index = 0;\n\t\t     data_run_index < number_of_data_runs;\n\t\t     data_run_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t     safe_mft_attribute,\n\t\t\t     data_run_index,\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tdata_run_offset = data_run->start_offset;\n\t\t\tdata_run_size   = data_run->size;\n\n\t\t\tcalculated_allocated_data_size += data_run->size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t\t\t{\n\t\t\t\t\tdata_segment_type = \"sparse \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdata_segment_type = \"\";\n\t\t\t\t}\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: %sdata run: %d offset: 0x%08\" PRIx64 \", size: %\" PRIu64 \".\\n\",\n\t\t\t\t function,\n\t\t\t\t data_segment_type,\n\t\t\t\t data_run_index,\n\t\t\t\t data_run_offset,\n\t\t\t\t data_run_size );\n\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"\\n\" );\n\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\twhile( data_run_size > 0 )\n\t\t\t{\n\t\t\t\tif( descriptor == NULL )\n\t\t\t\t{\n\t\t\t\t\tif( libfsntfs_compression_unit_descriptor_initialize(\n\t\t\t\t\t     &descriptor,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t\t \"%s: unable to create compression unit descriptor.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tdescriptor->data_run_offset = data_run_offset;\n\t\t\t\t\tdescriptor->data_offset     = data_offset;\n\n\t\t\t\t\tdata_segment_offset = 0;\n\n\t\t\t\t\tif( data_run_size <= compression_unit_size )\n\t\t\t\t\t{\n\t\t\t\t\t\tdescriptor->compression_unit_size = compression_unit_size;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdescriptor->compression_unit_size = ( data_run_size / compression_unit_size ) * compression_unit_size;\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t\t \"%s: uncompressed data run size: %\" PRIu64 \"\\n\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t descriptor->compression_unit_size );\n\t\t\t\t\t\t}\n#endif\n\t\t\t\t\t}\n\t\t\t\t\tremaining_compression_unit_size = descriptor->compression_unit_size;\n\t\t\t\t}\n\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) == 0 )\n\t\t\t\t{\n\t\t\t\t\tdescriptor->data_range_flags = data_run->range_flags;\n\t\t\t\t}\n\t\t\t\t/* Sparse data runs mark the end of a compression unit and they\n\t\t\t\t * should be at minimum the size of the remaining data in the compression unit\n\t\t\t\t */\n\t\t\t\telse if( remaining_compression_unit_size < compression_unit_size )\n\t\t\t\t{\n\t\t\t\t\tif( ( total_data_run_index == ( total_number_of_data_runs - 1 ) )\n\t\t\t\t\t && ( data_run_size < (size64_t) remaining_compression_unit_size ) )\n\t\t\t\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t\t \"%s: last sparse data run: %d size does not align with compression unit size.\\n\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t data_run_index );\n\t\t\t\t\t\t}\n#endif\n\t\t\t\t\t\tremaining_compression_unit_size = 0;\n\t\t\t\t\t}\n\t\t\t\t\tdescriptor->data_range_flags = LIBFDATA_RANGE_FLAG_IS_COMPRESSED;\n\t\t\t\t}\n\t\t\t\tif( data_run_size < remaining_compression_unit_size )\n\t\t\t\t{\n\t\t\t\t\tdata_segment_size = data_run_size;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdata_segment_size = remaining_compression_unit_size;\n\t\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t{\n\t\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tdata_segment_type = \"sparse \";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdata_segment_type = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t \"%s: compression unit: %d %sdata segment offset: 0x%08\" PRIx64 \", size: %\" PRIu64 \".\\n\",\n\t\t\t\t\t function,\n\t\t\t\t\t descriptor_index,\n\t\t\t\t\t data_segment_type,\n\t\t\t\t\t data_segment_offset,\n\t\t\t\t\t data_segment_size );\n\t\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\t\tif( libfsntfs_compression_unit_descriptor_append_data_segment(\n\t\t\t\t     descriptor,\n\t\t\t\t     data_run_offset,\n\t\t\t\t     data_segment_size,\n\t\t\t\t     data_run->range_flags,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t \"%s: unable to append data segment to compressed block descriptor: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t descriptor_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) == 0 )\n\t\t\t\t{\n\t\t\t\t\tdata_run_offset += data_segment_size;\n\t\t\t\t}\n\t\t\t\tdata_segment_offset             += data_segment_size;\n\t\t\t\tdata_run_size                   -= data_segment_size;\n\t\t\t\tremaining_compression_unit_size -= data_segment_size;\n\n\t\t\t\tif( remaining_compression_unit_size == 0 )\n\t\t\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( libfsntfs_compression_unit_descriptor_print(\n\t\t\t\t\t\t     descriptor,\n\t\t\t\t\t\t     io_handle,\n\t\t\t\t\t\t     descriptor_index,\n\t\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to print the compressed block descriptor: %d.\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t descriptor_index );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\t\t\tif( libcdata_array_append_entry(\n\t\t\t\t\t     ( *data_handle )->descriptors_array,\n\t\t\t\t\t     &entry_index,\n\t\t\t\t\t     (intptr_t *) descriptor,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t\t \"%s: unable to append compressed block descriptor: %d to array.\",\n\t\t\t\t\t\t function,\n\t\t\t\t\t\t descriptor_index );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tdata_offset += descriptor->compression_unit_size;\n\n\t\t\t\t\tdescriptor = NULL;\n\n\t\t\t\t\tdescriptor_index++;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotal_data_run_index++;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     safe_mft_attribute,\n\t\t     &safe_mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tattribute_index++;\n\t}\n\tif( calculated_allocated_data_size != stored_allocated_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size of data runs: %\" PRIu64 \" does not match allocated data size: %\" PRIu64 \".\",\n\t\t function,\n\t\t calculated_allocated_data_size,\n\t\t stored_allocated_data_size );\n\n\t\tgoto on_error;\n\t}\n\tif( remaining_compression_unit_size != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid remaining compression unit size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *data_handle )->compression_unit_size = compression_unit_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( descriptor != NULL )\n\t{\n\t\tlibfsntfs_compression_unit_descriptor_free(\n\t\t &descriptor,\n\t\t NULL );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tif( ( *data_handle )->descriptors_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( ( *data_handle )->descriptors_array ),\n\t\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compression_unit_descriptor_free,\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a data handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_data_handle_free(\n     libfsntfs_compression_unit_data_handle_t **data_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_data_handle_free\";\n\tint result            = 1;\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_handle != NULL )\n\t{\n\t\tif( libcdata_array_free(\n\t\t     &( ( *data_handle )->descriptors_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_compression_unit_descriptor_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free descriptors array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *data_handle );\n\n\t\t*data_handle = NULL;\n\t}\n\treturn( result );\n}\n\n/* Retrieves the number of descriptors\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_data_handle_get_number_of_descriptors(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     int *number_of_descriptors,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_data_handle_get_number_of_descriptors\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     data_handle->descriptors_array,\n\t     number_of_descriptors,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from descriptors array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific descriptor\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_data_handle_get_descriptor_by_index(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     int descriptor_index,\n     libfsntfs_compression_unit_descriptor_t **descriptor,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_data_handle_get_descriptor_by_index\";\n\n\tif( data_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     data_handle->descriptors_array,\n\t     descriptor_index,\n\t     (intptr_t **) descriptor,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from descriptors array.\",\n\t\t function,\n\t\t descriptor_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression_unit_data_handle.h",
    "content": "/*\n * The compression unit data handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSION_UNIT_DATA_HANDLE_H )\n#define _LIBFSNTFS_COMPRESSION_UNIT_DATA_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_compression_unit_descriptor.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_compression_unit_data_handle libfsntfs_compression_unit_data_handle_t;\n\nstruct libfsntfs_compression_unit_data_handle\n{\n\t/* The compression unit descriptors array\n\t */\n\tlibcdata_array_t *descriptors_array;\n\n\t/* The compression unit size\n\t */\n\tsize_t compression_unit_size;\n};\n\nint libfsntfs_compression_unit_data_handle_initialize(\n     libfsntfs_compression_unit_data_handle_t **data_handle,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_compression_unit_data_handle_free(\n     libfsntfs_compression_unit_data_handle_t **data_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_compression_unit_data_handle_get_number_of_descriptors(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     int *number_of_descriptors,\n     libcerror_error_t **error );\n\nint libfsntfs_compression_unit_data_handle_get_descriptor_by_index(\n     libfsntfs_compression_unit_data_handle_t *data_handle,\n     int descriptor_index,\n     libfsntfs_compression_unit_descriptor_t **descriptor,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSION_UNIT_DATA_HANDLE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression_unit_descriptor.c",
    "content": "/*\n * Compression unit descriptor functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block_data.h\"\n#include \"libfsntfs_compression_unit_descriptor.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdata.h\"\n\n/* Creates a compression unit descriptor\n * Make sure the value compression_unit_descriptor is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_descriptor_initialize(\n     libfsntfs_compression_unit_descriptor_t **compression_unit_descriptor,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_descriptor_initialize\";\n\n\tif( compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compression unit descriptor.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *compression_unit_descriptor != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid compression unit descriptor value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*compression_unit_descriptor = memory_allocate_structure(\n\t                                libfsntfs_compression_unit_descriptor_t );\n\n\tif( *compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create compression unit descriptor.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *compression_unit_descriptor,\n\t     0,\n\t     sizeof( libfsntfs_compression_unit_descriptor_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear compression unit descriptor.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *compression_unit_descriptor );\n\n\t\t*compression_unit_descriptor = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_stream_initialize(\n\t     &( ( *compression_unit_descriptor )->data_stream ),\n\t     NULL,\n\t     NULL,\n\t     NULL,\n\t     NULL,\n\t     (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_cluster_block_data_read_segment_data,\n\t     NULL,\n\t     (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libfsntfs_cluster_block_data_seek_segment_offset,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *compression_unit_descriptor != NULL )\n\t{\n\t\tmemory_free(\n\t\t *compression_unit_descriptor );\n\n\t\t*compression_unit_descriptor = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a compression unit descriptor\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_descriptor_free(\n     libfsntfs_compression_unit_descriptor_t **compression_unit_descriptor,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_descriptor_free\";\n\tint result            = 1;\n\n\tif( compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compression unit descriptor.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *compression_unit_descriptor != NULL )\n\t{\n\t\tif( libfdata_stream_free(\n\t\t     &( ( *compression_unit_descriptor )->data_stream ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free data stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *compression_unit_descriptor );\n\n\t\t*compression_unit_descriptor = NULL;\n\t}\n\treturn( result );\n}\n\n/* Appends a data segment\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_descriptor_append_data_segment(\n     libfsntfs_compression_unit_descriptor_t *compression_unit_descriptor,\n     off64_t segment_offset,\n     size64_t segment_size,\n     uint32_t segment_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_compression_unit_descriptor_append_data_segment\";\n\tint segment_index     = 0;\n\n\tif( compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compression unit descriptor.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_stream_append_segment(\n\t     compression_unit_descriptor->data_stream,\n\t     &segment_index,\n\t     0,\n\t     segment_offset,\n\t     segment_size,\n\t     segment_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t \"%s: unable to append data run to array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tcompression_unit_descriptor->data_size += segment_size;\n\n\treturn( 1 );\n}\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\n/* Debug prints the compression unit descriptor\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_compression_unit_descriptor_print(\n     libfsntfs_compression_unit_descriptor_t *compression_unit_descriptor,\n     libfsntfs_io_handle_t *io_handle,\n     int compression_unit_descriptor_index,\n     libcerror_error_t **error )\n{\n\tchar *compression_unit_data_type = NULL;\n\tstatic char *function            = \"libfsntfs_compression_unit_descriptor_print\";\n\tsize64_t segment_size            = 0;\n\toff64_t segment_offset           = 0;\n\tuint32_t segment_flags           = 0;\n\tint number_of_segments           = 0;\n\tint segment_file_index           = 0;\n\tint segment_index                = 0;\n\n\tif( compression_unit_descriptor == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compression unit descriptor.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( compression_unit_descriptor->data_range_flags & LIBFDATA_RANGE_FLAG_IS_COMPRESSED ) != 0 )\n\t{\n\t\tcompression_unit_data_type = \"compressed\";\n\t}\n\telse if( ( compression_unit_descriptor->data_range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t{\n\t\tcompression_unit_data_type = \"sparse\";\n\t}\n\telse\n\t{\n\t\tcompression_unit_data_type = \"uncompressed\";\n\t}\n\tlibcnotify_printf(\n\t \"%s: %\" PRIu64 \" blocks %s compression unit: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\\n\",\n\t function,\n\t compression_unit_descriptor->data_size / io_handle->cluster_block_size,\n\t compression_unit_data_type,\n\t compression_unit_descriptor_index,\n\t compression_unit_descriptor->data_offset,\n\t compression_unit_descriptor->data_offset );\n\n\tif( libfdata_stream_get_number_of_segments(\n\t     compression_unit_descriptor->data_stream,\n\t     &number_of_segments,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of segments.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( segment_index = 0;\n\t     segment_index < number_of_segments;\n\t     segment_index++ )\n\t{\n\t\tif( libfdata_stream_get_segment_by_index(\n\t\t     compression_unit_descriptor->data_stream,\n\t\t     segment_index,\n\t\t     &segment_file_index,\n\t\t     &segment_offset,\n\t\t     &segment_size,\n\t\t     &segment_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve segment: %d.\",\n\t\t\t function,\n\t\t\t segment_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( ( segment_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: segment: %d sparse of size: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t segment_index,\n\t\t\t segment_size );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: segment: %d at offset: 0x%08\" PRIx64 \" of size: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t segment_index,\n\t\t\t segment_offset,\n\t\t\t segment_size );\n\t\t}\n\t}\n\tlibcnotify_printf(\n\t \"\\n\" );\n\n\treturn( 1 );\n}\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_compression_unit_descriptor.h",
    "content": "/*\n * Compression unit descriptor functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_COMPRESSION_UNIT_DESCRIPTOR_H )\n#define _LIBFSNTFS_COMPRESSION_UNIT_DESCRIPTOR_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_compression_unit_descriptor libfsntfs_compression_unit_descriptor_t;\n\nstruct libfsntfs_compression_unit_descriptor\n{\n\t/* The data run offset\n\t */\n\toff64_t data_run_offset;\n\n\t/* The data offset\n\t */\n\toff64_t data_offset;\n\n\t/* The data size\n\t */\n\tsize64_t data_size;\n\n\t/* The compression unit size\n\t */\n\tsize64_t compression_unit_size;\n\n\t/* The data range flags\n\t */\n\tuint32_t data_range_flags;\n\n\t/* The data stream\n\t */\n\tlibfdata_stream_t *data_stream;\n};\n\nint libfsntfs_compression_unit_descriptor_initialize(\n     libfsntfs_compression_unit_descriptor_t **compression_unit_descriptor,\n     libcerror_error_t **error );\n\nint libfsntfs_compression_unit_descriptor_free(\n     libfsntfs_compression_unit_descriptor_t **compression_unit_descriptor,\n     libcerror_error_t **error );\n\nint libfsntfs_compression_unit_descriptor_append_data_segment(\n     libfsntfs_compression_unit_descriptor_t *compression_unit_descriptor,\n     off64_t segment_offset,\n     size64_t segment_size,\n     uint32_t segment_flags,\n     libcerror_error_t **error );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\nint libfsntfs_compression_unit_descriptor_print(\n     libfsntfs_compression_unit_descriptor_t *compression_unit_descriptor,\n     libfsntfs_io_handle_t *io_handle,\n     int compression_unit_descriptor_index,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_COMPRESSION_UNIT_DESCRIPTOR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_data_run.c",
    "content": "/*\n * Data run functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n/* Creates a data run\n * Make sure the value data_run is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_run_initialize(\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_data_run_initialize\";\n\n\tif( data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data run.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_run != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data run value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*data_run = memory_allocate_structure(\n\t             libfsntfs_data_run_t );\n\n\tif( *data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data run.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *data_run,\n\t     0,\n\t     sizeof( libfsntfs_data_run_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data run.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *data_run );\n\n\t\t*data_run = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *data_run != NULL )\n\t{\n\t\tmemory_free(\n\t\t *data_run );\n\n\t\t*data_run = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a data run\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_run_free(\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_data_run_free\";\n\n\tif( data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data run.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_run != NULL )\n\t{\n\t\tmemory_free(\n\t\t *data_run );\n\n\t\t*data_run = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Clones a data run\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_run_clone(\n     libfsntfs_data_run_t **destination_data_run,\n     libfsntfs_data_run_t *source_data_run,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_data_run_clone\";\n\n\tif( destination_data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data run.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_data_run != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid destination data run value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( source_data_run == NULL )\n\t{\n\t\t*destination_data_run = source_data_run;\n\n\t\treturn( 1 );\n\t}\n\t*destination_data_run = memory_allocate_structure(\n\t                         libfsntfs_data_run_t );\n\n\tif( *destination_data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create destnation data run.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_copy(\n\t     *destination_data_run,\n\t     source_data_run,\n\t     sizeof( libfsntfs_data_run_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to copy source data run to destination.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *destination_data_run != NULL )\n\t{\n\t\tmemory_free(\n\t\t *destination_data_run );\n\n\t\t*destination_data_run = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Reads the data run\n * Returns 1 if successful or -1 on error\n */\nssize_t libfsntfs_data_run_read_data(\n         libfsntfs_data_run_t *data_run,\n         libfsntfs_io_handle_t *io_handle,\n         const uint8_t *data,\n         size_t data_size,\n         uint64_t last_cluster_block_number,\n         libcerror_error_t **error )\n{\n\tstatic char *function               = \"libfsntfs_data_run_read_data\";\n\tsize_t data_offset                  = 0;\n\tsize_t data_run_data_size           = 0;\n\tuint64_t number_of_cluster_blocks   = 0;\n\tint64_t cluster_block_number        = 0;\n\tuint8_t cluster_block_value_size    = 0;\n\tuint8_t number_of_blocks_value_size = 0;\n\tuint8_t value_index                 = 0;\n\tuint8_t value_size_tuple            = 0;\n\n\tif( data_run == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data run.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < 1 )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tvalue_size_tuple   = data[ 0 ];\n\tnumber_of_blocks_value_size = value_size_tuple & 0x0f;\n\tcluster_block_value_size    = ( value_size_tuple >> 4 ) & 0x0f;\n\tdata_run_data_size          = 1 + number_of_blocks_value_size + cluster_block_value_size;\n\n\tif( data_run_data_size > data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: data size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: data run:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_run_data_size,\n\t\t 0 );\n\t}\n#endif\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: value sizes\\t\\t\\t\\t: %\" PRIu8 \", %\" PRIu8 \"\\n\",\n\t\t function,\n\t\t number_of_blocks_value_size,\n\t\t cluster_block_value_size );\n\t}\n#endif\n\t/* A number of cluster blocks value size of zero indicates the end of the data runs.\n\t */\n\tif( number_of_blocks_value_size == 0 )\n\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n%s: end of data runs (number of cluster blocks value size is zero).\\n\\n\",\n\t\t\t function );\n\t\t}\n#endif\n\t\tdata_run->start_offset = 0;\n\t\tdata_run->size         = 0;\n\t\tdata_run->range_flags  = 0;\n\n\t\treturn( 1 );\n\t}\n\tdata_offset = 1;\n\n\t/* Determine the number of cluster blocks value\n\t */\n\tnumber_of_cluster_blocks = 0;\n\n\tfor( value_index = number_of_blocks_value_size;\n\t     value_index > 0;\n\t     value_index-- )\n\t{\n\t\tnumber_of_cluster_blocks <<= 8;\n\t\tnumber_of_cluster_blocks  |= data[ data_offset + value_index - 1 ];\n\t}\n\tdata_offset += number_of_blocks_value_size;\n\n\tif( cluster_block_value_size == 0 )\n\t{\n\t\tdata_run->cluster_block_number = 0;\n\t\tdata_run->start_offset         = 0;\n\t\tdata_run->range_flags          = LIBFDATA_RANGE_FLAG_IS_SPARSE;\n\t}\n\telse\n\t{\n\t\t/* Determine the cluster block number value\n\t\t */\n\t\tif( ( last_cluster_block_number != 0 )\n\t\t && ( ( data[ data_offset + cluster_block_value_size - 1 ] & 0x80 ) != 0 ) )\n\t\t{\n\t\t\tcluster_block_number = -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcluster_block_number = 0;\n\t\t}\n\t\tfor( value_index = cluster_block_value_size;\n\t\t     value_index > 0;\n\t\t     value_index-- )\n\t\t{\n\t\t\tcluster_block_number  = (int64_t) ( (uint64_t) cluster_block_number << 8 );\n\t\t\tcluster_block_number |= data[ data_offset + value_index - 1 ];\n\t\t}\n\t\tdata_offset += cluster_block_value_size;\n\n\t\tdata_run->cluster_block_number = last_cluster_block_number + cluster_block_number;\n\t\tdata_run->start_offset         = (off64_t) ( data_run->cluster_block_number * io_handle->cluster_block_size );\n\t\tdata_run->range_flags          = 0;\n\t}\n\tdata_run->size = (size64_t) ( number_of_cluster_blocks * io_handle->cluster_block_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: number of cluster blocks\\t\\t\\t: %\" PRIu64 \" (size: %\" PRIu64 \")\\n\",\n\t\t function,\n\t\t number_of_cluster_blocks,\n\t\t data_run->size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: cluster block number\\t\\t\\t: %\" PRIu64 \" (%\" PRIi64 \") (offset: 0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t data_run->cluster_block_number,\n\t\t cluster_block_number,\n\t\t data_run->start_offset );\n\n\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\tIs sparse\\n\" );\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( (ssize_t) data_offset );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_data_run.h",
    "content": "/*\n * Data run functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DATA_RUN_H )\n#define _LIBFSNTFS_DATA_RUN_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_data_run libfsntfs_data_run_t;\n\nstruct libfsntfs_data_run\n{\n\t/* The cluster block number\n\t */\n\tuint64_t cluster_block_number;\n\n\t/* The start offset\n\t */\n\toff64_t start_offset;\n\n\t/* The size\n\t */\n\tsize64_t size;\n\n\t/* The range flags\n\t */\n\tuint32_t range_flags;\n};\n\nint libfsntfs_data_run_initialize(\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error );\n\nint libfsntfs_data_run_free(\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error );\n\nint libfsntfs_data_run_clone(\n     libfsntfs_data_run_t **destination_data_run,\n     libfsntfs_data_run_t *source_data_run,\n     libcerror_error_t **error );\n\nssize_t libfsntfs_data_run_read_data(\n         libfsntfs_data_run_t *data_run,\n         libfsntfs_io_handle_t *io_handle,\n         const uint8_t *data,\n         size_t data_size,\n         uint64_t last_cluster_block_number,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_DATA_RUN_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_data_stream.c",
    "content": "/*\n * Data stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_data_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_extent.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_types.h\"\n\n/* Creates a data stream\n * Make sure the value data_stream is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_initialize(\n     libfsntfs_data_stream_t **data_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_initialize\";\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid data stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = memory_allocate_structure(\n\t                        libfsntfs_internal_data_stream_t );\n\n\tif( internal_data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_data_stream,\n\t     0,\n\t     sizeof( libfsntfs_internal_data_stream_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear data stream.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_data_stream );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_data_extents_array(\n\t     data_attribute,\n\t     io_handle,\n\t     &( internal_data_stream->extents_array ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine extents array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_cluster_block_stream_initialize(\n\t     &( internal_data_stream->data_cluster_block_stream ),\n\t     io_handle,\n\t     data_attribute,\n\t     NULL,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create data cluster block stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_data_stream->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_data_stream->file_io_handle = file_io_handle;\n\tinternal_data_stream->data_attribute = data_attribute;\n\n\t*data_stream = (libfsntfs_data_stream_t *) internal_data_stream;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_data_stream != NULL )\n\t{\n\t\tif( internal_data_stream->data_cluster_block_stream != NULL )\n\t\t{\n\t\t\tlibfdata_stream_free(\n\t\t\t &( internal_data_stream->data_cluster_block_stream ),\n\t\t\t NULL );\n\t\t}\n\t\tif( internal_data_stream->extents_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( internal_data_stream->extents_array ),\n\t\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t internal_data_stream );\n\t}\n\treturn( -1 );\n}\n\n/* Frees a data stream\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_free(\n     libfsntfs_data_stream_t **data_stream,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_free\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *data_stream != NULL )\n\t{\n\t\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) *data_stream;\n\t\t*data_stream         = NULL;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( internal_data_stream->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\t/* The file_io_handle and data_attribute references are freed elsewhere\n\t\t */\n\t\tif( libfdata_stream_free(\n\t\t     &( internal_data_stream->data_cluster_block_stream ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free data cluster block stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libcdata_array_free(\n\t\t     &( internal_data_stream->extents_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free extents array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t internal_data_stream );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_utf8_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_utf8_name_size\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf8_name_size(\n\t     internal_data_stream->data_attribute,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 name from data stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_utf8_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_utf8_name\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf8_name(\n\t     internal_data_stream->data_attribute,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name from data stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_utf16_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_utf16_name_size\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf16_name_size(\n\t     internal_data_stream->data_attribute,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 name from data stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_utf16_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_utf16_name\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_attribute_get_utf16_name(\n\t     internal_data_stream->data_attribute,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name from data stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Reads data at the current offset\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_data_stream_read_buffer(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_read_buffer\";\n\tssize_t read_count                                     = 0;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tread_count = libfdata_stream_read_buffer(\n\t              internal_data_stream->data_cluster_block_stream,\n\t              (intptr_t *) internal_data_stream->file_io_handle,\n\t              buffer,\n\t              buffer_size,\n\t              0,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from data cluster block stream.\",\n\t\t function );\n\n\t\tread_count = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( read_count );\n}\n\n/* Reads data at a specific offset\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_data_stream_read_buffer_at_offset(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_read_buffer_at_offset\";\n\tssize_t read_count                                     = 0;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tread_count = libfdata_stream_read_buffer_at_offset(\n\t              internal_data_stream->data_cluster_block_stream,\n\t              (intptr_t *) internal_data_stream->file_io_handle,\n\t              buffer,\n\t              buffer_size,\n\t              offset,\n\t              0,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from data cluster block stream.\",\n\t\t function );\n\n\t\tread_count = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( read_count );\n}\n\n/* Seeks a certain offset\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_data_stream_seek_offset(\n         libfsntfs_data_stream_t *data_stream,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_seek_offset\";\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\toffset = libfdata_stream_seek_offset(\n\t          internal_data_stream->data_cluster_block_stream,\n\t          offset,\n\t          whence,\n\t          error );\n\n\tif( offset == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek offset in data cluster block stream.\",\n\t\t function );\n\n\t\toffset = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( offset );\n}\n\n/* Retrieves the current offset\n * Returns the offset if successful or -1 on error\n */\nint libfsntfs_data_stream_get_offset(\n     libfsntfs_data_stream_t *data_stream,\n     off64_t *offset,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_offset\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfdata_stream_get_offset(\n\t     internal_data_stream->data_cluster_block_stream,\n\t     offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve offset from data cluster block stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_size(\n     libfsntfs_data_stream_t *data_stream,\n     size64_t *size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_size\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfdata_stream_get_size(\n\t     internal_data_stream->data_cluster_block_stream,\n\t     size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size from data cluster block stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the number of extents (decoded data runs)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_number_of_extents(\n     libfsntfs_data_stream_t *data_stream,\n     int *number_of_extents,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_number_of_extents\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libcdata_array_get_number_of_entries(\n\t     internal_data_stream->extents_array,\n\t     number_of_extents,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of extents.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves a specific extent (decoded data run)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_data_stream_get_extent_by_index(\n     libfsntfs_data_stream_t *data_stream,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_extent_t *data_extent                        = NULL;\n\tlibfsntfs_internal_data_stream_t *internal_data_stream = NULL;\n\tstatic char *function                                  = \"libfsntfs_data_stream_get_extent_by_index\";\n\tint result                                             = 1;\n\n\tif( data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_data_stream = (libfsntfs_internal_data_stream_t *) data_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libcdata_array_get_entry_by_index(\n\t     internal_data_stream->extents_array,\n\t     extent_index,\n\t     (intptr_t **) &data_extent,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve extent: %d.\",\n\t\t function,\n\t\t extent_index );\n\n\t\tresult = -1;\n\t}\n\tif( result == 1 )\n\t{\n\t\tif( libfsntfs_extent_get_values(\n\t\t     data_extent,\n\t\t     extent_offset,\n\t\t     extent_size,\n\t\t     extent_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve extent: %d values.\",\n\t\t\t function,\n\t\t\t extent_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_data_stream->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_data_stream.h",
    "content": "/*\n * Data stream functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DATA_STREAM_H )\n#define _LIBFSNTFS_DATA_STREAM_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_data_stream libfsntfs_internal_data_stream_t;\n\nstruct libfsntfs_internal_data_stream\n{\n\t/* The file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* The $DATA attribute\n\t */\n\tlibfsntfs_mft_attribute_t *data_attribute;\n\n\t/* The data extents array\n\t */\n\tlibcdata_array_t *extents_array;\n\n\t/* The $DATA attribute cluster block stream\n\t */\n\tlibfdata_stream_t *data_cluster_block_stream;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nint libfsntfs_data_stream_initialize(\n     libfsntfs_data_stream_t **data_stream,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_free(\n     libfsntfs_data_stream_t **data_stream,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf8_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf8_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf16_name_size(\n     libfsntfs_data_stream_t *data_stream,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_utf16_name(\n     libfsntfs_data_stream_t *data_stream,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_data_stream_read_buffer(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_data_stream_read_buffer_at_offset(\n         libfsntfs_data_stream_t *data_stream,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\noff64_t libfsntfs_data_stream_seek_offset(\n         libfsntfs_data_stream_t *data_stream,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_offset(\n     libfsntfs_data_stream_t *data_stream,\n     off64_t *offset,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_size(\n     libfsntfs_data_stream_t *data_stream,\n     size64_t *size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_number_of_extents(\n     libfsntfs_data_stream_t *data_stream,\n     int *number_of_extents,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_data_stream_get_extent_by_index(\n     libfsntfs_data_stream_t *data_stream,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_DATA_STREAM_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_debug.c",
    "content": "/*\n * Debug functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdatetime.h\"\n#include \"libfsntfs_libfguid.h\"\n#include \"libfsntfs_libuna.h\"\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\n/* Prints the MFT attribute data flags\n */\nvoid libfsntfs_debug_print_mft_attribute_data_flags(\n      uint16_t mft_attribute_data_flags )\n{\n\tif( ( mft_attribute_data_flags & 0x0001 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs compressed\\n\" );\n\t}\n\n\tif( ( mft_attribute_data_flags & 0x4000 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs encrypted\\n\" );\n\t}\n\tif( ( mft_attribute_data_flags & 0x8000 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs sparse\\n\" );\n\t}\n}\n\n/* Prints the MFT entry data flags\n */\nvoid libfsntfs_debug_print_mft_entry_flags(\n      uint16_t mft_entry_flags )\n{\n\tif( ( mft_entry_flags & LIBFSNTFS_MFT_ENTRY_FLAG_IN_USE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIn use (FILE_RECORD_SEGMENT_IN_USE)\\n\" );\n\t}\n\tif( ( mft_entry_flags & LIBFSNTFS_MFT_ENTRY_FLAG_INDEX_PRESENT ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tHas file name index (FILE_FILE_NAME_INDEX_PRESENT)\\n\" );\n\t}\n\tif( ( mft_entry_flags & 0x0004 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tUnknown: 0x0004\\n\" );\n\t}\n\tif( ( mft_entry_flags & 0x0008 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tUnknown: 0x0008\\n\" );\n\t}\n}\n\n/* Prints the file attribute flags\n */\nvoid libfsntfs_debug_print_file_attribute_flags(\n      uint32_t file_attribute_flags )\n{\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs read-only (FILE_ATTRIBUTE_READ_ONLY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs hidden (FILE_ATTRIBUTE_HIDDEN)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs system (FILE_ATTRIBUTE_SYSTEM)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs directory (FILE_ATTRIBUTE_DIRECTORY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs device (FILE_ATTRIBUTE_DEVICE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs normal (FILE_ATTRIBUTE_NORMAL)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs temporary (FILE_ATTRIBUTE_TEMPORARY)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs a sparse file (FILE_ATTRIBUTE_SPARSE_FILE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs a reparse point or symbolic link (FILE_ATTRIBUTE_FLAG_REPARSE_POINT)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs compressed (FILE_ATTRIBUTE_COMPRESSED)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs offline (FILE_ATTRIBUTE_OFFLINE)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\\n\" );\n\t}\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs encrypted (FILE_ATTRIBUTE_ENCRYPTED)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & LIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs virtual (FILE_ATTRIBUTE_VIRTUAL)\\n\" );\n\t}\n\n\tif( ( file_attribute_flags & 0x10000000UL ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tUnknown (0x10000000)\\n\" );\n\t}\n\tif( ( file_attribute_flags & 0x20000000UL ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs index view (0x20000000)\\n\" );\n\t}\n}\n\n/* Prints the index node flags\n */\nvoid libfsntfs_debug_print_index_node_flags(\n      uint32_t index_node_flags )\n{\n\tif( ( index_node_flags & 0x00000001UL ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs branch node\\n\" );\n\t}\n}\n\n/* Prints the index value flags\n */\nvoid libfsntfs_debug_print_index_value_flags(\n      uint32_t index_value_flags )\n{\n\tif( ( index_value_flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs branch node\\n\" );\n\t}\n\tif( ( index_value_flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs last\\n\" );\n\t}\n}\n\n/* Prints the reparse point type and flags\n */\nvoid libfsntfs_debug_print_reparse_point_tag(\n      uint32_t tag )\n{\n\tif( tag == 0x00000000 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tReserved (IO_REPARSE_TAG_RESERVED_ZERO)\\n\" );\n\t}\n\tif( tag == 0x00000001 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tReserved (IO_REPARSE_TAG_RESERVED_ONE)\\n\" );\n\t}\n\n\tif( tag == 0x80000005 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tHome server drive extender (IO_REPARSE_TAG_DRIVER_EXTENDER)\\n\" );\n\t}\n\tif( tag == 0x80000006 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tHierarchical Storage Manager (IO_REPARSE_TAG_HSM2)\\n\" );\n\t}\n\tif( tag == 0x80000007 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tSingle-instance storage (SIS) (IO_REPARSE_TAG_SIS)\\n\" );\n\t}\n\n\tif( tag == 0x8000000a )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tDistributed File System (DFS) (IO_REPARSE_TAG_DFS)\\n\" );\n\t}\n\tif( tag == 0x8000000b )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tFilter manager test harness (IO_REPARSE_TAG_FILTER_MANAGER)\\n\" );\n\t}\n\n\tif( tag == 0x80000012 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tDistributed File System (DFS) (IO_REPARSE_TAG_DFSR)\\n\" );\n\t}\n\n\tif( tag == 0xa0000003 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tMount point (IO_REPARSE_TAG_MOUNT_POINT)\\n\" );\n\t}\n\n\tif( tag == 0xa000000c )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tSymbolic link (IO_REPARSE_TAG_SYMLINK)\\n\" );\n\t}\n\n\tif( tag == 0xc0000004 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tHierarchical Storage Manager (IO_REPARSE_TAG_HSM)\\n\" );\n\t}\n}\n\n/* Prints the volume information flags\n */\nvoid libfsntfs_debug_print_volume_information_flags(\n      uint16_t volume_information_flags )\n{\n\tif( ( volume_information_flags & 0x0001 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\tIs dirty (VOLUME_IS_DIRTY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0002 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_RESIZE_LOG_FILE)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0004 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_UPGRADE_ON_MOUNT)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0008 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_MOUNTED_ON_NT4)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0010 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_DELETE_USN_UNDERWAY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x0020 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_REPAIR_OBJECT_ID)\\n\" );\n\t}\n\n\tif( ( volume_information_flags & 0x4000 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_CHKDSK_UNDERWAY)\\n\" );\n\t}\n\tif( ( volume_information_flags & 0x8000 ) != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\t(VOLUME_MODIFIED_BY_CHKDSK)\\n\" );\n\t}\n}\n\n/* Prints the attribute type\n */\nconst char *libfsntfs_debug_print_attribute_type(\n             uint32_t attribute_type )\n{\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_UNUSED:\n\t\t\treturn( \"Unused\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n\t\t\treturn( \"$STANDARD_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST:\n\t\t\treturn( \"$ATTRIBUTE_LIST\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\treturn( \"$FILE_NAME\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER:\n\t\t\treturn( \"$OBJECT_ID\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\treturn( \"$SECURITY_DESCRIPTOR\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\treturn( \"$VOLUME_NAME\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\treturn( \"$VOLUME_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_DATA:\n\t\t\treturn( \"$DATA\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\t\treturn( \"$INDEX_ROOT\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION:\n\t\t\treturn( \"$INDEX_ALLOCATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\t\treturn( \"$BITMAP\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\treturn( \"$REPARSE_POINT\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION:\n\t\t\treturn( \"$EA_INFORMATION\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED:\n\t\t\treturn( \"$EA\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET:\n\t\t\treturn( \"$PROPERTY_SET\" );\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM:\n\t\t\treturn( \"$LOGGED_UTILITY_STREAM\" );\n\t}\n\treturn( \"Unknown\" );\n}\n\n/* Prints the collation type\n */\nconst char *libfsntfs_debug_print_collation_type(\n             uint32_t collation_type )\n{\n\tswitch( collation_type )\n\t{\n\t\tcase 0x00000000UL:\n\t\t\treturn( \"COLLATION_BINARY\" );\n\n\t\tcase 0x00000001UL:\n\t\t\treturn( \"COLLATION_FILENAME\" );\n\n\t\tcase 0x00000002UL:\n\t\t\treturn( \"COLLATION_UNICODE_STRING\" );\n\n\t\tcase 0x00000010UL:\n\t\t\treturn( \"COLLATION_NTOFS_ULONG\" );\n\n\t\tcase 0x00000011UL:\n\t\t\treturn( \"COLLATION_NTOFS_SID\" );\n\n\t\tcase 0x00000012UL:\n\t\t\treturn( \"COLLATION_NTOFS_SECURITY_HASH\" );\n\n\t\tcase 0x00000013UL:\n\t\t\treturn( \"COLLATION_NTOFS_ULONGS\" );\n\t}\n\treturn( \"Unknown\" );\n}\n\n/* Prints the compression method\n */\nconst char *libfsntfs_debug_print_compression_method(\n             uint32_t compression_method )\n{\n\tswitch( compression_method )\n\t{\n\t\tcase 0:\n\t\t\treturn( \"XPRESS4K\" );\n\n\t\tcase 1:\n\t\t\treturn( \"LZX\" );\n\n\t\tcase 2:\n\t\t\treturn( \"XPRESS8K\" );\n\n\t\tcase 3:\n\t\t\treturn( \"XPRESS16K\" );\n\t}\n\treturn( \"Unknown\" );\n}\n\n/* Prints the file name attribute name space\n */\nconst char *libfsntfs_debug_print_file_name_attribute_name_space(\n             uint8_t name_space )\n{\n\tswitch( name_space )\n\t{\n\t\tcase LIBFSNTFS_FILE_NAME_SPACE_POSIX:\n\t\t\treturn( \"POSIX\" );\n\n\t\tcase LIBFSNTFS_FILE_NAME_SPACE_WINDOWS:\n\t\t\treturn( \"Windows\" );\n\n\t\tcase LIBFSNTFS_FILE_NAME_SPACE_DOS:\n\t\t\treturn( \"DOS\" );\n\n\t\tcase LIBFSNTFS_FILE_NAME_SPACE_DOS_WINDOWS:\n\t\t\treturn( \"DOS and Windows\" );\n\t}\n\treturn( \"UNKNOWN\" );\n}\n\n/* Prints a FILETIME value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_debug_print_filetime_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     uint32_t string_format_flags,\n     libcerror_error_t **error )\n{\n\tchar date_time_string[ 32 ];\n\n\tlibfdatetime_filetime_t *filetime = NULL;\n\tstatic char *function             = \"libfsntfs_debug_print_filetime_value\";\n\n\tif( libfdatetime_filetime_initialize(\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create filetime.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdatetime_filetime_copy_from_byte_stream(\n\t     filetime,\n\t     byte_stream,\n\t     byte_stream_size,\n\t     byte_order,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy byte stream to filetime.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdatetime_filetime_copy_to_utf8_string(\n\t     filetime,\n\t     (uint8_t *) date_time_string,\n\t     32,\n\t     string_format_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy filetime to string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tlibcnotify_printf(\n\t \"%s: %s: %s UTC\\n\",\n\t function_name,\n\t value_name,\n\t date_time_string );\n\n\tif( libfdatetime_filetime_free(\n\t     &filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free filetime.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( filetime != NULL )\n\t{\n\t\tlibfdatetime_filetime_free(\n\t\t &filetime,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints a GUID/UUID value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_debug_print_guid_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     uint32_t string_format_flags,\n     libcerror_error_t **error )\n{\n\tsystem_character_t guid_string[ 48 ];\n\n\tlibfguid_identifier_t *guid = NULL;\n\tstatic char *function       = \"libfsntfs_debug_print_guid_value\";\n\n\tif( libfguid_identifier_initialize(\n\t     &guid,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_copy_from_byte_stream(\n\t     guid,\n\t     byte_stream,\n\t     byte_stream_size,\n\t     byte_order,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_copy_to_utf8_string(\n\t     guid,\n\t     (uint8_t *) guid_string,\n\t     48,\n\t     string_format_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy GUID to string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tlibcnotify_printf(\n\t \"%s: %s: %s\\n\",\n\t function_name,\n\t value_name,\n\t guid_string );\n\n\tif( libfguid_identifier_free(\n\t     &guid,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free GUID.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( guid != NULL )\n\t{\n\t\tlibfguid_identifier_free(\n\t\t &guid,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Prints an UTF-16 string value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_debug_print_utf16_string_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     libcerror_error_t **error )\n{\n\tsystem_character_t *string = NULL;\n\tstatic char *function      = \"libfsntfs_debug_print_utf16_string_value\";\n\tsize_t string_size         = 0;\n\tint result                 = 0;\n\n\tif( ( byte_stream == NULL )\n\t || ( byte_stream_size == 0 ) )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: %s:\\n\",\n\t\t function_name,\n\t\t value_name );\n\n\t\treturn( 1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libuna_utf16_string_size_from_utf16_stream(\n\t          byte_stream,\n\t          byte_stream_size,\n\t          byte_order,\n\t          &string_size,\n\t          error );\n#else\n\tresult = libuna_utf8_string_size_from_utf16_stream(\n\t          byte_stream,\n\t          byte_stream_size,\n\t          byte_order,\n\t          &string_size,\n\t          error );\n#endif\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine size of string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( string_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid string size value exceeds maximum.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tlibcnotify_printf(\n\t \"%s: %s:\",\n\t function_name,\n\t value_name );\n\n\tif( string_size > 0 )\n\t{\n\t\tstring = system_string_allocate(\n\t\t          string_size );\n\n\t\tif( string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libuna_utf16_string_copy_from_utf16_stream(\n\t\t          (libuna_utf16_character_t *) string,\n\t\t          string_size,\n\t\t          byte_stream,\n\t\t          byte_stream_size,\n\t\t          byte_order,\n\t\t          error );\n#else\n\t\tresult = libuna_utf8_string_copy_from_utf16_stream(\n\t\t          (libuna_utf8_character_t *) string,\n\t\t          string_size,\n\t\t          byte_stream,\n\t\t          byte_stream_size,\n\t\t          byte_order,\n\t\t          error );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \" %s\",\n\t\t string );\n\n\t\tmemory_free(\n\t\t string );\n\t}\n\tlibcnotify_printf(\n\t \"\\n\" );\n\n\treturn( 1 );\n\non_error:\n\tif( string != NULL )\n\t{\n\t\tmemory_free(\n\t\t string );\n\t}\n\treturn( -1 );\n}\n\n/* Prints the read offsets\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_debug_print_read_offsets(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_debug_print_read_offsets\";\n\tsize64_t size         = 0;\n\toff64_t offset        = 0;\n\tint number_of_offsets = 0;\n\tint offset_iterator   = 0;\n\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_handle_get_number_of_offsets_read(\n\t     file_io_handle,\n\t     &number_of_offsets,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of offsets read.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tlibcnotify_printf(\n\t \"Offsets read:\\n\" );\n\n\tfor( offset_iterator = 0;\n\t     offset_iterator < number_of_offsets;\n\t     offset_iterator++ )\n\t{\n\t\tif( libbfio_handle_get_offset_read(\n\t\t     file_io_handle,\n\t\t     offset_iterator,\n\t\t     &offset,\n\t\t     &size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve offset: %d.\",\n\t\t\t function,\n\t\t\t ( offset_iterator + 1 ) );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \"%08\" PRIi64 \" ( 0x%08\" PRIx64 \" ) - %08\" PRIi64 \" ( 0x%08\" PRIx64 \" ) size: %\" PRIu64 \"\\n\",\n\t\t offset,\n\t\t offset,\n\t\t offset + (off64_t) size,\n\t\t offset + (off64_t) size,\n\t\t size );\n\t}\n\tlibcnotify_printf(\n\t \"\\n\" );\n\n\treturn( 1 );\n}\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_debug.h",
    "content": "/*\n * Debug functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DEBUG_H )\n#define _LIBFSNTFS_DEBUG_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\nvoid libfsntfs_debug_print_mft_attribute_data_flags(\n      uint16_t mft_attribute_data_flags );\n\nvoid libfsntfs_debug_print_mft_entry_flags(\n      uint16_t mft_entry_flags );\n\nvoid libfsntfs_debug_print_file_attribute_flags(\n      uint32_t file_attribute_flags );\n\nvoid libfsntfs_debug_print_index_node_flags(\n      uint32_t index_node_flags );\n\nvoid libfsntfs_debug_print_index_value_flags(\n      uint32_t index_value_flags );\n\nvoid libfsntfs_debug_print_reparse_point_tag(\n      uint32_t tag );\n\nvoid libfsntfs_debug_print_volume_information_flags(\n      uint16_t volume_information_flags );\n\nconst char *libfsntfs_debug_print_attribute_type(\n             uint32_t attribute_type );\n\nconst char *libfsntfs_debug_print_file_name_attribute_name_space(\n             uint8_t name_space );\n\nconst char *libfsntfs_debug_print_attribute_type(\n             uint32_t attribute_type );\n\nconst char *libfsntfs_debug_print_collation_type(\n             uint32_t collation_type );\n\nconst char *libfsntfs_debug_print_compression_method(\n             uint32_t compression_method );\n\nint libfsntfs_debug_print_filetime_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     uint32_t string_format_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_debug_print_guid_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     uint32_t string_format_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_debug_print_utf16_string_value(\n     const char *function_name,\n     const char *value_name,\n     const uint8_t *byte_stream,\n     size_t byte_stream_size,\n     int byte_order,\n     libcerror_error_t **error );\n\nint libfsntfs_debug_print_read_offsets(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_DEBUG_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_definitions.h.in",
    "content": "/*\n * The internal definitions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INTERNAL_DEFINITIONS_H )\n#define _LIBFSNTFS_INTERNAL_DEFINITIONS_H\n\n#include <common.h>\n#include <byte_stream.h>\n\n#include \"libfsntfs_libfdata.h\"\n\n#define LIBFSNTFS_ENDIAN_BIG\t\t\t\t\t\t_BYTE_STREAM_ENDIAN_BIG\n#define LIBFSNTFS_ENDIAN_LITTLE\t\t\t\t\t\t_BYTE_STREAM_ENDIAN_LITTLE\n\n/* Define HAVE_LOCAL_LIBFSNTFS for local use of libfsntfs\n */\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n#include <libfsntfs/definitions.h>\n\n/* The definitions in <libfsntfs/definitions.h> are copied here\n * for local use of libfsntfs\n */\n#else\n#define LIBFSNTFS_VERSION\t\t\t\t\t\t@VERSION@\n\n/* The version string\n */\n#define LIBFSNTFS_VERSION_STRING\t\t\t\t\t\"@VERSION@\"\n\n/* The file access\n * bit 1        set to 1 for read access\n * bit 2        set to 1 for write access\n * bit 3-8      not used\n */\nenum LIBFSNTFS_ACCESS_FLAGS\n{\n\tLIBFSNTFS_ACCESS_FLAG_READ\t\t\t\t\t= 0x01,\n/* Reserved: not supported yet */\n\tLIBFSNTFS_ACCESS_FLAG_WRITE\t\t\t\t\t= 0x02\n};\n\n/* The file access macros\n */\n#define LIBFSNTFS_OPEN_READ\t\t\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_READ )\n/* Reserved: not supported yet */\n#define LIBFSNTFS_OPEN_WRITE\t\t\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_WRITE )\n/* Reserved: not supported yet */\n#define LIBFSNTFS_OPEN_READ_WRITE\t\t\t\t\t( LIBFSNTFS_ACCESS_FLAG_READ | LIBFSNTFS_ACCESS_FLAG_WRITE )\n\n/* The path segment separator\n */\n#define LIBFSNTFS_SEPARATOR\t\t\t\t\t\t'\\\\'\n\n/* The file attribute flags\n */\nenum LIBFSNTFS_FILE_ATTRIBUTE_FLAGS\n{\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY\t\t\t\t= 0x00000001UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN\t\t\t\t= 0x00000002UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM\t\t\t\t= 0x00000004UL,\n\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY\t\t\t\t= 0x00000010UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE\t\t\t\t= 0x00000020UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE\t\t\t\t= 0x00000040UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL\t\t\t\t= 0x00000080UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY\t\t\t\t= 0x00000100UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE\t\t\t= 0x00000200UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT\t\t\t= 0x00000400UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED\t\t\t= 0x00000800UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE\t\t\t\t= 0x00001000UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED\t\t= 0x00002000UL,\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED\t\t\t\t= 0x00004000UL,\n\n\tLIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL\t\t\t\t= 0x00010000UL\n};\n\n/* The attribute types\n */\nenum LIBFSNTFS_ATTRIBUTE_TYPES\n{\n\tLIBFSNTFS_ATTRIBUTE_TYPE_UNUSED\t\t\t\t\t= 0x00000000UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION\t\t\t= 0x00000010UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST\t\t\t\t= 0x00000020UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME\t\t\t\t= 0x00000030UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER\t\t\t= 0x00000040UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR\t\t\t= 0x00000050UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME\t\t\t\t= 0x00000060UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION\t\t\t= 0x00000070UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_DATA\t\t\t\t\t= 0x00000080UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT\t\t\t\t= 0x00000090UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION\t\t\t= 0x000000a0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_BITMAP\t\t\t\t\t= 0x000000b0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT\t\t\t\t= 0x000000c0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION\t\t\t= 0x000000d0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED\t\t\t\t= 0x000000e0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET\t\t\t\t= 0x000000f0UL,\n\tLIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM\t\t\t= 0x00000100UL,\n\n\tLIBFSNTFS_ATTRIBUTE_TYPE_END_OF_ATTRIBUTES\t\t\t= 0xffffffffUL\n};\n\n/* The extent flag definitions\n */\nenum LIBFSNTFS_EXTENT_FLAGS\n{\n\t/* The extent is sparse\n\t */\n\tLIBFSNTFS_EXTENT_FLAG_IS_SPARSE\t\t\t\t\t= 0x00000001UL,\n\n\t/* The extent is compressed\n\t */\n\tLIBFSNTFS_EXTENT_FLAG_IS_COMPRESSED\t\t\t\t= 0x00000002UL\n};\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n/* The attribute flags\n */\nenum LIBFSNTFS_ATTRIBUTE_FLAGS\n{\n\tLIBFSNTFS_ATTRIBUTE_FLAG_SPARSE\t\t\t\t\t= 0x8000\n};\n\n#define LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK\t\t\t0x00ff\n\n/* The MFT entry flags\n */\nenum LIBFSNTFS_MFT_ENTRY_FLAGS\n{\n\tLIBFSNTFS_MFT_ENTRY_FLAG_IN_USE\t\t\t\t\t= 0x0001,\n\tLIBFSNTFS_MFT_ENTRY_FLAG_INDEX_PRESENT\t\t\t\t= 0x0002,\n};\n\n/* The predefined MFT entry index values\n */\nenum LIBFSNTFS_MFT_ENTRY_INDEXES\n{\n\tLIBFSNTFS_MFT_ENTRY_INDEX_MFT\t\t\t\t\t= 0,\n\tLIBFSNTFS_MFT_ENTRY_INDEX_MFT_MIRROR\t\t\t\t= 1,\n\n\tLIBFSNTFS_MFT_ENTRY_INDEX_VOLUME\t\t\t\t= 3,\n\n\tLIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY\t\t\t= 5,\n\tLIBFSNTFS_MFT_ENTRY_INDEX_BITMAP\t\t\t\t= 6,\n\n\tLIBFSNTFS_MFT_ENTRY_INDEX_SECURE\t\t\t\t= 9,\n\n\tLIBFSNTFS_MFT_ENTRY_INDEX_UPPERCASE\t\t\t\t= 10,\n};\n\n/* The index node flags\n */\nenum LIBFSNTFS_INDEX_NODE_FLAGS\n{\n\tLIBFSNTFS_INDEX_NODE_FLAG_HAS_ALLOCATION_ATTRIBUTE\t\t= 0x00000001UL,\n};\n\n/* The index value flags\n */\nenum LIBFSNTFS_INDEX_VALUE_FLAGS\n{\n\tLIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE\t\t\t= 0x00000001UL,\n\tLIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST\t\t\t\t= 0x00000002UL\n};\n\n/* The file name attribute (name string) name space values\n */\nenum LIBFSNTFS_FILE_NAME_SPACES\n{\n\tLIBFSNTFS_FILE_NAME_SPACE_POSIX\t\t\t\t\t= 0x00,\n\tLIBFSNTFS_FILE_NAME_SPACE_WINDOWS\t\t\t\t= 0x01,\n\tLIBFSNTFS_FILE_NAME_SPACE_DOS\t\t\t\t\t= 0x02,\n\tLIBFSNTFS_FILE_NAME_SPACE_DOS_WINDOWS\t\t\t\t= 0x03\n};\n\n/* The file entry flags\n */\nenum LIBFSNTFS_FILE_ENTRY_FLAGS\n{\n\t/* The file entry is based on MFT metadata only\n\t */\n\tLIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY\t\t\t\t= 0x01\n};\n\n/* The compression methods\n */\nenum LIBFSNTFS_COMPRESSION_METHODS\n{\n\tLIBFSNTFS_COMPRESSION_METHOD_NONE\t\t\t\t= 0,\n\tLIBFSNTFS_COMPRESSION_METHOD_LZNT1\t\t\t\t= 1,\n\tLIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN\t\t\t= 2,\n\tLIBFSNTFS_COMPRESSION_METHOD_LZX\t\t\t\t= 3\n};\n\n/* Flag to indicate the MFT entry is based on MFT metadata only\n */\n#define LIBFSNTFS_MFT_ENTRY_FLAG_MFT_ONLY\t\t\t\tLIBFDATA_RANGE_FLAG_USER_DEFINED_1\n\n/* Flag to indicate the index value in the list is stored in the $INDEX_ROOT\n */\n#define LIBFSNTFS_INDEX_VALUE_LIST_FLAG_STORED_IN_ROOT\t\t\tLIBFDATA_RANGE_FLAG_USER_DEFINED_1\n\n#define LIBFSNTFS_DIRECTORY_ENTRIES_TREE_MAXIMUM_NUMBER_OF_SUB_NODES\t257\n#define LIBFSNTFS_INDEX_TREE_MAXIMUM_NUMBER_OF_SUB_NODES\t\t257\n\n#define LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_COMPRESSED_BLOCKS\t\t2\n#define LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_INDEX_NODES\t\t\t128\n#define LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_MFT_ENTRIES\t\t\t32\n\n#define LIBFSNTFS_MAXIMUM_RECURSION_DEPTH\t\t\t\t256\n\n#endif /* !defined( _LIBFSNTFS_INTERNAL_DEFINITIONS_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_directory_entries_tree.c",
    "content": "/*\n * Directory entries tree functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_directory_entries_tree.h\"\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_index.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_name.h\"\n#include \"libfsntfs_standard_information_values.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates a directory entries tree\n * Make sure the value directory_entries_tree is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_initialize(\n     libfsntfs_directory_entries_tree_t **directory_entries_tree,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entries_tree_initialize\";\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *directory_entries_tree != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid directory entries tree value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*directory_entries_tree = memory_allocate_structure(\n\t                           libfsntfs_directory_entries_tree_t );\n\n\tif( *directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create directory entries tree.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *directory_entries_tree,\n\t     0,\n\t     sizeof( libfsntfs_directory_entries_tree_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear directory entries tree.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *directory_entries_tree != NULL )\n\t{\n\t\tmemory_free(\n\t\t *directory_entries_tree );\n\n\t\t*directory_entries_tree = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a directory entries tree\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_free(\n     libfsntfs_directory_entries_tree_t **directory_entries_tree,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entries_tree_free\";\n\tint result            = 1;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *directory_entries_tree != NULL )\n\t{\n\t\tif( ( *directory_entries_tree )->i30_index != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_free(\n\t\t\t     &( ( *directory_entries_tree )->i30_index ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free $I30 index.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *directory_entries_tree )->short_names_tree != NULL )\n\t\t{\n\t\t\tif( libcdata_btree_free(\n\t\t\t     &( ( *directory_entries_tree )->short_names_tree ),\n\t\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_directory_entry_free,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free short names tree.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *directory_entries_tree )->entries_list != NULL )\n\t\t{\n\t\t\tif( libfdata_list_free(\n\t\t\t     &( ( *directory_entries_tree )->entries_list ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free entries list.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *directory_entries_tree )->entries_cache != NULL )\n\t\t{\n\t\t\tif( libfcache_cache_free(\n\t\t\t     &( ( *directory_entries_tree )->entries_cache ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free entries cache.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *directory_entries_tree );\n\n\t\t*directory_entries_tree = NULL;\n\t}\n\treturn( result );\n}\n\n/* Inserts an index value into the directory entries tree\n * Returns 1 if a directory entry was inserted, 0 if not or -1 on error\n */\nint libfsntfs_directory_entries_tree_insert_index_value(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     int index_value_entry,\n     libfsntfs_index_value_t *index_value,\n     uint32_t index_value_flags,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                      = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry          = NULL;\n\tlibfsntfs_directory_entry_t *existing_directory_entry = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values        = NULL;\n\tstatic char *function                                 = \"libfsntfs_directory_entries_tree_insert_index_value\";\n\tuint8_t name_space                                    = 0;\n\tint element_file_index                                = 0;\n\tint element_index                                     = 0;\n\tint result                                            = 0;\n\tint value_index                                       = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_initialize(\n\t     &file_name_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_read_data(\n\t     file_name_values,\n\t     index_value->key_data,\n\t     (size_t) index_value->key_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( file_name_values->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file name values - missing name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* Ignore the file name with the . as its name\n\t */\n\tif( ( file_name_values->name_size == 2 )\n\t && ( file_name_values->name[ 0 ] == 0x2e )\n\t && ( file_name_values->name[ 1 ] == 0x00 ) )\n\t{\n\t\tif( libfsntfs_file_name_values_free(\n\t\t     &file_name_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\treturn( 0 );\n\t}\n\tname_space = file_name_values->name_space;\n\n\tif( name_space == LIBFSNTFS_FILE_NAME_SPACE_DOS )\n\t{\n\t\tif( libfsntfs_directory_entry_initialize(\n\t\t     &directory_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create directory entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdirectory_entry->file_reference         = index_value->file_reference;\n\t\tdirectory_entry->short_file_name_values = file_name_values;\n\n\t\tfile_name_values = NULL;\n\n\t\tresult = libcdata_btree_insert_value(\n\t\t          directory_entries_tree->short_names_tree,\n\t\t          &value_index,\n\t\t          (intptr_t *) directory_entry,\n\t\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_directory_entry_compare_by_file_reference,\n\t\t          &upper_node,\n\t\t          (intptr_t **) &existing_directory_entry,\n\t\t          error ) ;\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to insert directory entry into tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tif( existing_directory_entry == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing existing directory entry.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( name_space == LIBFSNTFS_FILE_NAME_SPACE_DOS )\n\t\t\t{\n\t\t\t\tif( existing_directory_entry->short_file_name_values != NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t\t \"%s: short file name of existing directory entry already set.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\texisting_directory_entry->short_file_name_values = directory_entry->short_file_name_values;\n\t\t\t\tdirectory_entry->short_file_name_values          = NULL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( existing_directory_entry->file_name_values != NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t\t \"%s: file name of existing directory entry already set.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\texisting_directory_entry->file_name_values = directory_entry->file_name_values;\n\t\t\t\tdirectory_entry->file_name_values          = NULL;\n\t\t\t}\n\t\t\tif( libfsntfs_directory_entry_free(\n\t\t\t     &directory_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( name_space != LIBFSNTFS_FILE_NAME_SPACE_DOS )\n\t{\n\t\t/* The element file index value contains the index value entry + 1\n\t\t */\n\t\telement_file_index = index_value_entry + 1;\n\n\t\tif( libfdata_list_append_element(\n\t\t     directory_entries_tree->entries_list,\n\t\t     &element_index,\n\t\t     element_file_index,\n\t\t     index_value->offset,\n\t\t     (size64_t) index_value->size,\n\t\t     index_value_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append index value to entries list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tif( libfsntfs_file_name_values_free(\n\t\t     &file_name_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the directory entries tree from an index node\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_read_from_index_node(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     int recursion_depth,\n     libcerror_error_t **error )\n{\n\tlibfcache_cache_t *sub_node_cache    = NULL;\n\tlibfsntfs_index_node_t *sub_node     = NULL;\n\tlibfsntfs_index_value_t *index_value = NULL;\n\tstatic char *function                = \"libfsntfs_directory_entries_tree_read_from_index_node\";\n\toff64_t index_entry_offset           = 0;\n\tuint32_t index_value_flags           = 0;\n\tint index_value_entry                = 0;\n\tint is_allocated                     = 0;\n\tint number_of_index_values           = 0;\n\tint result                           = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - invalid $I30 index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( recursion_depth < 0 )\n\t || ( recursion_depth > LIBFSNTFS_MAXIMUM_RECURSION_DEPTH ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid recursion depth value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_node_get_number_of_values(\n\t     index_node,\n\t     &number_of_index_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of values from index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* Use a local cache to prevent cache invalidation of index node\n\t * when reading sub nodes.\n\t */\n\tif( libfcache_cache_initialize(\n\t     &sub_node_cache,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create sub node cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( index_value_entry = 0;\n\t     index_value_entry < number_of_index_values;\n\t     index_value_entry++ )\n\t{\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     index_node,\n\t\t     index_value_entry,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve value: %d from index node.\",\n\t\t\t function,\n\t\t\t index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d file reference: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t index_value_entry,\n\t\t\t index_value->file_reference & 0xffffffffffffUL,\n\t\t\t index_value->file_reference >> 48 );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t{\n\t\t\tif( index_value->sub_node_vcn > (uint64_t) INT_MAX )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: node index value: %d sub node VCN value out of bounds.\",\n\t\t\t\t function,\n\t\t\t\t index_value_entry );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tis_allocated = libfsntfs_index_sub_node_is_allocated(\n\t\t\t                directory_entries_tree->i30_index,\n\t\t\t                (int) index_value->sub_node_vcn,\n\t\t\t                error );\n\n\t\t\tif( is_allocated == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine if sub node with VCN: %d is allocated.\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: index value: %03d sub node VCN: %\" PRIu64 \" (%s).\\n\",\n\t\t\t\t function,\n\t\t\t\t index_value_entry,\n\t\t\t\t index_value->sub_node_vcn,\n\t\t\t\t is_allocated != 0 ? \"allocated\" : \"unallocated\" );\n\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"\\n\" );\n\t\t\t}\n#endif\n\t\t\tif( is_allocated == 0 )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tindex_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size );\n\n\t\t\tif( libfsntfs_index_get_sub_node(\n\t\t\t     directory_entries_tree->i30_index,\n\t\t\t     file_io_handle,\n\t\t\t     sub_node_cache,\n\t\t\t     index_entry_offset,\n\t\t\t     (int) index_value->sub_node_vcn,\n\t\t\t     &sub_node,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve sub node with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t\t index_entry_offset,\n\t\t\t\t index_entry_offset );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_directory_entries_tree_read_from_index_node(\n\t\t\t     directory_entries_tree,\n\t\t\t     file_io_handle,\n\t\t\t     sub_node,\n\t\t\t     recursion_depth + 1,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read directory entries tree from index entry with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t\t index_entry_offset,\n\t\t\t\t index_entry_offset );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tindex_value_flags = 0;\n\n\t\tif( index_node == directory_entries_tree->i30_index->root_node )\n\t\t{\n\t\t\tindex_value_flags = LIBFSNTFS_INDEX_VALUE_LIST_FLAG_STORED_IN_ROOT;\n\t\t}\n\t\t/* Add the index values containing data in a depth first manner since\n\t\t * this will preserve the sorted by file name order of the directory entries\n\t\t */\n\t\tresult = libfsntfs_directory_entries_tree_insert_index_value(\n\t\t          directory_entries_tree,\n\t\t          index_value_entry,\n\t\t          index_value,\n\t\t          index_value_flags,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to insert index value into directory entries tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfcache_cache_free(\n\t     &sub_node_cache,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free sub node cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( sub_node_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &sub_node_cache,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the directory entries tree from the $I30 index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_read_from_i30_index(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute                             = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_directory_entries_tree_read_from_i30_index\";\n\tuint32_t attribute_type                                              = 0;\n\tuint32_t collation_type                                              = 0;\n\tint result                                                           = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid directory entries tree - $I30 index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->short_names_tree != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid directory entries tree - short names tree value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) != 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_index_initialize(\n\t     &( directory_entries_tree->i30_index ),\n\t     io_handle,\n\t     (uint8_t *) \"$I30\",\n\t     5,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create $I30 index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_index_read(\n\t          directory_entries_tree->i30_index,\n\t          file_io_handle,\n\t          mft_entry,\n\t          flags,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read $I30 index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_index_get_attribute_type(\n\t\t     directory_entries_tree->i30_index,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute type from index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported index attribute type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_index_get_collation_type(\n\t\t     directory_entries_tree->i30_index,\n\t\t     &collation_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve collation type from index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( collation_type != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported index collation type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdata_list_initialize(\n\t\t     &( directory_entries_tree->entries_list ),\n\t\t     (intptr_t *) directory_entries_tree,\n\t\t     NULL,\n\t\t     NULL,\n\t\t     (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfdata_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_directory_entries_tree_read_element_data,\n\t\t     NULL,\n\t\t     LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create entries list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfcache_cache_initialize(\n\t\t     &( directory_entries_tree->entries_cache ),\n\t\t     1,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create entries cache.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libcdata_btree_initialize(\n\t\t     &( directory_entries_tree->short_names_tree ),\n\t\t     LIBFSNTFS_INDEX_TREE_MAXIMUM_NUMBER_OF_SUB_NODES,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create short names B-tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_directory_entries_tree_read_from_index_node(\n\t\t     directory_entries_tree,\n\t\t     file_io_handle,\n\t\t     directory_entries_tree->i30_index->root_node,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read directory entries tree from root node.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdirectory_entries_tree->use_case_folding = 0;\n\n\t\tresult = libfsntfs_mft_entry_get_standard_information_attribute(\n\t\t          mft_entry,\n\t\t          &mft_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $STANDARD_INFORMATION attribute from MFT entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tif( libfsntfs_standard_information_values_initialize(\n\t\t\t     &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_read_from_mft_attribute(\n\t\t\t     standard_information_values,\n\t\t\t     mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read standard information values from MFT attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( standard_information_values->is_case_sensitive == 0 )\n\t\t\t{\n\t\t\t\tdirectory_entries_tree->use_case_folding = 1;\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_free(\n\t\t\t     &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( standard_information_values != NULL )\n\t{\n\t\tlibfsntfs_standard_information_values_free(\n\t\t &standard_information_values,\n\t\t NULL );\n\t}\n\tif( directory_entries_tree->short_names_tree != NULL )\n\t{\n\t\tlibcdata_btree_free(\n\t\t &( directory_entries_tree->short_names_tree ),\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_directory_entry_free,\n\t\t NULL );\n\t}\n\tif( directory_entries_tree->entries_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &( directory_entries_tree->entries_cache ),\n\t\t NULL );\n\t}\n\tif( directory_entries_tree->entries_list != NULL )\n\t{\n\t\tlibfdata_list_free(\n\t\t &( directory_entries_tree->entries_list ),\n\t\t NULL );\n\t}\n\tif( directory_entries_tree->i30_index != NULL )\n\t{\n\t\tlibfsntfs_index_free(\n\t\t &( directory_entries_tree->i30_index ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_number_of_entries(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     int *number_of_entries,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entries_tree_get_number_of_entries\";\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->entries_list == NULL )\n\t{\n\t\tif( number_of_entries == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid number of entries.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*number_of_entries = 0;\n\t}\n\telse\n\t{\n\t\tif( libfdata_list_get_number_of_elements(\n\t\t     directory_entries_tree->entries_list,\n\t\t     number_of_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of elements from entries list.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific entry\n * This function creates a new directory entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_entry_by_index(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     int entry_index,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *safe_directory_entry = NULL;\n\tstatic char *function                             = \"libfsntfs_directory_entries_tree_get_entry_by_index\";\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_list_get_element_value_by_index(\n\t     directory_entries_tree->entries_list,\n\t     (intptr_t *) file_io_handle,\n\t     (libfdata_cache_t *) directory_entries_tree->entries_cache,\n\t     entry_index,\n\t     (intptr_t **) &safe_directory_entry,\n\t     LIBFDATA_READ_FLAG_IGNORE_CACHE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve element: %d from entries list.\",\n\t\t function,\n\t\t entry_index );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_directory_entry_clone(\n\t     directory_entry,\n\t     safe_directory_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the directory entry from an index node for an UTF-8 encoded name\n * This function creates a new directory entry\n * Returns 1 if successful, 0 if no such directory entry or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     int recursion_depth,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                      = NULL;\n\tlibfsntfs_directory_entry_t *existing_directory_entry = NULL;\n\tlibfsntfs_directory_entry_t *safe_directory_entry     = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values        = NULL;\n\tlibfsntfs_index_node_t *sub_node                      = NULL;\n\tlibfsntfs_index_value_t *index_value                  = NULL;\n\tstatic char *function                                 = \"libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name\";\n\toff64_t index_entry_offset                            = 0;\n\tint compare_result                                    = 0;\n\tint index_value_entry                                 = 0;\n\tint is_allocated                                      = 0;\n\tint number_of_index_values                            = 0;\n\tint result                                            = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - invalid $I30 index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( recursion_depth < 0 )\n\t || ( recursion_depth > LIBFSNTFS_MAXIMUM_RECURSION_DEPTH ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid recursion depth value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_node_get_number_of_values(\n\t     index_node,\n\t     &number_of_index_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of values from index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( index_value_entry = 0;\n\t     index_value_entry < number_of_index_values;\n\t     index_value_entry++ )\n\t{\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     index_node,\n\t\t     index_value_entry,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve value: %d from index node.\",\n\t\t\t function,\n\t\t\t index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d file reference: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t index_value_entry,\n\t\t\t index_value->file_reference & 0xffffffffffffUL,\n\t\t\t index_value->file_reference >> 48 );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t{\n\t\t\tif( index_value->sub_node_vcn > (uint64_t) INT_MAX )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: node index value: %d sub node VCN value out of bounds.\",\n\t\t\t\t function,\n\t\t\t\t index_value_entry );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tis_allocated = libfsntfs_index_sub_node_is_allocated(\n\t\t\t                directory_entries_tree->i30_index,\n\t\t\t                (int) index_value->sub_node_vcn,\n\t\t\t                error );\n\n\t\t\tif( is_allocated == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine if sub node with VCN: %d is allocated.\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( is_allocated == 0 )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_file_name_values_initialize(\n\t\t     &file_name_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_name_values_read_data(\n\t\t     file_name_values,\n\t\t     index_value->key_data,\n\t\t     (size_t) index_value->key_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tcompare_result = libfsntfs_name_compare_with_utf8_string(\n\t\t                  file_name_values->name,\n\t\t                  file_name_values->name_size,\n\t\t                  utf8_string,\n\t\t                  utf8_string_length,\n\t\t                  directory_entries_tree->use_case_folding,\n\t\t                  error );\n\n\t\tif( compare_result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare file name values with UTF-8 string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( compare_result != LIBUNA_COMPARE_EQUAL )\n\t\t{\n\t\t\tif( libfsntfs_file_name_values_free(\n\t\t\t     &file_name_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( compare_result == LIBUNA_COMPARE_LESS )\n\t\t{\n\t\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if( compare_result == LIBUNA_COMPARE_EQUAL )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif( compare_result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\tif( libfsntfs_directory_entry_initialize(\n\t\t     &safe_directory_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create directory entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_directory_entry->file_reference   = index_value->file_reference;\n\t\tsafe_directory_entry->file_name_values = file_name_values;\n\n\t\tfile_name_values = NULL;\n\n\t\tif( safe_directory_entry->file_name_values->name_space == LIBFSNTFS_FILE_NAME_SPACE_WINDOWS )\n\t\t{\n\t\t\tresult = libcdata_btree_get_value_by_value(\n\t\t\t          directory_entries_tree->short_names_tree,\n\t\t\t          (intptr_t *) directory_entry,\n\t\t\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_directory_entry_compare_by_file_reference,\n\t\t\t          &upper_node,\n\t\t\t          (intptr_t **) &existing_directory_entry,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve directory entry from tree.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result != 0 )\n\t\t\t{\n/* TODO add debug compare of long and short names */\n\t\t\t\tif( existing_directory_entry == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t\t \"%s: missing existing directory entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_file_name_values_clone(\n\t\t\t\t     &( safe_directory_entry->short_file_name_values ),\n\t\t\t\t     existing_directory_entry->short_file_name_values,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to clone short file name values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*directory_entry = safe_directory_entry;\n\n\t\tresult = 1;\n\t}\n\telse if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n\t\tindex_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size );\n\n\t\tif( libfsntfs_index_get_sub_node(\n\t\t     directory_entries_tree->i30_index,\n\t\t     file_io_handle,\n\t\t     directory_entries_tree->i30_index->index_node_cache,\n\t\t     index_entry_offset,\n\t\t     (int) index_value->sub_node_vcn,\n\t\t     &sub_node,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub node with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t\t          directory_entries_tree,\n\t\t          file_io_handle,\n\t\t          sub_node,\n\t\t          utf8_string,\n\t\t          utf8_string_length,\n\t\t          directory_entry,\n\t\t          recursion_depth + 1,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to retrieve directory entry by UTF-8 string from index entry with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &safe_directory_entry,\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the directory entry for an UTF-8 encoded name\n * This function creates a new directory entry\n * Returns 1 if successful, 0 if no such directory entry or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entries_tree_get_entry_by_utf8_name\";\n\tint result            = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          directory_entries_tree->i30_index->root_node,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          directory_entry,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve directory entry by UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the directory entry from an index node for an UTF-16 encoded name\n * This function creates a new directory entry\n * Returns 1 if successful, 0 if no such directory entry or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     int recursion_depth,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                      = NULL;\n\tlibfsntfs_directory_entry_t *existing_directory_entry = NULL;\n\tlibfsntfs_directory_entry_t *safe_directory_entry     = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values        = NULL;\n\tlibfsntfs_index_node_t *sub_node                      = NULL;\n\tlibfsntfs_index_value_t *index_value                  = NULL;\n\tstatic char *function                                 = \"libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name\";\n\toff64_t index_entry_offset                            = 0;\n\tint compare_result                                    = 0;\n\tint index_value_entry                                 = 0;\n\tint is_allocated                                      = 0;\n\tint number_of_index_values                            = 0;\n\tint result                                            = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - invalid $I30 index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( recursion_depth < 0 )\n\t || ( recursion_depth > LIBFSNTFS_MAXIMUM_RECURSION_DEPTH ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid recursion depth value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_node_get_number_of_values(\n\t     index_node,\n\t     &number_of_index_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of values from index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( index_value_entry = 0;\n\t     index_value_entry < number_of_index_values;\n\t     index_value_entry++ )\n\t{\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     index_node,\n\t\t     index_value_entry,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve value: %d from index node.\",\n\t\t\t function,\n\t\t\t index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d file reference: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t index_value_entry,\n\t\t\t index_value->file_reference & 0xffffffffffffUL,\n\t\t\t index_value->file_reference >> 48 );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t{\n\t\t\tif( index_value->sub_node_vcn > (uint64_t) INT_MAX )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: node index value: %d sub node VCN value out of bounds.\",\n\t\t\t\t function,\n\t\t\t\t index_value_entry );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tis_allocated = libfsntfs_index_sub_node_is_allocated(\n\t\t\t                directory_entries_tree->i30_index,\n\t\t\t                (int) index_value->sub_node_vcn,\n\t\t\t                error );\n\n\t\t\tif( is_allocated == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine if sub node with VCN: %d is allocated.\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( is_allocated == 0 )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_file_name_values_initialize(\n\t\t     &file_name_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_name_values_read_data(\n\t\t     file_name_values,\n\t\t     index_value->key_data,\n\t\t     (size_t) index_value->key_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read file name values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tcompare_result = libfsntfs_name_compare_with_utf16_string(\n\t\t                  file_name_values->name,\n\t\t                  file_name_values->name_size,\n\t\t                  utf16_string,\n\t\t                  utf16_string_length,\n\t\t                  directory_entries_tree->use_case_folding,\n\t\t                  error );\n\n\t\tif( compare_result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare file name values with UTF-16 string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( compare_result != LIBUNA_COMPARE_EQUAL )\n\t\t{\n\t\t\tif( libfsntfs_file_name_values_free(\n\t\t\t     &file_name_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( compare_result == LIBUNA_COMPARE_LESS )\n\t\t{\n\t\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if( compare_result == LIBUNA_COMPARE_EQUAL )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif( compare_result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\tif( libfsntfs_directory_entry_initialize(\n\t\t     &safe_directory_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create directory entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_directory_entry->file_reference   = index_value->file_reference;\n\t\tsafe_directory_entry->file_name_values = file_name_values;\n\n\t\tfile_name_values = NULL;\n\n\t\tif( safe_directory_entry->file_name_values->name_space == LIBFSNTFS_FILE_NAME_SPACE_WINDOWS )\n\t\t{\n\t\t\tresult = libcdata_btree_get_value_by_value(\n\t\t\t          directory_entries_tree->short_names_tree,\n\t\t\t          (intptr_t *) directory_entry,\n\t\t\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_directory_entry_compare_by_file_reference,\n\t\t\t          &upper_node,\n\t\t\t          (intptr_t **) &existing_directory_entry,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve directory entry from tree.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result != 0 )\n\t\t\t{\n/* TODO add debug compare of long and short names */\n\t\t\t\tif( existing_directory_entry == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t\t \"%s: missing existing directory entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_file_name_values_clone(\n\t\t\t\t     &( safe_directory_entry->short_file_name_values ),\n\t\t\t\t     existing_directory_entry->short_file_name_values,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to clone short file name values.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*directory_entry = safe_directory_entry;\n\n\t\tresult = 1;\n\t}\n\telse if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n\t\tindex_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size );\n\n\t\tif( libfsntfs_index_get_sub_node(\n\t\t     directory_entries_tree->i30_index,\n\t\t     file_io_handle,\n\t\t     directory_entries_tree->i30_index->index_node_cache,\n\t\t     index_entry_offset,\n\t\t     (int) index_value->sub_node_vcn,\n\t\t     &sub_node,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub node with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t\t          directory_entries_tree,\n\t\t          file_io_handle,\n\t\t          sub_node,\n\t\t          utf16_string,\n\t\t          utf16_string_length,\n\t\t          directory_entry,\n\t\t          recursion_depth + 1,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to retrieve directory entry by UTF-16 string from index entry with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &safe_directory_entry,\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the directory entry for an UTF-16 encoded name\n * This function creates a new directory entry\n * Returns 1 if successful, 0 if no such directory entry or -1 on error\n */\nint libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entries_tree_get_entry_by_utf16_name\";\n\tint result            = 0;\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          directory_entries_tree->i30_index->root_node,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          directory_entry,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve directory entry by UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Reads a directory entry\n * Callback function for the entries list\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entries_tree_read_element_data(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfdata_list_element_t *element,\n     libfdata_cache_t *cache,\n     int element_file_index,\n     off64_t index_value_offset,\n     size64_t element_size LIBFSNTFS_ATTRIBUTE_UNUSED,\n     uint32_t index_value_flags,\n     uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                      = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry          = NULL;\n\tlibfsntfs_directory_entry_t *existing_directory_entry = NULL;\n\tlibfsntfs_index_node_t *sub_node                      = NULL;\n\tlibfsntfs_index_value_t *index_value                  = NULL;\n\tstatic char *function                                 = \"libfsntfs_directory_entries_tree_read_element_data\";\n\toff64_t index_entry_offset                            = 0;\n\toff64_t sub_node_vcn                                  = 0;\n\tint index_value_entry                                 = 0;\n\tint is_allocated                                      = 0;\n\tint result                                            = 0;\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_size )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( directory_entries_tree == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - missing $I30 index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entries_tree->i30_index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entries tree - invalid $I30 index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_list_element_get_element_index(\n\t     element,\n\t     &index_value_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve element index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading index value: %03d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\\n\",\n\t\t function,\n\t\t index_value_entry,\n\t\t index_value_offset,\n\t\t index_value_offset );\n\t}\n#endif\n\t/* The element file index value contains the index value entry + 1\n\t */\n\telement_file_index -= 1;\n\n\tif( ( index_value_flags & LIBFSNTFS_INDEX_VALUE_LIST_FLAG_STORED_IN_ROOT ) != 0 )\n\t{\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     directory_entries_tree->i30_index->root_node,\n\t\t     element_file_index,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve index value: %d from root node.\",\n\t\t\t function,\n\t\t\t element_file_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tsub_node_vcn       = index_value_offset / directory_entries_tree->i30_index->io_handle->cluster_block_size;\n\t\tindex_entry_offset = (off64_t) ( sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size );\n\n\t\tis_allocated = libfsntfs_index_sub_node_is_allocated(\n\t\t                directory_entries_tree->i30_index,\n\t\t                (int) sub_node_vcn,\n\t\t                error );\n\n\t\tif( is_allocated == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if sub node with VCN: %d is allocated.\",\n\t\t\t function,\n\t\t\t (int) sub_node_vcn );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( is_allocated == 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported unallocated sub node with VCN: %d.\",\n\t\t\t function,\n\t\t\t (int) sub_node_vcn );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_index_get_sub_node(\n\t\t     directory_entries_tree->i30_index,\n\t\t     file_io_handle,\n\t\t     directory_entries_tree->i30_index->index_node_cache,\n\t\t     index_entry_offset,\n\t\t     (int) sub_node_vcn,\n\t\t     &sub_node,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub node with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t (int) sub_node_vcn,\n\t\t\t index_entry_offset,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     sub_node,\n\t\t     element_file_index,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve index value: %d from sub node.\",\n\t\t\t function,\n\t\t\t element_file_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_directory_entry_initialize(\n\t     &directory_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create directory entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_initialize(\n\t     &( directory_entry->file_name_values ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d file reference: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t function,\n\t\t index_value_entry,\n\t\t index_value->file_reference & 0xffffffffffffUL,\n\t\t index_value->file_reference >> 48 );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\tdirectory_entry->file_reference = index_value->file_reference;\n\n\tif( libfsntfs_file_name_values_read_data(\n\t     directory_entry->file_name_values,\n\t     index_value->key_data,\n\t     (size_t) index_value->key_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( directory_entry->file_name_values->name_space == LIBFSNTFS_FILE_NAME_SPACE_WINDOWS )\n\t{\n\t\tresult = libcdata_btree_get_value_by_value(\n\t\t          directory_entries_tree->short_names_tree,\n\t\t          (intptr_t *) directory_entry,\n\t\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_directory_entry_compare_by_file_reference,\n\t\t          &upper_node,\n\t\t          (intptr_t **) &existing_directory_entry,\n\t\t          error ) ;\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve directory entry from tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n/* TODO add debug compare of long and short names */\n\t\t\tif( existing_directory_entry == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing existing directory entry.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_clone(\n\t\t\t     &( directory_entry->short_file_name_values ),\n\t\t\t     existing_directory_entry->short_file_name_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to clone short file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( libfdata_list_element_set_element_value(\n\t     element,\n\t     (intptr_t *) file_io_handle,\n\t     cache,\n\t     (intptr_t *) directory_entry,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_directory_entry_free,\n\t     LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set index value as element value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_directory_entries_tree.h",
    "content": "/*\n * Directory entries tree functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DIRECTORY_ENTRIES_TREE_H )\n#define _LIBFSNTFS_DIRECTORY_ENTRIES_TREE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_index.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_entry.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_directory_entries_tree libfsntfs_directory_entries_tree_t;\n\nstruct libfsntfs_directory_entries_tree\n{\n\t/* The $I30 index\n\t */\n\tlibfsntfs_index_t *i30_index;\n\n\t/* The short names B-tree\n\t */\n\tlibcdata_btree_t *short_names_tree;\n\n\t/* The entries list\n\t */\n\tlibfdata_list_t *entries_list;\n\n\t/* The entries cache\n\t */\n\tlibfcache_cache_t *entries_cache;\n\n\t/* Value to indicate case folding should be used\n\t */\n\tuint8_t use_case_folding;\n};\n\nint libfsntfs_directory_entries_tree_initialize(\n     libfsntfs_directory_entries_tree_t **directory_entries_tree,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_free(\n     libfsntfs_directory_entries_tree_t **directory_entries_tree,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_insert_index_value(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     int index_value_entry,\n     libfsntfs_index_value_t *index_value,\n     uint32_t index_value_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_read_from_index_node(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     int recursion_depth,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_read_from_i30_index(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_number_of_entries(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     int *number_of_entries,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_entry_by_index(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     int entry_index,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     int recursion_depth,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     int recursion_depth,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entries_tree_read_element_data(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree,\n     libbfio_handle_t *file_io_handle,\n     libfdata_list_element_t *element,\n     libfdata_cache_t *cache,\n     int element_file_index,\n     off64_t index_value_offset,\n     size64_t element_size,\n     uint32_t index_value_flags,\n     uint8_t read_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_DIRECTORY_ENTRIES_TREE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_directory_entry.c",
    "content": "/*\n * Directory entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n/* Creates a directory entry\n * Make sure the value directory_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_initialize(\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_initialize\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *directory_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid directory entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*directory_entry = memory_allocate_structure(\n\t                    libfsntfs_directory_entry_t );\n\n\tif( *directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create directory entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *directory_entry,\n\t     0,\n\t     sizeof( libfsntfs_directory_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear directory entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *directory_entry );\n\n\t\t*directory_entry = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *directory_entry != NULL )\n\t{\n\t\tmemory_free(\n\t\t *directory_entry );\n\n\t\t*directory_entry = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a directory entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_free(\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_free\";\n\tint result            = 1;\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *directory_entry != NULL )\n\t{\n\t\tif( ( *directory_entry )->file_name_values != NULL )\n\t\t{\n\t\t\tif( libfsntfs_file_name_values_free(\n\t\t\t     &( ( *directory_entry )->file_name_values ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *directory_entry )->short_file_name_values != NULL )\n\t\t{\n\t\t\tif( libfsntfs_file_name_values_free(\n\t\t\t     &( ( *directory_entry )->short_file_name_values ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free short file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *directory_entry );\n\n\t\t*directory_entry = NULL;\n\t}\n\treturn( result );\n}\n\n/* Clones a directory entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_clone(\n     libfsntfs_directory_entry_t **destination_directory_entry,\n     libfsntfs_directory_entry_t *source_directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_clone\";\n\n\tif( destination_directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_directory_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid destination directory entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( source_directory_entry == NULL )\n\t{\n\t\t*destination_directory_entry = source_directory_entry;\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_directory_entry_initialize(\n\t     destination_directory_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create destination directory entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_clone(\n\t     &( ( *destination_directory_entry )->file_name_values ),\n\t     source_directory_entry->file_name_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create destination file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_clone(\n\t     &( ( *destination_directory_entry )->short_file_name_values ),\n\t     source_directory_entry->short_file_name_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create destination short file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *destination_directory_entry )->file_reference = source_directory_entry->file_reference;\n\n\treturn( 1 );\n\non_error:\n\tif( *destination_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t destination_directory_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Compares 2 directory entries by file reference\n * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_directory_entry_compare_by_file_reference(\n     libfsntfs_directory_entry_t *first_directory_entry,\n     libfsntfs_directory_entry_t *second_directory_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_directory_entry_compare_by_file_reference\";\n\tuint64_t first_mft_entry_index  = 0;\n\tuint64_t second_mft_entry_index = 0;\n\tuint16_t first_sequence_number  = 0;\n\tuint16_t second_sequence_number = 0;\n\n\tif( first_directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( second_directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid second directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfirst_mft_entry_index  = first_directory_entry->file_reference & 0xffffffffffffUL;\n\tsecond_mft_entry_index = second_directory_entry->file_reference & 0xffffffffffffUL;\n\n\tif( first_mft_entry_index < second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_mft_entry_index > second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\tfirst_sequence_number  = (uint16_t) ( first_directory_entry->file_reference >> 48 );\n\tsecond_sequence_number = (uint16_t) ( second_directory_entry->file_reference >> 48 );\n\n\tif( first_sequence_number < second_sequence_number )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_sequence_number > second_sequence_number )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\treturn( LIBCDATA_COMPARE_EQUAL );\n}\n\n/* Retrieves the MFT entry index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_mft_entry_index(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *mft_entry_index,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_mft_entry_index\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( directory_entry->file_reference & 0xffffffffffffUL ) > (uint64_t) INT_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT entry index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry_index = (int) ( directory_entry->file_reference & 0xffffffffffffUL );\n\n\treturn( 1 );\n}\n\n/* Retrieves the file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_file_reference(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_file_reference\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_reference = directory_entry->file_reference;\n\n\treturn( 1 );\n}\n\n/* Retrieves the parent file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_parent_file_reference(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_parent_file_reference\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_parent_file_reference(\n\t     directory_entry->file_name_values,\n\t     parent_file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent reference from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_creation_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_creation_time\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_creation_time(\n\t     directory_entry->file_name_values,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_modification_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_modification_time\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_modification_time(\n\t     directory_entry->file_name_values,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_access_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_access_time\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_access_time(\n\t     directory_entry->file_name_values,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the entry modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_entry_modification_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_entry_modification_time\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_entry_modification_time(\n\t     directory_entry->file_name_values,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_entry_size\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_size(\n\t     directory_entry->file_name_values,\n\t     size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_file_attribute_flags(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_entry_file_attribute_flags\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_file_attribute_flags(\n\t     directory_entry->file_name_values,\n\t     file_attribute_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_utf8_name_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_utf8_name_size\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf8_name_size(\n\t     directory_entry->file_name_values,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 name from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_utf8_name(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_utf8_name\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf8_name(\n\t     directory_entry->file_name_values,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_utf16_name_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_utf16_name_size\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf16_name_size(\n\t     directory_entry->file_name_values,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 name from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_directory_entry_get_utf16_name(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_directory_entry_get_utf16_name\";\n\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf16_name(\n\t     directory_entry->file_name_values,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name from file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_directory_entry.h",
    "content": "/*\n * Directory entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_DIRECTORY_ENTRY_H )\n#define _LIBFSNTFS_DIRECTORY_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_directory_entry libfsntfs_directory_entry_t;\n\nstruct libfsntfs_directory_entry\n{\n\t/* The file reference\n\t */\n\tuint64_t file_reference;\n\n\t/* The file name\n\t */\n\tlibfsntfs_file_name_values_t *file_name_values;\n\n\t/* The short file name\n\t */\n\tlibfsntfs_file_name_values_t *short_file_name_values;\n};\n\nint libfsntfs_directory_entry_initialize(\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_free(\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_clone(\n     libfsntfs_directory_entry_t **destination_directory_entry,\n     libfsntfs_directory_entry_t *source_directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_compare_by_file_reference(\n     libfsntfs_directory_entry_t *first_directory_entry,\n     libfsntfs_directory_entry_t *second_directory_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_mft_entry_index(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *mft_entry_index,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_file_reference(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_parent_file_reference(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_creation_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_modification_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_access_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_entry_modification_time(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint64_t *size,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_file_attribute_flags(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_utf8_name_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_utf8_name(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_utf16_name_size(\n     libfsntfs_directory_entry_t *directory_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_directory_entry_get_utf16_name(\n     libfsntfs_directory_entry_t *directory_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_DIRECTORY_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_error.c",
    "content": "/*\n * Error functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"libfsntfs_error.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\n/* Free an error and its elements\n */\nvoid libfsntfs_error_free(\n      libfsntfs_error_t **error )\n{\n\tlibcerror_error_free(\n\t (libcerror_error_t **) error );\n}\n\n/* Prints a descriptive string of the error to the stream\n * Returns the number of printed characters if successful or -1 on error\n */\nint libfsntfs_error_fprint(\n     libfsntfs_error_t *error,\n     FILE *stream )\n{\n\tint print_count = 0;\n\n\tprint_count = libcerror_error_fprint(\n\t               (libcerror_error_t *) error,\n\t               stream );\n\n\treturn( print_count );\n}\n\n/* Prints a descriptive string of the error to the string\n * The end-of-string character is not included in the return value\n * Returns the number of printed characters if successful or -1 on error\n */\nint libfsntfs_error_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size )\n{\n\tint print_count = 0;\n\n\tprint_count = libcerror_error_sprint(\n\t               (libcerror_error_t *) error,\n\t               string,\n\t               size );\n\n\treturn( print_count );\n}\n\n/* Prints a backtrace of the error to the stream\n * Returns the number of printed characters if successful or -1 on error\n */\nint libfsntfs_error_backtrace_fprint(\n     libfsntfs_error_t *error,\n      FILE *stream )\n{\n\tint print_count = 0;\n\n\tprint_count = libcerror_error_backtrace_fprint(\n\t               (libcerror_error_t *) error,\n\t               stream );\n\n\treturn( print_count );\n}\n\n/* Prints a backtrace of the error to the string\n * The end-of-string character is not included in the return value\n * Returns the number of printed characters if successful or -1 on error\n */\nint libfsntfs_error_backtrace_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size )\n{\n\tint print_count = 0;\n\n\tprint_count = libcerror_error_backtrace_sprint(\n\t               (libcerror_error_t *) error,\n\t               string,\n\t               size );\n\n\treturn( print_count );\n}\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_error.h",
    "content": "/*\n * Error functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INTERNAL_ERROR_H )\n#define _LIBFSNTFS_INTERNAL_ERROR_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n#include <libfsntfs/error.h>\n#endif\n\n#include \"libfsntfs_extern.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\nLIBFSNTFS_EXTERN \\\nvoid libfsntfs_error_free(\n      libfsntfs_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_fprint(\n     libfsntfs_error_t *error,\n     FILE *stream );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_backtrace_fprint(\n     libfsntfs_error_t *error,\n     FILE *stream );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_error_backtrace_sprint(\n     libfsntfs_error_t *error,\n     char *string,\n     size_t size );\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INTERNAL_ERROR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_extent.c",
    "content": "/*\n * Extent functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_extent.h\"\n#include \"libfsntfs_libcerror.h\"\n\n/* Creates a extent\n * Make sure the value extent is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_extent_initialize(\n     libfsntfs_extent_t **extent,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_extent_initialize\";\n\n\tif( extent == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *extent != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid extent value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*extent = memory_allocate_structure(\n\t           libfsntfs_extent_t );\n\n\tif( *extent == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create extent.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *extent,\n\t     0,\n\t     sizeof( libfsntfs_extent_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear extent.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *extent );\n\n\t\t*extent = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *extent != NULL )\n\t{\n\t\tmemory_free(\n\t\t *extent );\n\n\t\t*extent = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a extent\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_extent_free(\n     libfsntfs_extent_t **extent,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_extent_free\";\n\n\tif( extent == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *extent != NULL )\n\t{\n\t\tmemory_free(\n\t\t *extent );\n\n\t\t*extent = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the extent values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_extent_get_values(\n     libfsntfs_extent_t *extent,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_extent_get_values\";\n\n\tif( extent == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( extent_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( extent_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( extent_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid extent flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*extent_offset = extent->start_offset;\n\t*extent_size   = extent->size;\n\t*extent_flags  = extent->range_flags;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_extent.h",
    "content": "/*\n * Extent functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_EXTENT_H )\n#define _LIBFSNTFS_EXTENT_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_extent libfsntfs_extent_t;\n\nstruct libfsntfs_extent\n{\n\t/* The start offset\n\t */\n\toff64_t start_offset;\n\n\t/* The size\n\t */\n\tsize64_t size;\n\n\t/* The range flags\n\t */\n\tuint32_t range_flags;\n};\n\nint libfsntfs_extent_initialize(\n     libfsntfs_extent_t **extent,\n     libcerror_error_t **error );\n\nint libfsntfs_extent_free(\n     libfsntfs_extent_t **extent,\n     libcerror_error_t **error );\n\nint libfsntfs_extent_get_values(\n     libfsntfs_extent_t *extent,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_EXTENT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_extern.h",
    "content": "/*\n * The internal extern definition\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INTERNAL_EXTERN_H )\n#define _LIBFSNTFS_INTERNAL_EXTERN_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFSNTFS for local use of libfsntfs\n */\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\n#include <libfsntfs/extern.h>\n\n#if defined( __CYGWIN__ ) || defined( __MINGW32__ )\n#define LIBFSNTFS_EXTERN_VARIABLE\textern\n#else\n#define LIBFSNTFS_EXTERN_VARIABLE\tLIBFSNTFS_EXTERN\n#endif\n\n#else\n#define LIBFSNTFS_EXTERN\t\t/* extern */\n#define LIBFSNTFS_EXTERN_VARIABLE\textern\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n#endif /* !defined( _LIBFSNTFS_INTERNAL_EXTERN_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_entry.c",
    "content": "/*\n * File entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_data_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_directory_entries_tree.h\"\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_extent.h\"\n#include \"libfsntfs_file_entry.h\"\n#include \"libfsntfs_file_name_attribute.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_reparse_point_attribute.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n#include \"libfsntfs_standard_information_values.h\"\n#include \"libfsntfs_types.h\"\n\n/* Creates a file entry\n * Make sure the value file_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_initialize(\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_file_system_t *file_system,\n     uint64_t mft_entry_index,\n     libfsntfs_directory_entry_t *directory_entry,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute           = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry     = NULL;\n\tlibfsntfs_mft_attribute_t *data_extents_attribute        = NULL;\n\tlibfsntfs_mft_attribute_t *wof_compressed_data_attribute = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry                         = NULL;\n\tstatic char *function                                    = \"libfsntfs_file_entry_initialize\";\n\tuint64_t base_record_file_reference                      = 0;\n\tuint32_t compression_method                              = 0;\n\tint result                                               = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = memory_allocate_structure(\n\t                       libfsntfs_internal_file_entry_t );\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_file_entry,\n\t     0,\n\t     sizeof( libfsntfs_internal_file_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_file_entry );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n\t     file_system,\n\t     file_io_handle,\n\t     mft_entry_index,\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) == 0 )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t\t          mft_entry,\n\t\t          &base_record_file_reference,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( result == 1 )\n\t\t && ( base_record_file_reference == 0 ) )\n\t\t{\n\t\t\tif( mft_entry->has_i30_index != 0 )\n\t\t\t{\n\t\t\t\tif( libfsntfs_directory_entries_tree_initialize(\n\t\t\t\t     &( internal_file_entry->directory_entries_tree ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create directory entries tree.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_directory_entries_tree_read_from_i30_index(\n\t\t\t\t     internal_file_entry->directory_entries_tree,\n\t\t\t\t     io_handle,\n\t\t\t\t     file_io_handle,\n\t\t\t\t     mft_entry,\n\t\t\t\t     flags,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read MFT entry: %\" PRIu32 \" directory entries tree.\",\n\t\t\t\t\t function,\n\t\t\t\t\t mft_entry->index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( mft_entry->data_attribute != NULL )\n\t\t\t{\n\t\t\t\tif( mft_entry->wof_compressed_data_attribute != NULL )\n\t\t\t\t{\n\t\t\t\t\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t\t\t\t\t\t  internal_file_entry,\n\t\t\t\t\t\t  mft_entry,\n\t\t\t\t\t\t  &reparse_point_attribute,\n\t\t\t\t\t\t  error );\n\n\t\t\t\t\tif( result == -1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\telse if( result != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( libfsntfs_reparse_point_attribute_get_compression_method(\n\t\t\t\t\t\t     reparse_point_attribute,\n\t\t\t\t\t\t     &compression_method,\n\t\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to retrieve compression method from $REPARSE_POINT attribute.\",\n\t\t\t\t\t\t\t function );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twof_compressed_data_attribute = mft_entry->wof_compressed_data_attribute;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( wof_compressed_data_attribute == NULL )\n\t\t\t\t{\n\t\t\t\t\tdata_extents_attribute = mft_entry->data_attribute;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdata_extents_attribute = wof_compressed_data_attribute;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_mft_attribute_get_data_extents_array(\n\t\t\t\t     data_extents_attribute,\n\t\t\t\t     io_handle,\n\t\t\t\t     &( internal_file_entry->extents_array ),\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create extents array.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_cluster_block_stream_initialize(\n\t\t\t\t     &( internal_file_entry->data_cluster_block_stream ),\n\t\t\t\t     io_handle,\n\t\t\t\t     mft_entry->data_attribute,\n\t\t\t\t     wof_compressed_data_attribute,\n\t\t\t\t     compression_method,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create data cluster block stream.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_file_entry->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_file_entry->io_handle       = io_handle;\n\tinternal_file_entry->file_io_handle  = file_io_handle;\n\tinternal_file_entry->file_system     = file_system;\n\tinternal_file_entry->mft_entry       = mft_entry;\n\tinternal_file_entry->directory_entry = directory_entry;\n\tinternal_file_entry->data_attribute  = mft_entry->data_attribute;\n\tinternal_file_entry->flags           = flags;\n\n\t*file_entry = (libfsntfs_file_entry_t *) internal_file_entry;\n\n\treturn( 1 );\n\non_error:\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\tif( internal_file_entry != NULL )\n\t{\n\t\tif( internal_file_entry->data_cluster_block_stream != NULL )\n\t\t{\n\t\t\tlibfdata_stream_free(\n\t\t\t &( internal_file_entry->data_cluster_block_stream ),\n\t\t\t NULL );\n\t\t}\n\t\tif( internal_file_entry->directory_entries_tree != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entries_tree_free(\n\t\t\t &( internal_file_entry->directory_entries_tree ),\n\t\t\t NULL );\n\t\t}\n\t\tif( internal_file_entry->extents_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( internal_file_entry->extents_array ),\n\t\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t internal_file_entry );\n\t}\n\treturn( -1 );\n}\n\n/* Frees a file entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_free(\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_free\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) *file_entry;\n\t\t*file_entry         = NULL;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( internal_file_entry->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\t/* The file_io_handle, io_handle and file_system references are freed elsewhere\n\t\t */\n\t\tif( internal_file_entry->data_cluster_block_stream != NULL )\n\t\t{\n\t\t\tif( libfdata_stream_free(\n\t\t\t     &( internal_file_entry->data_cluster_block_stream ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free data cluster block stream.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\t/* The reparse_point_attribute, security_descriptor_attribute and standard_information_attribute references are managed by the attributes_array\n\t\t */\n\t\tif( internal_file_entry->attributes_array != NULL )\n\t\t{\n\t\t\tif( libcdata_array_free(\n\t\t\t     &( internal_file_entry->attributes_array ),\n\t\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_internal_attribute_free,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attributes array.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( libcdata_array_free(\n\t\t     &( internal_file_entry->extents_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free extents array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( internal_file_entry->security_descriptor_values != NULL )\n\t\t{\n\t\t\tif( libfsntfs_security_descriptor_values_free(\n\t\t\t     &( internal_file_entry->security_descriptor_values ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free security descriptor values.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( internal_file_entry->directory_entries_tree != NULL )\n\t\t{\n\t\t\tif( libfsntfs_directory_entries_tree_free(\n\t\t\t     &( internal_file_entry->directory_entries_tree ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entries tree.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( internal_file_entry->directory_entry != NULL )\n\t\t{\n\t\t\tif( libfsntfs_directory_entry_free(\n\t\t\t     &( internal_file_entry->directory_entry ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( internal_file_entry->mft_entry != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_entry_free(\n\t\t\t     &( internal_file_entry->mft_entry ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free MFT entry.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t internal_file_entry );\n\t}\n\treturn( result );\n}\n\n/* Determines if the file entry is empty\n * Returns 1 if empty, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_is_empty(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_is_empty\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_is_empty(\n\t          internal_file_entry->mft_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if MFT entry is empty.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the file entry is allocated (MFT entry in use flag is set)\n * Returns 1 if allocated, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_is_allocated(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_is_allocated\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_is_allocated(\n\t          internal_file_entry->mft_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if MFT entry is allocated.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the file entry is corrupted\n * Returns 1 if corrupted, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_is_corrupted(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_is_corrupted\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_is_corrupted(\n\t          internal_file_entry->mft_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if MFT entry is corrupted.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves a specific attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_file_entry_get_attribute_by_index(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *safe_attribute    = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_internal_file_entry_get_attribute_by_index\";\n\tuint32_t attribute_type                  = 0;\n\tint number_of_attributes                 = 0;\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_file_entry->attributes_array == NULL )\n\t{\n\t\tif( libfsntfs_mft_entry_get_number_of_attributes(\n\t\t     mft_entry,\n\t\t     &number_of_attributes,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libcdata_array_initialize(\n\t\t     &( internal_file_entry->attributes_array ),\n\t\t     number_of_attributes,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create attributes array.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     internal_file_entry->attributes_array,\n\t     attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d from array.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tgoto on_error;\n\t}\n\tif( *attribute == NULL )\n\t{\n\t\tif( libfsntfs_mft_entry_get_attribute_by_index(\n\t\t     mft_entry,\n\t\t     attribute_index,\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d from MFT entry.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_type(\n\t\t     mft_attribute,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d type.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_attribute_initialize(\n\t\t     &safe_attribute,\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST )\n\t\t{\n\t\t\t( (libfsntfs_internal_attribute_t *) safe_attribute )->value = (intptr_t *) mft_entry->attribute_list;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( libfsntfs_internal_attribute_read_value(\n\t\t\t     (libfsntfs_internal_attribute_t *) safe_attribute,\n\t\t\t     internal_file_entry->io_handle,\n\t\t\t     internal_file_entry->file_io_handle,\n\t\t\t     internal_file_entry->flags,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read value of attribute: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( libcdata_array_set_entry_by_index(\n\t\t     internal_file_entry->attributes_array,\n\t\t     attribute_index,\n\t\t     (intptr_t *) safe_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set atribute: %d in array.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t*attribute = safe_attribute;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( safe_attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t\t (libfsntfs_internal_attribute_t **) &safe_attribute,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_file_entry_get_reparse_point_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_file_entry_get_reparse_point_attribute\";\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->reparse_point_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( internal_file_entry->reparse_point_attribute == NULL )\n\t{\n\t\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t\t     internal_file_entry,\n\t\t     mft_entry,\n\t\t     mft_entry->reparse_point_attribute_index,\n\t\t     &( internal_file_entry->reparse_point_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t function,\n\t\t\t mft_entry->reparse_point_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_file_entry->reparse_point_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the $SECURITY_DESCRIPTOR attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_file_entry_get_security_descriptor_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_file_entry_get_security_descriptor_attribute\";\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_file_entry->mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_file_entry->mft_entry->security_descriptor_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( internal_file_entry->security_descriptor_attribute == NULL )\n\t{\n\t\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t\t     internal_file_entry,\n\t\t     internal_file_entry->mft_entry,\n\t\t     internal_file_entry->mft_entry->security_descriptor_attribute_index,\n\t\t     &( internal_file_entry->security_descriptor_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t function,\n\t\t\t internal_file_entry->mft_entry->security_descriptor_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_file_entry->security_descriptor_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_file_entry_get_standard_information_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_file_entry_get_standard_information_attribute\";\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_file_entry->mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_file_entry->mft_entry->standard_information_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( internal_file_entry->standard_information_attribute == NULL )\n\t{\n\t\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t\t     internal_file_entry,\n\t\t     internal_file_entry->mft_entry,\n\t\t     internal_file_entry->mft_entry->standard_information_attribute_index,\n\t\t     &( internal_file_entry->standard_information_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t function,\n\t\t\t internal_file_entry->mft_entry->standard_information_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_file_entry->standard_information_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file reference\n * This value is retrieved from the MFT entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_file_reference\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_entry_get_file_reference(\n\t     internal_file_entry->mft_entry,\n\t     file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file reference from MFT entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the base record file reference\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_base_record_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_base_record_file_reference\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t          internal_file_entry->mft_entry,\n\t          file_reference,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve base record file reference from MFT entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the parent file reference\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_parent_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_parent_file_reference\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_parent_file_reference(\n\t\t          internal_file_entry->directory_entry,\n\t\t          parent_file_reference,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve parent reference from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the parent file reference for a specific $FILE_NAME attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_parent_file_reference_by_attribute_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n\telse if( libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          attribute,\n\t          parent_file_reference,\n\t          error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent reference from $FILE_NAME attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the journal sequence number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_journal_sequence_number(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_journal_sequence_number\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_entry_get_journal_sequence_number(\n\t     internal_file_entry->mft_entry,\n\t     journal_sequence_number,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve journal sequence number from MFT entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the creation date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_creation_time\";\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t          internal_file_entry,\n\t          &standard_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t     (intptr_t **) &standard_information_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve value from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( libfsntfs_standard_information_values_get_creation_time(\n\t\t          standard_information_values,\n\t\t          filetime,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve creation time from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the (file) modification (last written) date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_modification_time\";\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t          internal_file_entry,\n\t          &standard_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t     (intptr_t **) &standard_information_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( libfsntfs_standard_information_values_get_modification_time(\n\t\t          standard_information_values,\n\t\t          filetime,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve modification time from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the access date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_access_time\";\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t          internal_file_entry,\n\t          &standard_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t     (intptr_t **) &standard_information_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( libfsntfs_standard_information_values_get_access_time(\n\t\t          standard_information_values,\n\t\t          filetime,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve access time from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the (file system entry) modification date and time\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_entry_modification_time\";\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t          internal_file_entry,\n\t          &standard_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t     (intptr_t **) &standard_information_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( libfsntfs_standard_information_values_get_entry_modification_time(\n\t\t          standard_information_values,\n\t\t          filetime,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve entry modification time from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file attribute flags\n * This value is retrieved from the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_file_attribute_flags\";\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t          internal_file_entry,\n\t          &standard_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t     (intptr_t **) &standard_information_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( libfsntfs_standard_information_values_get_file_attribute_flags(\n\t\t          standard_information_values,\n\t\t          file_attribute_flags,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file attribute flags from standard information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file reference\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_file_reference\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_file_reference(\n\t\t          internal_file_entry->directory_entry,\n\t\t          file_reference,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file reference from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the creation date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_creation_time\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_creation_time(\n\t\t          internal_file_entry->directory_entry,\n\t\t          filetime,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve creation time from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the modification date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_modification_time\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_modification_time(\n\t\t          internal_file_entry->directory_entry,\n\t\t          filetime,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve modification time from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the access date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_access_time\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_access_time(\n\t\t          internal_file_entry->directory_entry,\n\t\t          filetime,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve access time from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the entry modification date and time\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_entry_modification_time\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_entry_modification_time(\n\t\t          internal_file_entry->directory_entry,\n\t\t          filetime,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve entry modification time from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_size(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_size\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_size(\n\t\t          internal_file_entry->directory_entry,\n\t\t          size,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file attribute flags\n * This value is retrieved from the $I30 $FILE_NAME directory entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_i30_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_i30_file_attribute_flags\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_file_attribute_flags(\n\t\t          internal_file_entry->directory_entry,\n\t\t          file_attribute_flags,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file attribute flags from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_name_size\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_utf8_name_size(\n\t\t          internal_file_entry->directory_entry,\n\t\t          utf8_string_size,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 name from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t\t          internal_file_entry->directory_entry,\n\t\t          utf8_string,\n\t\t          utf8_string_size,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 name from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_name_size\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_utf16_name_size(\n\t\t          internal_file_entry->directory_entry,\n\t\t          utf16_string_size,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-16 name from directory.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * This value is retrieved from the directory entry $FILE_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t\t          internal_file_entry->directory_entry,\n\t\t          utf16_string,\n\t\t          utf16_string_size,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 name from directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the $FILE_NAME attribute index\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_name_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int *attribute_index,\n     libcerror_error_t **error )\n{\n\tuint8_t lookup_name_root[ 2 ]                        = { '.', 0 };\n\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tuint8_t *lookup_name                                 = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_name_attribute_index\";\n\tsize_t lookup_name_size                              = 0;\n\tuint64_t lookup_parent_file_reference                = 0;\n\tuint32_t attribute_type                              = 0;\n\tuint8_t lookup_name_space                            = 0;\n\tint number_of_attributes                             = 0;\n\tint safe_attribute_index                             = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( attribute_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute index\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO add thread lock suport */\n\n\tif( internal_file_entry->directory_entry == NULL )\n\t{\n\t\tlookup_name       = lookup_name_root;\n\t\tlookup_name_size  = 2;\n\t\tlookup_name_space = LIBFSNTFS_FILE_NAME_SPACE_DOS_WINDOWS;\n\t}\n\telse\n\t{\n\t\tif( internal_file_entry->directory_entry->file_name_values == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: invalid file entry - invalid directory entry - missing file name values.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tlookup_name                  = internal_file_entry->directory_entry->file_name_values->name;\n\t\tlookup_name_size             = internal_file_entry->directory_entry->file_name_values->name_size;\n\t\tlookup_name_space            = internal_file_entry->directory_entry->file_name_values->name_space;\n\t\tlookup_parent_file_reference = internal_file_entry->directory_entry->file_name_values->parent_file_reference;\n\t}\n\tif( libfsntfs_mft_entry_get_number_of_attributes(\n\t     internal_file_entry->mft_entry,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( safe_attribute_index = 0;\n\t     safe_attribute_index < number_of_attributes;\n\t     safe_attribute_index++ )\n\t{\n\t\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t\t     internal_file_entry,\n\t\t     internal_file_entry->mft_entry,\n\t\t     safe_attribute_index,\n\t\t     &attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t function,\n\t\t\t safe_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_attribute_get_type(\n\t\t     attribute,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d type.\",\n\t\t\t function,\n\t\t\t safe_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) attribute,\n\t\t     (intptr_t **) &file_name_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d value.\",\n\t\t\t function,\n\t\t\t safe_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( ( lookup_parent_file_reference == file_name_values->parent_file_reference )\n\t\t && ( lookup_name_space == file_name_values->name_space )\n\t\t && ( lookup_name_size == file_name_values->name_size )\n\t\t && ( memory_compare(\n\t\t       lookup_name,\n\t\t       file_name_values->name,\n\t\t       file_name_values->name_size ) == 0 ) )\n\t\t{\n\t\t\t*attribute_index = safe_attribute_index;\n\n\t\t\treturn( 1 );\n\t\t}\n\t}\n\treturn( 0 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_name_size_by_attribute_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n\telse if( libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          utf8_string_size,\n\t          error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 name from $FILE_NAME attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name for a specific $FILE_NAME attribute\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_name_by_attribute_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n\telse if( libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_string,\n\t          utf8_string_size,\n\t          error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name from $FILE_NAME attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name for a specific $FILE_NAME attribute\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_name_size_by_attribute_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n\telse if( libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          utf16_string_size,\n\t          error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 name from $FILE_NAME attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name for a specific $FILE_NAME attribute\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute                     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_name_by_attribute_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n\telse if( libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_string,\n\t          utf16_string_size,\n\t          error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name from $FILE_NAME attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the path hint for a specific $FILE_NAME attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_file_entry_get_path_hint(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     int attribute_index,\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *attribute               = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tlibfsntfs_path_hint_t *parent_path_hint        = NULL;\n\tlibfsntfs_path_hint_t *safe_path_hint          = NULL;\n\tuint8_t *parent_path                           = NULL;\n\tstatic char *function                          = \"libfsntfs_internal_file_entry_get_path_hint\";\n\tsize_t name_size                               = 0;\n\tsize_t parent_path_size                        = 0;\n\tuint64_t file_reference                        = 0;\n\tuint64_t mft_entry_index                       = 0;\n\tuint64_t parent_file_reference                 = 0;\n\tuint64_t parent_mft_entry_index                = 0;\n\tint result                                     = 0;\n\n\tif( internal_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO cache path hint in attribute */\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     &attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tgoto on_error;\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing attribute?: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tgoto on_error;\n\t}\n\tif( ( (libfsntfs_internal_attribute_t *) attribute )->path_hint == NULL )\n\t{\n\t\tif( libfsntfs_mft_entry_get_file_reference(\n\t\t     internal_file_entry->mft_entry,\n\t\t     &file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file reference from MFT entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmft_entry_index = file_reference & 0xffffffffffffUL;\n\n\t\tif( libfsntfs_file_name_attribute_get_parent_file_reference(\n\t\t     attribute,\n\t\t     &parent_file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve parent reference from $FILE_NAME attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tparent_mft_entry_index = parent_file_reference & 0xffffffffffffUL;\n\n\t\tparent_path      = NULL;\n\t\tparent_path_size = 0;\n\n\t\tif( ( mft_entry_index != LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY )\n\t\t && ( parent_mft_entry_index == LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY ) )\n\t\t{\n\t\t\tparent_path      = (uint8_t *) \"\";\n\t\t\tparent_path_size = 1;\n\t\t}\n\t\telse if( ( parent_mft_entry_index != 0 )\n\t\t      && ( parent_mft_entry_index != mft_entry_index ) )\n\t\t{\n\t\t\tresult = libfsntfs_file_system_get_path_hint(\n\t\t\t          internal_file_entry->file_system,\n\t\t\t          internal_file_entry->file_io_handle,\n\t\t\t          parent_file_reference,\n\t\t\t          &parent_path_hint,\n\t\t\t          0,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve path hint for MFT entry: %\" PRIu64 \".\",\n\t\t\t\t function,\n\t\t\t\t parent_mft_entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result == 0 )\n\t\t\t{\n\t\t\t\tparent_path      = (uint8_t *) \"$Orphan\";\n\t\t\t\tparent_path_size = 8;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparent_path      = parent_path_hint->path;\n\t\t\t\tparent_path_size = parent_path_hint->path_size;\n\t\t\t}\n\t\t}\n\t\tif( libfsntfs_file_name_attribute_get_utf8_name_size(\n\t\t     attribute,\n\t\t     &name_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 name from $FILE_NAME attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_path_hint_initialize(\n\t\t     &safe_path_hint,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create path hint.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_path_hint->file_reference = file_reference;\n\t\tsafe_path_hint->path_size      = parent_path_size + name_size;\n\n\t\tsafe_path_hint->path = (uint8_t *) memory_allocate(\n\t\t\t\t\t\t    sizeof( uint8_t ) * safe_path_hint->path_size );\n\n\t\tif( safe_path_hint->path == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create path.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( parent_path != NULL )\n\t\t && ( parent_path_size > 0 ) )\n\t\t{\n\t\t\tif( memory_copy(\n\t\t\t     safe_path_hint->path,\n\t\t\t     parent_path,\n\t\t\t     parent_path_size ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy parent path to path.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tsafe_path_hint->path[ parent_path_size - 1 ] = '\\\\';\n\t\t}\n\t\tif( name_size > 0 )\n\t\t{\n\t\t\tif( libfsntfs_file_name_attribute_get_utf8_name(\n\t\t\t     attribute,\n\t\t\t     &( safe_path_hint->path[ parent_path_size ] ),\n\t\t\t     name_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve UTF-8 name from $FILE_NAME attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( mft_entry_index == LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY )\n\t\t{\n\t\t\tsafe_path_hint->path[ 0 ] = '\\\\';\n\t\t}\n\t\t( (libfsntfs_internal_attribute_t *) attribute )->path_hint = safe_path_hint;\n\t}\n\t*path_hint = ( (libfsntfs_internal_attribute_t *) attribute )->path_hint;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_path_hint != NULL )\n\t{\n\t\tlibfsntfs_path_hint_free(\n\t\t &safe_path_hint,\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded path hint for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_path_hint_t *path_hint                     = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_path_hint_size\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_path_hint(\n\t     internal_file_entry,\n\t     attribute_index,\n\t     &path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve path hint.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_path_hint_get_utf8_path_size(\n\t\t     path_hint,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 path hint.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded path hint\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_path_hint_t *path_hint                     = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_path_hint\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_path_hint(\n\t     internal_file_entry,\n\t     attribute_index,\n\t     &path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve path hint.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_path_hint_get_utf8_path(\n\t\t     path_hint,\n\t\t     utf8_string,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 path hint.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded path hint for a specific $FILE_NAME attribute\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_path_hint_t *path_hint                     = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_path_hint_size\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_path_hint(\n\t     internal_file_entry,\n\t     attribute_index,\n\t     &path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve path hint.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_path_hint_get_utf16_path_size(\n\t\t     path_hint,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-16 path hint.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded path hint\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_path_hint_t *path_hint                     = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_path_hint\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_path_hint(\n\t     internal_file_entry,\n\t     attribute_index,\n\t     &path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve path hint.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_path_hint_get_utf16_path(\n\t\t     path_hint,\n\t\t     utf16_string,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 path hint.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded symbolic link target\n * The returned size includes the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_symbolic_link_target_size\";\n\tuint32_t reparse_point_tag\t\t\t     = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t          internal_file_entry,\n\t          internal_file_entry->mft_entry,\n\t          &reparse_point_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t\t          reparse_point_attribute,\n\t\t          &reparse_point_tag,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 substitute name from reparse point attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( reparse_point_tag == 0xa000000c )\n\t\t{\n\t\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t\t\t          reparse_point_attribute,\n\t\t\t          utf8_string_size,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve size of UTF-8 substitute name from reparse point attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded symbolic link target\n * The size should include the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf8_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf8_symbolic_link_target\";\n\tuint32_t reparse_point_tag\t\t\t     = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t          internal_file_entry,\n\t          internal_file_entry->mft_entry,\n\t          &reparse_point_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t\t          reparse_point_attribute,\n\t\t          &reparse_point_tag,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 substitute name from reparse point attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( reparse_point_tag == 0xa000000c )\n\t\t{\n\t\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t\t\t  reparse_point_attribute,\n\t\t\t\t  utf8_string,\n\t\t\t\t  utf8_string_size,\n\t\t\t\t  error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve UTF-8 substitute name from reparse point attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded symbolic link target\n * The returned size includes the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_symbolic_link_target_size\";\n\tuint32_t reparse_point_tag\t\t\t     = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t          internal_file_entry,\n\t          internal_file_entry->mft_entry,\n\t          &reparse_point_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t\t          reparse_point_attribute,\n\t\t          &reparse_point_tag,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 substitute name from reparse point attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( reparse_point_tag == 0xa000000c )\n\t\t{\n\t\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n\t\t\t\t  reparse_point_attribute,\n\t\t\t\t  utf16_string_size,\n\t\t\t\t  error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve size of UTF-16 substitute name from reparse point attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded symbolic link target\n * The size should include the end of string character\n * This value is retrieved from a symbolic link $REPARSE_POINT attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_utf16_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_utf16_symbolic_link_target\";\n\tuint32_t reparse_point_tag\t\t\t     = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t          internal_file_entry,\n\t          internal_file_entry->mft_entry,\n\t          &reparse_point_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t\t          reparse_point_attribute,\n\t\t          &reparse_point_tag,\n\t\t          error );\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 substitute name from reparse point attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( reparse_point_tag == 0xa000000c )\n\t\t{\n\t\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t\t\t\t  reparse_point_attribute,\n\t\t\t\t  utf16_string,\n\t\t\t\t  utf16_string_size,\n\t\t\t\t  error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve UTF-16 substitute name from reparse point attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the security descriptor (data) size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_security_descriptor_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *security_descriptor_attribute                 = NULL;\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_security_descriptor_size\";\n\tuint32_t security_descriptor_identifier                              = 0;\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n/* TODO add thread lock suport */\n\n\tresult = libfsntfs_internal_file_entry_get_security_descriptor_attribute(\n\t          internal_file_entry,\n\t          &security_descriptor_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) security_descriptor_attribute,\n\t\t     (intptr_t **) &security_descriptor_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor attribute value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t\t          internal_file_entry,\n\t\t          &standard_information_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( internal_file_entry->security_descriptor_values == NULL )\n\t\t{\n\t\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t\t     (intptr_t **) &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_get_security_descriptor_identifier(\n\t\t\t     standard_information_values,\n\t\t\t     &security_descriptor_identifier,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve security descriptor identifier from standard information attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tresult = libfsntfs_file_system_get_security_descriptor_values_by_identifier(\n\t\t\t          internal_file_entry->file_system,\n\t\t\t          internal_file_entry->file_io_handle,\n\t\t\t          security_descriptor_identifier,\n\t\t\t          &( internal_file_entry->security_descriptor_values ),\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve security descriptor from index for identifier: %\" PRIu32 \".\",\n\t\t\t\t function,\n\t\t\t\t security_descriptor_identifier );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result == 0 )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\t/* file_entry takes over management of security_descriptor_values\n\t\t\t */\n\t\t}\n\t\tsecurity_descriptor_values = internal_file_entry->security_descriptor_values;\n\t}\n\tresult = libfsntfs_security_descriptor_values_get_data_size(\n\t          security_descriptor_values,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( internal_file_entry->security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &( internal_file_entry->security_descriptor_values ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the security descriptor (data)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_entry_get_security_descriptor(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *security_descriptor_attribute                 = NULL;\n\tlibfsntfs_attribute_t *standard_information_attribute                = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry                 = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_file_entry_get_security_descriptor\";\n\tuint32_t security_descriptor_identifier                              = 0;\n\tint result                                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n/* TODO add thread lock suport */\n\n\tresult = libfsntfs_internal_file_entry_get_security_descriptor_attribute(\n\t          internal_file_entry,\n\t          &security_descriptor_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t     (libfsntfs_internal_attribute_t *) security_descriptor_attribute,\n\t\t     (intptr_t **) &security_descriptor_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor attribute value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = libfsntfs_internal_file_entry_get_standard_information_attribute(\n\t\t          internal_file_entry,\n\t\t          &standard_information_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve standard information attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( internal_file_entry->security_descriptor_values == NULL )\n\t\t{\n\t\t\tif( libfsntfs_internal_attribute_get_value(\n\t\t\t     (libfsntfs_internal_attribute_t *) standard_information_attribute,\n\t\t\t     (intptr_t **) &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve standard information attribute value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_get_security_descriptor_identifier(\n\t\t\t     standard_information_values,\n\t\t\t     &security_descriptor_identifier,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve security descriptor identifier from standard information attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tresult = libfsntfs_file_system_get_security_descriptor_values_by_identifier(\n\t\t\t          internal_file_entry->file_system,\n\t\t\t          internal_file_entry->file_io_handle,\n\t\t\t          security_descriptor_identifier,\n\t\t\t          &( internal_file_entry->security_descriptor_values ),\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve security descriptor from index for identifier: %\" PRIu32 \".\",\n\t\t\t\t function,\n\t\t\t\t security_descriptor_identifier );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( result == 0 )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\t/* file_entry takes over management of security_descriptor_values\n\t\t\t */\n\t\t}\n\t\tsecurity_descriptor_values = internal_file_entry->security_descriptor_values;\n\t}\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          data,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( internal_file_entry->security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &( internal_file_entry->security_descriptor_values ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of attributes\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_number_of_attributes(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_number_of_attributes\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_entry_get_number_of_attributes(\n\t     internal_file_entry->mft_entry,\n\t     number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the attribute for the specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_attribute_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_attribute_by_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_internal_file_entry_get_attribute_by_index(\n\t     internal_file_entry,\n\t     internal_file_entry->mft_entry,\n\t     attribute_index,\n\t     attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the file entry has a $I30 entry\n * Returns 1 if the file entry has a $I30 entry, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_has_i30_entry(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_has_i30_entry\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->directory_entry != NULL )\n\t{\n\t\tresult = 1;\n\t}\n\treturn( result );\n}\n\n/* Determines if the file entry has the directory entries ($I30) index\n * Returns 1 if the file entry has a directory entries index, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_has_directory_entries_index(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_has_directory_entries_index\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_has_directory_entries_index(\n\t          internal_file_entry->mft_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if MFT entry has an directory entries index.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the file entry has a default data stream (nameless $DATA attribute)\n * Returns 1 if the file entry has a default data stream, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_has_default_data_stream(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_has_default_data_stream\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->mft_entry->data_attribute != NULL )\n\t{\n\t\tresult = 1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the file entry is a symbolic link\n * Returns 1 if the file entry is a symbolic link, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_is_symbolic_link(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *reparse_point_attribute       = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_is_symbolic_link\";\n\tuint32_t reparse_point_tag                           = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_file_entry_get_reparse_point_attribute(\n\t          internal_file_entry,\n\t          internal_file_entry->mft_entry,\n\t          &reparse_point_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve reparse point attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_reparse_point_attribute_get_tag(\n\t\t     reparse_point_attribute,\n\t\t     &reparse_point_tag,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve tag from reparse point attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( reparse_point_tag == 0xa000000cUL )\n\t\t{\n\t\t\tresult = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the number of alternate data streams\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_number_of_alternate_data_streams(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_alternate_data_streams,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_number_of_alternate_data_streams\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n\t     internal_file_entry->mft_entry,\n\t     number_of_alternate_data_streams,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of alternate data attributes.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the alternate data stream for the specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_alternate_data_stream_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int alternate_data_stream_index,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute            = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_alternate_data_stream_by_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( alternate_data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid alternate data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *alternate_data_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid alternate data stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n\t     internal_file_entry->mft_entry,\n\t     alternate_data_stream_index,\n\t     &data_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve alternate data attribute: %d.\",\n\t\t function,\n\t\t alternate_data_stream_index );\n\n\t\tresult = -1;\n\t}\n\tif( result == 1 )\n\t{\n\t\tif( libfsntfs_data_stream_initialize(\n\t\t     alternate_data_stream,\n\t\t     internal_file_entry->io_handle,\n\t\t     internal_file_entry->file_io_handle,\n\t\t     data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create alternate data stream: %d.\",\n\t\t\t function,\n\t\t\t alternate_data_stream_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if there is an alternate data stream for an UTF-8 encoded name\n * Returns 1 if available, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute            = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n\t          internal_file_entry->mft_entry,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          &data_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve alternate data attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if there is an alternate data stream for an UTF-8 encoded name\n * Returns 1 if available, 0 if not or -1 on error\n */\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute            = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name(\n\t          internal_file_entry->mft_entry,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          &data_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve alternate data attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the alternate data stream for an UTF-8 encoded name\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute            = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( alternate_data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid alternate data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *alternate_data_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid alternate data stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n\t          internal_file_entry->mft_entry,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          &data_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve alternate data attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_data_stream_initialize(\n\t\t     alternate_data_stream,\n\t\t     internal_file_entry->io_handle,\n\t\t     internal_file_entry->file_io_handle,\n\t\t     data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create alternate data stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the alternate data stream for an UTF-16 encoded name\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute            = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name\";\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( alternate_data_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid alternate data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *alternate_data_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid alternate data stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name(\n\t          internal_file_entry->mft_entry,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          &data_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve alternate data attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_data_stream_initialize(\n\t\t     alternate_data_stream,\n\t\t     internal_file_entry->io_handle,\n\t\t     internal_file_entry->file_io_handle,\n\t\t     data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create alternate data stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the number of sub file entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_number_of_sub_file_entries(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_sub_file_entries,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_number_of_sub_file_entries\";\n\tint result                                           = 1;\n\tint safe_number_of_sub_file_entries                  = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( number_of_sub_file_entries == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of sub file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->directory_entries_tree != NULL )\n\t{\n\t\tif( libfsntfs_directory_entries_tree_get_number_of_entries(\n\t\t     internal_file_entry->directory_entries_tree,\n\t\t     &safe_number_of_sub_file_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of entries from directory entries tree.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*number_of_sub_file_entries = safe_number_of_sub_file_entries;\n\t}\n\treturn( result );\n}\n\n/* Retrieves the sub file entry for the specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_sub_file_entry_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int sub_file_entry_index,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *sub_directory_entry     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_sub_file_entry_by_index\";\n\tuint64_t mft_entry_index                             = 0;\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( sub_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid sub file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sub_file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid sub file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_directory_entries_tree_get_entry_by_index(\n\t     internal_file_entry->directory_entries_tree,\n\t     internal_file_entry->file_io_handle,\n\t     sub_file_entry_index,\n\t     &sub_directory_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from directory entries tree.\",\n\t\t function,\n\t\t sub_file_entry_index );\n\n\t\tresult = -1;\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_directory_entry_get_mft_entry_index(\n\t\t     sub_directory_entry,\n\t\t     &mft_entry_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry index.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\t/* sub_file_entry takes over management of sub_directory_entry\n\t\t */\n\t\telse if( libfsntfs_file_entry_initialize(\n\t\t\t  sub_file_entry,\n\t\t\t  internal_file_entry->io_handle,\n\t\t\t  internal_file_entry->file_io_handle,\n\t\t\t  internal_file_entry->file_system,\n\t\t\t  mft_entry_index,\n\t\t\t  sub_directory_entry,\n\t\t\t  internal_file_entry->flags,\n\t\t\t  error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create sub file entry: %d with MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t sub_file_entry_index,\n\t\t\t mft_entry_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tif( sub_directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &sub_directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Retrieves the sub file entry for an UTF-8 encoded name\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_file_entry_get_sub_file_entry_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *sub_directory_entry     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_sub_file_entry_by_utf8_name\";\n\tuint64_t mft_entry_index                             = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( sub_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid sub file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sub_file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid sub file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t          internal_file_entry->directory_entries_tree,\n\t          internal_file_entry->file_io_handle,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          &sub_directory_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve directory entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_directory_entry_get_mft_entry_index(\n\t\t     sub_directory_entry,\n\t\t     &mft_entry_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry index.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\t/* sub_file_entry takes over management of sub_directory_entry\n\t\t */\n\t\telse if( libfsntfs_file_entry_initialize(\n\t\t          sub_file_entry,\n\t\t          internal_file_entry->io_handle,\n\t\t          internal_file_entry->file_io_handle,\n\t\t          internal_file_entry->file_system,\n\t\t          mft_entry_index,\n\t\t          sub_directory_entry,\n\t\t          internal_file_entry->flags,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create sub file entry with MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tif( sub_directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &sub_directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Retrieves the sub file entry for an UTF-16 encoded name\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_file_entry_get_sub_file_entry_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *sub_directory_entry     = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_sub_file_entry_by_utf16_name\";\n\tuint64_t mft_entry_index                             = 0;\n\tint result                                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( sub_file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid sub file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sub_file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid sub file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t          internal_file_entry->directory_entries_tree,\n\t          internal_file_entry->file_io_handle,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          &sub_directory_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve directory entry.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_directory_entry_get_mft_entry_index(\n\t\t     sub_directory_entry,\n\t\t     &mft_entry_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry index.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\t/* sub_file_entry takes over management of sub_directory_entry\n\t\t */\n\t\telse if( libfsntfs_file_entry_initialize(\n\t\t          sub_file_entry,\n\t\t          internal_file_entry->io_handle,\n\t\t          internal_file_entry->file_io_handle,\n\t\t          internal_file_entry->file_system,\n\t\t          mft_entry_index,\n\t\t          sub_directory_entry,\n\t\t          internal_file_entry->flags,\n\t\t          error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create sub file entry with MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tif( sub_directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &sub_directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Reads data at the current offset from the default data stream (nameless $DATA attribute)\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_file_entry_read_buffer(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_read_buffer\";\n\tssize_t read_count                                   = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tread_count = libfdata_stream_read_buffer(\n\t              internal_file_entry->data_cluster_block_stream,\n\t              (intptr_t *) internal_file_entry->file_io_handle,\n\t              buffer,\n\t              buffer_size,\n\t              0,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from data cluster block stream.\",\n\t\t function );\n\n\t\tread_count = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( read_count );\n}\n\n/* Reads data at a specific offset from the default data stream (nameless $DATA attribute)\n * Returns the number of bytes read or -1 on error\n */\nssize_t libfsntfs_file_entry_read_buffer_at_offset(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_read_buffer_at_offset\";\n\tssize_t read_count                                   = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tread_count = libfdata_stream_read_buffer_at_offset(\n\t              internal_file_entry->data_cluster_block_stream,\n\t              (intptr_t *) internal_file_entry->file_io_handle,\n\t              buffer,\n\t              buffer_size,\n\t              offset,\n\t              0,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from data cluster block stream.\",\n\t\t function );\n\n\t\tread_count = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( read_count );\n}\n\n/* Seeks a certain offset in the default data stream (nameless $DATA attribute)\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t libfsntfs_file_entry_seek_offset(\n         libfsntfs_file_entry_t *file_entry,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_seek_offset\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\toffset = libfdata_stream_seek_offset(\n\t          internal_file_entry->data_cluster_block_stream,\n\t          offset,\n\t          whence,\n\t          error );\n\n\tif( offset == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek offset in data cluster block stream.\",\n\t\t function );\n\n\t\toffset = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( offset );\n}\n\n/* Retrieves the current offset of the default data stream (nameless $DATA attribute)\n * Returns the offset if successful or -1 on error\n */\nint libfsntfs_file_entry_get_offset(\n     libfsntfs_file_entry_t *file_entry,\n     off64_t *offset,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_offset\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( internal_file_entry->data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file entry - missing data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfdata_stream_get_offset(\n\t     internal_file_entry->data_cluster_block_stream,\n\t     offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve offset from data cluster block stream.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_size(\n     libfsntfs_file_entry_t *file_entry,\n     size64_t *size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_size\";\n\tsize64_t safe_size                                   = 0;\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->data_cluster_block_stream != NULL )\n\t{\n\t\tif( libfdata_stream_get_size(\n\t\t     internal_file_entry->data_cluster_block_stream,\n\t\t     &safe_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data attribute data size.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*size = safe_size;\n\t}\n\treturn( result );\n}\n\n/* Retrieves the number of extents (decoded data runs) of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_number_of_extents(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_extents,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_number_of_extents\";\n\tint result                                           = 1;\n\tint safe_number_of_extents                           = 0;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n\tif( number_of_extents == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of extents.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( internal_file_entry->extents_array != NULL )\n\t{\n\t\tif( libcdata_array_get_number_of_entries(\n\t\t     internal_file_entry->extents_array,\n\t\t     &safe_number_of_extents,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of extents.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == 1 )\n\t{\n\t\t*number_of_extents = safe_number_of_extents;\n\t}\n\treturn( result );\n}\n\n/* Retrieves a specific extent (decoded data run) of the default data stream (nameless $DATA attribute)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_entry_get_extent_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_extent_t *data_extent                      = NULL;\n\tlibfsntfs_internal_file_entry_t *internal_file_entry = NULL;\n\tstatic char *function                                = \"libfsntfs_file_entry_get_extent_by_index\";\n\tint result                                           = 1;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_file_entry = (libfsntfs_internal_file_entry_t *) file_entry;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libcdata_array_get_entry_by_index(\n\t     internal_file_entry->extents_array,\n\t     extent_index,\n\t     (intptr_t **) &data_extent,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve extent: %d.\",\n\t\t function,\n\t\t extent_index );\n\n\t\tresult = -1;\n\t}\n\tif( result == 1 )\n\t{\n\t\tif( libfsntfs_extent_get_values(\n\t\t     data_extent,\n\t\t     extent_offset,\n\t\t     extent_size,\n\t\t     extent_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve extent: %d values.\",\n\t\t\t function,\n\t\t\t extent_index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_file_entry->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_entry.h",
    "content": "/*\n * File entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FILE_ENTRY_H )\n#define _LIBFSNTFS_FILE_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entries_tree.h\"\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_volume.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_file_entry libfsntfs_internal_file_entry_t;\n\nstruct libfsntfs_internal_file_entry\n{\n\t/* The IO handle\n\t */\n\tlibfsntfs_io_handle_t *io_handle;\n\n\t/* The file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* The file system\n\t */\n\tlibfsntfs_file_system_t *file_system;\n\n\t/* The MFT entry\n\t */\n\tlibfsntfs_mft_entry_t *mft_entry;\n\n\t/* The directory entry\n\t */\n\tlibfsntfs_directory_entry_t *directory_entry;\n\n\t/* The directory entries tree\n\t */\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree;\n\n\t/* The security descriptor values\n\t */\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values;\n\n\t/* The default (nameless) $DATA attribute\n\t */\n\tlibfsntfs_mft_attribute_t *data_attribute;\n\n\t/* The data extents array\n\t */\n\tlibcdata_array_t *extents_array;\n\n\t/* The attributes array\n\t */\n\tlibcdata_array_t *attributes_array;\n\n\t/* The reparse point ($REPARSE_POINT) attribute\n\t */\n\tlibfsntfs_attribute_t *reparse_point_attribute;\n\n\t/* The security descriptor ($SECURITY_DESCRIPTOR) attribute\n\t */\n\tlibfsntfs_attribute_t *security_descriptor_attribute;\n\n\t/* The standard information ($STANDARD_INFORMATION) attribute\n\t */\n\tlibfsntfs_attribute_t *standard_information_attribute;\n\n\t/* The default (nameless) $DATA attribute cluster block stream\n\t */\n\tlibfdata_stream_t *data_cluster_block_stream;\n\n\t/* The flags\n\t */\n\tuint8_t flags;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nint libfsntfs_file_entry_initialize(\n     libfsntfs_file_entry_t **file_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_file_system_t *file_system,\n     uint64_t mft_entry_index,\n     libfsntfs_directory_entry_t *directory_entry,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_free(\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_empty(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_allocated(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_corrupted(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_file_entry_get_attribute_by_index(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_file_entry_get_reparse_point_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_file_entry_get_security_descriptor_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_file_entry_get_standard_information_attribute(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_base_record_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_parent_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_journal_sequence_number(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_file_reference(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_creation_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_access_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_size(\n     libfsntfs_file_entry_t *file_entry,\n     uint64_t *size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_i30_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_name_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int *attribute_index,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_file_entry_get_path_hint(\n     libfsntfs_internal_file_entry_t *internal_file_entry,\n     int attribute_index,\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_path_hint_size(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_path_hint(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf8_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_utf16_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_security_descriptor_size(\n     libfsntfs_file_entry_t *file_entry,\n     size_t *data_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_security_descriptor(\n     libfsntfs_file_entry_t *file_entry,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_attributes(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_attribute_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int attribute_index,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_directory_entries_index(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_default_data_stream(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_i30_entry(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_is_symbolic_link(\n     libfsntfs_file_entry_t *file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_alternate_data_streams(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_alternate_data_streams,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int alternate_data_stream_index,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_data_stream_t **alternate_data_stream,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_sub_file_entries(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_sub_entries,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int sub_file_entry_index,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_utf8_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_sub_file_entry_by_utf16_name(\n     libfsntfs_file_entry_t *file_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **sub_file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_file_entry_read_buffer(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_file_entry_read_buffer_at_offset(\n         libfsntfs_file_entry_t *file_entry,\n         void *buffer,\n         size_t buffer_size,\n         off64_t offset,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\noff64_t libfsntfs_file_entry_seek_offset(\n         libfsntfs_file_entry_t *file_entry,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_offset(\n     libfsntfs_file_entry_t *file_entry,\n     off64_t *offset,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_size(\n     libfsntfs_file_entry_t *file_entry,\n     size64_t *size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_number_of_extents(\n     libfsntfs_file_entry_t *file_entry,\n     int *number_of_extents,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_entry_get_extent_by_index(\n     libfsntfs_file_entry_t *file_entry,\n     int extent_index,\n     off64_t *extent_offset,\n     size64_t *extent_size,\n     uint32_t *extent_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FILE_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_name_attribute.c",
    "content": "/*\n * File name attribute ($FILE_NAME) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_name_attribute.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the parent file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_parent_file_reference(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_parent_file_reference\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_parent_file_reference(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     parent_file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_creation_time\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_creation_time(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the (file) modification (last written) date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_modification_time\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_modification_time(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_access_time\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_access_time(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the (file system entry) modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_entry_modification_time\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_entry_modification_time(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     filetime,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_file_attribute_flags\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_file_attribute_flags(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     file_attribute_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the name space\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_name_space(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *name_space,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_name_space\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_name_space(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     name_space,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve name space.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_utf8_name_size\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf8_name_size(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_utf8_name\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf8_name(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_utf16_name_size\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf16_name_size(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_file_name_attribute_get_utf16_name\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_get_utf16_name(\n\t     (libfsntfs_file_name_values_t *) internal_attribute->value,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_name_attribute.h",
    "content": "/*\n * File name attribute ($FILE_NAME) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FILE_NAME_ATTRIBUTE_H )\n#define _LIBFSNTFS_FILE_NAME_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_parent_file_reference(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_name_space(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *name_space,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_file_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FILE_NAME_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_name_values.c",
    "content": "/*\n * File name attribute ($FILE_NAME) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdatetime.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_name.h\"\n\n#include \"fsntfs_file_name.h\"\n\n/* Creates file name values\n * Make sure the value file_name_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_initialize(\n     libfsntfs_file_name_values_t **file_name_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_initialize\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_name_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file name values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_name_values = memory_allocate_structure(\n\t                     libfsntfs_file_name_values_t );\n\n\tif( *file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *file_name_values,\n\t     0,\n\t     sizeof( libfsntfs_file_name_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *file_name_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *file_name_values );\n\n\t\t*file_name_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees file name values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_free(\n     libfsntfs_file_name_values_t **file_name_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_free\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_name_values != NULL )\n\t{\n\t\tif( ( *file_name_values )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *file_name_values )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *file_name_values );\n\n\t\t*file_name_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Clones file name values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_clone(\n     libfsntfs_file_name_values_t **destination_file_name_values,\n     libfsntfs_file_name_values_t *source_file_name_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_clone\";\n\n\tif( destination_file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_file_name_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid destination file name values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( source_file_name_values == NULL )\n\t{\n\t\t*destination_file_name_values = source_file_name_values;\n\n\t\treturn( 1 );\n\t}\n\t*destination_file_name_values = memory_allocate_structure(\n\t                                 libfsntfs_file_name_values_t );\n\n\tif( *destination_file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create destination file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_copy(\n\t     *destination_file_name_values,\n\t     source_file_name_values,\n\t     sizeof( libfsntfs_file_name_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to copy source file name values to destination.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *destination_file_name_values )->name      = NULL;\n\t( *destination_file_name_values )->name_size = 0;\n\n\tif( libfsntfs_file_name_values_set_name(\n\t     *destination_file_name_values,\n\t     source_file_name_values->name,\n\t     source_file_name_values->name_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set destination name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *destination_file_name_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *destination_file_name_values );\n\n\t\t*destination_file_name_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Sets the name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_set_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     const uint8_t *utf16_stream,\n     size_t utf16_stream_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_set_name\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_name_values->name != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file name values - name value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( utf16_stream_size == 0 )\n\t || ( utf16_stream_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid UTF-16 stream size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfile_name_values->name = (uint8_t *) memory_allocate(\n\t                                      sizeof( uint8_t ) * (size_t) utf16_stream_size );\n\n\tif( file_name_values->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_copy(\n\t     file_name_values->name,\n\t     utf16_stream,\n\t     utf16_stream_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfile_name_values->name_size = utf16_stream_size;\n\n\treturn( 1 );\n\non_error:\n\tif( file_name_values->name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_name_values->name );\n\n\t\tfile_name_values->name = NULL;\n\t}\n\tfile_name_values->name_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the file name values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_read_data(\n     libfsntfs_file_name_values_t *file_name_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_read_data\";\n\tsize_t data_offset    = 0;\n\tuint16_t name_size    = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit  = 0;\n\tuint32_t value_32bit  = 0;\n#endif\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_name_values->name != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file name values - name already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size < sizeof( fsntfs_file_name_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: unsupported data size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: file name data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->parent_file_reference,\n\t file_name_values->parent_file_reference );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->creation_time,\n\t file_name_values->creation_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->modification_time,\n\t file_name_values->modification_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->access_time,\n\t file_name_values->access_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->entry_modification_time,\n\t file_name_values->entry_modification_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_file_name_t *) data )->data_size,\n\t file_name_values->size );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_file_name_t *) data )->file_attribute_flags,\n\t file_name_values->file_attribute_flags );\n\n\tname_size = (uint16_t) ( (fsntfs_file_name_t *) data )->name_size;\n\n\tfile_name_values->name_space = ( (fsntfs_file_name_t *) data )->name_space;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: parent file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t function,\n\t\t file_name_values->parent_file_reference & 0xffffffffffffUL,\n\t\t file_name_values->parent_file_reference >> 48 );\n\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"creation time\\t\\t\\t\",\n\t\t     ( (fsntfs_file_name_t *) data )->creation_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"modification time\\t\\t\\t\",\n\t\t     ( (fsntfs_file_name_t *) data )->modification_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"entry modification time\\t\\t\",\n\t\t     ( (fsntfs_file_name_t *) data )->entry_modification_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"access time\\t\\t\\t\",\n\t\t     ( (fsntfs_file_name_t *) data )->access_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print FILETIME value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_file_name_t *) data )->allocated_data_size,\n\t\t value_64bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: allocated data size\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t value_64bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data size\\t\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t file_name_values->size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: file attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t file_name_values->file_attribute_flags );\n\t\tlibfsntfs_debug_print_file_attribute_flags(\n\t\t file_name_values->file_attribute_flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_file_name_t *) data )->extended_data,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: extended data\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name size\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t name_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name space\\t\\t\\t: %\" PRIu8 \" (%s)\\n\",\n\t\t function,\n\t\t file_name_values->name_space,\n\t\t libfsntfs_debug_print_file_name_attribute_name_space(\n\t\t  file_name_values->name_space ) );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tdata_offset = sizeof( fsntfs_file_name_t );\n\n\tif( name_size > 0 )\n\t{\n\t\tname_size *= 2;\n\n\t\tif( (size_t) name_size > ( data_size - data_offset ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_name_values_set_name(\n\t\t     file_name_values,\n\t\t     &( data[ data_offset ] ),\n\t\t     (size_t) name_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_utf16_string_value(\n\t\t\t     function,\n\t\t\t     \"name\\t\\t\\t\\t\",\n\t\t\t     file_name_values->name,\n\t\t\t     file_name_values->name_size,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print UTF-16 string value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n\t\tdata_offset += file_name_values->name_size;\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n/* TODO debug print alignment padding */\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < data_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t data_size - data_offset,\n\t\t\t 0 );\n\t\t}\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_name_values->name != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_name_values->name );\n\n\t\tfile_name_values->name = NULL;\n\t}\n\tfile_name_values->name_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the file name values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_read_from_mft_attribute(\n     libfsntfs_file_name_values_t *file_name_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_file_name_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_file_name_values_read_data(\n\t     file_name_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the parent file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_parent_file_reference(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_parent_file_reference\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( parent_file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid parent file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*parent_file_reference = file_name_values->parent_file_reference;\n\n\treturn( 1 );\n}\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_creation_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_creation_time\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = file_name_values->creation_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file) modification (last written) date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_modification_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_modification_time\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = file_name_values->modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_access_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_access_time\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = file_name_values->access_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file system entry) modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_entry_modification_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_entry_modification_time\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = file_name_values->entry_modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_size\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*size = file_name_values->size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_file_attribute_flags(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_file_attribute_flags\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_attribute_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_attribute_flags = file_name_values->file_attribute_flags;\n\n\treturn( 1 );\n}\n\n/* Retrieves the name space\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_name_space(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint8_t *name_space,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_name_space\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_space == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid name space.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*name_space = file_name_values->name_space;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_utf8_name_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_utf8_name_size\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_size_from_utf16_stream(\n\t     file_name_values->name,\n\t     (size_t) file_name_values->name_size,\n\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_utf8_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_utf8_name\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     file_name_values->name,\n\t     (size_t) file_name_values->name_size,\n\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: string data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t utf8_string,\n\t\t utf8_string_size,\n\t\t 0 );\n\t}\n#endif\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_utf16_name_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_utf16_name_size\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_size_from_utf16_stream(\n\t     file_name_values->name,\n\t     (size_t) file_name_values->name_size,\n\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_name_values_get_utf16_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_name_values_get_utf16_name\";\n\n\tif( file_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     file_name_values->name,\n\t     (size_t) file_name_values->name_size,\n\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_name_values.h",
    "content": "/*\n * File name attribute ($FILE_NAME) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FILE_NAME_VALUES_H )\n#define _LIBFSNTFS_FILE_NAME_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_file_name_values libfsntfs_file_name_values_t;\n\nstruct libfsntfs_file_name_values\n{\n\t/* The parent file reference\n\t */\n\tuint64_t parent_file_reference;\n\n\t/* The creation time\n\t */\n\tuint64_t creation_time;\n\n\t/* The modification time\n\t */\n\tuint64_t modification_time;\n\n\t/* The access time\n\t */\n\tuint64_t access_time;\n\n\t/* The entry modification time\n\t */\n\tuint64_t entry_modification_time;\n\n\t/* The size\n\t */\n\tuint64_t size;\n\n\t/* The file attribute flags\n\t */\n\tuint32_t file_attribute_flags;\n\n\t/* The name space\n\t */\n\tuint8_t name_space;\n\n\t/* The UTF-16 little-endian formatted name\n\t */\n\tuint8_t *name;\n\n\t/* The name size\n\t */\n\tsize_t name_size;\n};\n\nint libfsntfs_file_name_values_initialize(\n     libfsntfs_file_name_values_t **file_name_values,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_free(\n     libfsntfs_file_name_values_t **file_name_values,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_clone(\n     libfsntfs_file_name_values_t **destination_file_name_values,\n     libfsntfs_file_name_values_t *source_file_name_values,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_set_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     const uint8_t *utf16_stream,\n     size_t utf16_stream_size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_read_data(\n     libfsntfs_file_name_values_t *file_name_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_read_from_mft_attribute(\n     libfsntfs_file_name_values_t *file_name_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_parent_file_reference(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *parent_file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_creation_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_modification_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_access_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_entry_modification_time(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint64_t *size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_file_attribute_flags(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_name_space(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint8_t *name_space,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_utf8_name_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_utf8_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_utf16_name_size(\n     libfsntfs_file_name_values_t *file_name_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_file_name_values_get_utf16_name(\n     libfsntfs_file_name_values_t *file_name_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FILE_NAME_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_system.c",
    "content": "/*\n * File system functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block.h\"\n#include \"libfsntfs_cluster_block_vector.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_name.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_security_descriptor_index.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n\n/* Creates a file system\n * Make sure the value file_system is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_initialize(\n     libfsntfs_file_system_t **file_system,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_initialize\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_system != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file system value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_system = memory_allocate_structure(\n\t                libfsntfs_file_system_t );\n\n\tif( *file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *file_system,\n\t     0,\n\t     sizeof( libfsntfs_file_system_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file system.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( ( *file_system )->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( *file_system != NULL )\n\t{\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a file system\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_free(\n     libfsntfs_file_system_t **file_system,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_free\";\n\tint result            = 1;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_system != NULL )\n\t{\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( ( *file_system )->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\tif( ( *file_system )->path_hints_tree != NULL )\n\t\t{\n\t\t\tif( libcdata_btree_free(\n\t\t\t     &( ( *file_system )->path_hints_tree ),\n\t\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_path_hint_free,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free path hints tree.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *file_system )->security_descriptor_index != NULL )\n\t\t{\n\t\t\tif( libfsntfs_security_descriptor_index_free(\n\t\t\t     &( ( *file_system )->security_descriptor_index ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free security descriptor index.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *file_system )->mft != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_free(\n\t\t\t     &( ( *file_system )->mft ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free MFT.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *file_system );\n\n\t\t*file_system = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the MFT\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_read_mft(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     off64_t mft_offset,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_data_run_t *data_run                 = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute      = NULL;\n\tlibfsntfs_mft_attribute_t *last_data_attribute = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry               = NULL;\n\tstatic char *function                          = \"libfsntfs_file_system_read_mft\";\n\tsize64_t mft_size                              = 0;\n\tuint64_t file_reference                        = 0;\n\tuint64_t number_of_mft_entries                 = 0;\n\tuint16_t attribute_data_flags                  = 0;\n\tint attribute_index                            = 0;\n\tint data_run_index                             = 0;\n\tint file_reference_index                       = 0;\n\tint number_of_data_runs                        = 0;\n\tint number_of_file_entries                     = 0;\n\tint segment_index                              = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system->mft != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file system - MFT value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT offset value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_size > (size64_t) INT64_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid MFT size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_initialize(\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_entry_read_file_io_handle(\n\t     mft_entry,\n\t     file_io_handle,\n\t     mft_offset,\n\t     io_handle->mft_entry_size,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_MFT );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry->is_empty == 0 )\n\t{\n\t\tif( libfsntfs_mft_entry_read_attributes_data(\n\t\t     mft_entry,\n\t\t     io_handle,\n\t\t     mft_entry->data,\n\t\t     mft_entry->data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attributes of MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_MFT );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     mft_entry->data_attribute,\n\t     &attribute_data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( attribute_data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported compressed attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) != 0 )\n\t{\n\t\tif( libbfio_handle_get_size(\n\t\t     file_io_handle,\n\t\t     &mft_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $MFT metadata file size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_size(\n\t\t     mft_entry->data_attribute,\n\t\t     &mft_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data size of MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_MFT );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_mft_initialize(\n\t     &( file_system->mft ),\n\t     io_handle,\n\t     (size64_t) io_handle->mft_entry_size,\n\t     flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) != 0 )\n\t{\n\t\tif( libfdata_vector_append_segment(\n\t\t     file_system->mft->mft_entry_vector,\n\t\t     &segment_index,\n\t\t     0,\n\t\t     0,\n\t\t     mft_size,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append $MFT metadata file range to MFT entry vector.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     mft_entry->data_attribute,\n\t\t     &number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of data runs.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( data_run_index = 0;\n\t\t     data_run_index < number_of_data_runs;\n\t\t     data_run_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t     mft_entry->data_attribute,\n\t\t\t     data_run_index,\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing data run: %d.\",\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfdata_vector_append_segment(\n\t\t\t     file_system->mft->mft_entry_vector,\n\t\t\t     &segment_index,\n\t\t\t     0,\n\t\t\t     data_run->start_offset,\n\t\t\t     data_run->size,\n\t\t\t     0,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append data run: %d to MFT entry vector.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tlast_data_attribute = mft_entry->data_attribute;\n\t}\n\tif( ( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) == 0 )\n\t && ( mft_entry->list_attribute != NULL ) )\n\t{\n\t\tif( libfsntfs_mft_entry_read_attribute_list(\n\t\t     mft_entry,\n\t\t     io_handle,\n\t\t     file_io_handle,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attribute list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_get_number_of_file_references(\n\t\t     mft_entry->attribute_list,\n\t\t     &number_of_file_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of attribute list data MFT entries.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( file_reference_index = 0;\n\t\t     file_reference_index < number_of_file_entries;\n\t\t     file_reference_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_list_get_file_reference_by_index(\n\t\t\t     mft_entry->attribute_list,\n\t\t\t     file_reference_index,\n\t\t\t     &file_reference,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute list data MFT entry: %d.\",\n\t\t\t\t function,\n\t\t\t\t file_reference_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_mft_entry_read_attribute_list_data_mft_entry_by_index(\n\t\t\t     mft_entry,\n\t\t\t     io_handle,\n\t\t\t     file_io_handle,\n\t\t\t     file_system->mft->mft_entry_vector,\n\t\t\t     file_system->mft->mft_entry_cache,\n\t\t\t     file_reference,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read attribute list data MFT entry: %\" PRIu64 \"-%\" PRIu64 \".\",\n\t\t\t\t function,\n\t\t\t\t file_reference & 0xffffffffffffUL,\n\t\t\t\t file_reference >> 48 );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) == 0 )\n\t\t\t{\n\t\t\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t\t\t     last_data_attribute,\n\t\t\t\t     &data_attribute,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve next data attribute: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( data_attribute != NULL )\n\t\t\t\t{\n\t\t\t\t\tattribute_index++;\n\n\t\t\t\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t\t\t\t     data_attribute,\n\t\t\t\t\t     &number_of_data_runs,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve number of data runs.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tfor( data_run_index = 0;\n\t\t\t\t\t     data_run_index < number_of_data_runs;\n\t\t\t\t\t     data_run_index++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t\t\t\t     data_attribute,\n\t\t\t\t\t\t     data_run_index,\n\t\t\t\t\t\t     &data_run,\n\t\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to retrieve data run: %d.\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t data_run_index );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( data_run == NULL )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t\t\t\t \"%s: missing data run: %d.\",\n\t\t\t\t\t\t\t data_run_index );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( libfdata_vector_append_segment(\n\t\t\t\t\t\t     file_system->mft->mft_entry_vector,\n\t\t\t\t\t\t     &segment_index,\n\t\t\t\t\t\t     0,\n\t\t\t\t\t\t     data_run->start_offset,\n\t\t\t\t\t\t     data_run->size,\n\t\t\t\t\t\t     0,\n\t\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to append data run: %d to MFT entry vector.\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t data_run_index );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlast_data_attribute = data_attribute;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tnumber_of_mft_entries = (uint64_t) ( mft_size / io_handle->mft_entry_size );\n\n\tif( number_of_mft_entries > (uint64_t) INT_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid number of MFT entries value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfile_system->mft->number_of_mft_entries = number_of_mft_entries;\n\n\tif( libfsntfs_mft_entry_free(\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free MFT entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libcdata_btree_initialize(\n\t     &( file_system->path_hints_tree ),\n\t     LIBFSNTFS_INDEX_TREE_MAXIMUM_NUMBER_OF_SUB_NODES,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create path hints B-tree.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( file_system->path_hints_tree != NULL )\n\t{\n\t\tlibcdata_btree_free(\n\t\t &( file_system->path_hints_tree ),\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_path_hint_free,\n\t\t NULL );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the bitmap file entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_read_bitmap(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tlibfcache_cache_t *cluster_block_cache   = NULL;\n\tlibfdata_vector_t *cluster_block_vector  = NULL;\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry         = NULL;\n\tstatic char *function                    = \"libfsntfs_file_system_read_bitmap\";\n\tsize_t cluster_block_data_offset         = 0;\n\toff64_t bitmap_offset                    = 0;\n\toff64_t start_offset                     = 0;\n\tuint32_t value_32bit                     = 0;\n\tuint8_t bit_index                        = 0;\n\tint cluster_block_index                  = 0;\n\tint number_of_cluster_blocks             = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_get_mft_entry_by_index(\n\t     file_system->mft,\n\t     file_io_handle,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_BITMAP,\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_BITMAP );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_BITMAP );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry->data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT entry: %d - missing data attribute.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_BITMAP );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_cluster_block_vector_initialize(\n\t     &cluster_block_vector,\n\t     io_handle,\n\t     mft_entry->data_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfcache_cache_initialize(\n\t     &cluster_block_cache,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_get_number_of_elements(\n\t     cluster_block_vector,\n\t     &number_of_cluster_blocks,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of cluster blocks.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( cluster_block_index = 0;\n\t     cluster_block_index < number_of_cluster_blocks;\n\t     cluster_block_index++ )\n\t{\n\t\tif( libfdata_vector_get_element_value_by_index(\n\t\t     cluster_block_vector,\n\t\t     (intptr_t *) file_io_handle,\n\t\t     (libfdata_cache_t *) cluster_block_cache,\n\t\t     cluster_block_index,\n\t\t     (intptr_t **) &cluster_block,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve cluster block: %d from vector.\",\n\t\t\t function,\n\t\t\t cluster_block_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( cluster_block == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: missing cluster block: %d.\",\n\t\t\t function,\n\t\t\t cluster_block_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( cluster_block->data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: invalid cluster block: %d - missing data.\",\n\t\t\t function,\n\t\t\t cluster_block_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( ( cluster_block->data_size % 4 ) != 0 )\n\t\t || ( cluster_block->data_size > (size_t) SSIZE_MAX ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: cluster block: %d data size value out of bounds.\",\n\t\t\t function,\n\t\t\t cluster_block_index );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: bitmap segment: %d data:\\n\",\n\t\t\t function,\n\t\t\t cluster_block_index );\n\t\t\tlibcnotify_print_data(\n\t\t\t cluster_block->data,\n\t\t\t cluster_block->data_size,\n\t\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t\t}\n#endif\n\t\tcluster_block_data_offset = 0;\n\t\tstart_offset              = -1;\n\n\t\twhile( cluster_block_data_offset < cluster_block->data_size )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( cluster_block->data[ cluster_block_data_offset ] ),\n\t\t\t value_32bit );\n\n\t\t\tfor( bit_index = 0;\n\t\t\t     bit_index < 32;\n\t\t\t     bit_index++ )\n\t\t\t{\n\t\t\t\tif( ( value_32bit & 0x00000001UL ) == 0 )\n\t\t\t\t{\n\t\t\t\t\tif( start_offset >= 0 )\n\t\t\t\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t\t \"%s: offset range\\t\\t\\t\\t: 0x%08\" PRIx64 \" - 0x%08\" PRIx64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t\t\t\t\t\t function,\n\t\t\t\t\t\t\t start_offset,\n\t\t\t\t\t\t\t bitmap_offset,\n\t\t\t\t\t\t\t bitmap_offset - start_offset );\n\t\t\t\t\t\t}\n#endif\n/*\n\t\t\t\t\t\tif( libfsntfs_offset_list_append_offset(\n\t\t\t\t\t\t     offset_list,\n\t\t\t\t\t\t     start_offset,\n\t\t\t\t\t\t     bitmap_offset - start_offset,\n\t\t\t\t\t\t     1,\n\t\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t\t error,\n\t\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t\t\t \"%s: unable to append offset range to offset list.\",\n\t\t\t\t\t\t\t function );\n\n\t\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t\t}\n*/\n\t\t\t\t\t\tstart_offset = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( start_offset < 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tstart_offset = bitmap_offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbitmap_offset += io_handle->cluster_block_size;\n\n\t\t\t\tvalue_32bit >>= 1;\n\t\t\t}\n\t\t\tcluster_block_data_offset += 4;\n\t\t}\n\t\tif( start_offset >= 0 )\n\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: offset range\\t\\t\\t\\t: 0x%08\" PRIx64 \" - 0x%08\" PRIx64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t\t\t function,\n\t\t\t\t start_offset,\n\t\t\t\t bitmap_offset,\n\t\t\t\t bitmap_offset - start_offset );\n\t\t\t}\n#endif\n/* TODO\n\t\t\tif( libfsntfs_offset_list_append_offset(\n\t\t\t     offset_list,\n\t\t\t     start_offset,\n\t\t\t     bitmap_offset - start_offset,\n\t\t\t     1,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append offset range to offset list.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n*/\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t}\n\tif( libfdata_vector_free(\n\t     &cluster_block_vector,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free cluster block vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfcache_cache_free(\n\t     &cluster_block_cache,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free cluster block cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( cluster_block_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &cluster_block_cache,\n\t\t NULL );\n\t}\n\tif( cluster_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &cluster_block_vector,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the security descriptors\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_read_security_descriptors(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute      = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute       = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry               = NULL;\n\tstatic char *function                          = \"libfsntfs_file_system_read_security_descriptors\";\n\tint result                                     = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system->security_descriptor_index != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file system - security descriptor index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_get_mft_entry_by_index(\n\t     file_system->mft,\n\t     file_io_handle,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_SECURE,\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_SECURE );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_SECURE );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_entry_get_attribute_by_index(\n\t     mft_entry,\n\t     mft_entry->file_name_attribute_index,\n\t     &mft_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute: %d from MFT entry: %d.\",\n\t\t function,\n\t\t mft_entry->file_name_attribute_index,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_SECURE );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_initialize(\n\t     &file_name_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_name_values_read_from_mft_attribute(\n\t     file_name_values,\n\t     mft_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read file name values from attribute: %d from MFT entry: %d.\",\n\t\t function,\n\t\t mft_entry->file_name_attribute_index,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_SECURE );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          file_name_values->name,\n\t          file_name_values->name_size,\n\t          (uint8_t *) \"$Secure\",\n\t          7,\n\t          1,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t \"%s: unable to compare UTF-8 string with data attribute name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\tif( libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n\t\t     mft_entry,\n\t\t     (uint8_t *) \"$SDS\",\n\t\t     4,\n\t\t     &data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $SDS data attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_index_initialize(\n\t\t     &( file_system->security_descriptor_index ),\n\t\t     io_handle,\n\t\t     file_io_handle,\n\t\t     data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create security descriptor index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_index_read_sii_index(\n\t\t     file_system->security_descriptor_index,\n\t\t     io_handle,\n\t\t     file_io_handle,\n\t\t     mft_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor identifier ($SII) index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_file_name_values_free(\n\t     &file_name_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( file_system->security_descriptor_index != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_free(\n\t\t &( file_system->security_descriptor_index ),\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of MFT entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_get_number_of_mft_entries(\n     libfsntfs_file_system_t *file_system,\n     uint64_t *number_of_mft_entries,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_get_number_of_mft_entries\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_get_number_of_entries(\n\t     file_system->mft,\n\t     number_of_mft_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of MFT entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the MFT entry for a specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_get_mft_entry_by_index(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_get_mft_entry_by_index\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_get_mft_entry_by_index(\n\t     file_system->mft,\n\t     file_io_handle,\n\t     mft_entry_index,\n\t     mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIi64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the MFT entry for a specific index\n * This function creates new MFT entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_get_mft_entry_by_index_no_cache\";\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_get_mft_entry_by_index_no_cache(\n\t     file_system->mft,\n\t     file_io_handle,\n\t     mft_entry_index,\n\t     mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIi64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the security descriptor for a specific identifier\n * This function creates new security descriptor values\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_system_get_security_descriptor_values_by_identifier(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_file_system_get_security_descriptor_values_by_identifier\";\n\tint result            = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_system->security_descriptor_index != NULL )\n\t{\n\t\tresult = libfsntfs_security_descriptor_index_get_entry_by_identifier(\n\t\t          file_system->security_descriptor_index,\n\t\t          file_io_handle,\n\t\t          security_descriptor_identifier,\n\t\t          security_descriptor_values,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor from index for identifier: %\" PRIu32 \".\",\n\t\t\t function,\n\t\t\t security_descriptor_identifier );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Retrieves the path hint of a specific file reference\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_file_system_get_path_hint(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t file_reference,\n     libfsntfs_path_hint_t **path_hint,\n     int recursion_depth,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node               = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute       = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry               = NULL;\n\tlibfsntfs_path_hint_t *existing_path_hint      = NULL;\n\tlibfsntfs_path_hint_t *lookup_path_hint        = NULL;\n\tlibfsntfs_path_hint_t *parent_path_hint        = NULL;\n\tlibfsntfs_path_hint_t *safe_path_hint          = NULL;\n\tuint8_t *parent_path                           = NULL;\n\tstatic char *function                          = \"libfsntfs_file_system_get_path_hint\";\n\tsize_t name_size                               = 0;\n\tsize_t parent_path_size                        = 0;\n\tuint64_t mft_entry_index                       = 0;\n\tuint64_t mft_entry_file_reference              = 0;\n\tuint64_t parent_file_reference                 = 0;\n\tuint64_t parent_mft_entry_index                = 0;\n\tuint32_t attribute_type                        = 0;\n\tuint16_t mft_entry_sequence_number             = 0;\n\tuint16_t sequence_number                       = 0;\n\tint attribute_index                            = 0;\n\tint number_of_attributes                       = 0;\n\tint result                                     = 0;\n\tint value_index                                = 0;\n\n\tif( file_system == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file system.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( recursion_depth < 0 )\n\t || ( recursion_depth > LIBFSNTFS_MAXIMUM_RECURSION_DEPTH ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid recursion depth value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tmft_entry_index = file_reference & 0xffffffffffffUL;\n\n\tif( libfsntfs_file_system_get_mft_entry_by_index(\n\t     file_system,\n\t     file_io_handle,\n\t     mft_entry_index,\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_entry_get_file_reference(\n\t     mft_entry,\n\t     &mft_entry_file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_entry_file_reference != file_reference )\n\t{\n\t\tresult = libfsntfs_mft_entry_is_allocated(\n\t\t          mft_entry,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\t/* The sequence number is updated when the MFT entry is deleted\n\t\t */\n\t\tsequence_number           = (uint16_t) ( file_reference >> 48 );\n\t\tmft_entry_sequence_number = (uint16_t) ( mft_entry_file_reference >> 48 );\n\n\t\tif( sequence_number != ( mft_entry_sequence_number - 1 ) )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t}\n\tif( libfsntfs_path_hint_initialize(\n\t     &lookup_path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create path hint.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tlookup_path_hint->file_reference = mft_entry_file_reference;\n\n\tresult = libcdata_btree_get_value_by_value(\n\t          file_system->path_hints_tree,\n\t          (intptr_t *) lookup_path_hint,\n\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_path_hint_compare_by_file_reference,\n\t          &upper_node,\n\t          (intptr_t **) path_hint,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve path hint from tree.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tif( libfsntfs_mft_entry_get_number_of_attributes(\n\t\t     mft_entry,\n\t\t     &number_of_attributes,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( attribute_index = 0;\n\t\t     attribute_index < number_of_attributes;\n\t\t     attribute_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_entry_get_attribute_by_index(\n\t\t\t     mft_entry,\n\t\t\t     attribute_index,\n\t\t\t     &mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_mft_attribute_get_type(\n\t\t\t     mft_attribute,\n\t\t\t     &attribute_type,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d type.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_initialize(\n\t\t\t     &file_name_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_read_from_mft_attribute(\n\t\t\t     file_name_values,\n\t\t\t     mft_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_get_parent_file_reference(\n\t\t\t     file_name_values,\n\t\t\t     &parent_file_reference,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tparent_mft_entry_index = parent_file_reference & 0xffffffffffffUL;\n\n\t\t\tif( file_name_values->name_space != LIBFSNTFS_FILE_NAME_SPACE_DOS )\n\t\t\t{\n\t\t\t\tparent_path      = NULL;\n\t\t\t\tparent_path_size = 0;\n\n\t\t\t\tif( ( mft_entry_index != LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY )\n\t\t\t\t && ( parent_mft_entry_index == LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY ) )\n\t\t\t\t{\n\t\t\t\t\tparent_path      = (uint8_t *) \"\";\n\t\t\t\t\tparent_path_size = 1;\n\t\t\t\t}\n\t\t\t\telse if( ( parent_mft_entry_index != 0 )\n\t\t\t\t      && ( parent_mft_entry_index != mft_entry_index ) )\n\t\t\t\t{\n\t\t\t\t\tresult = libfsntfs_file_system_get_path_hint(\n\t\t\t\t\t          file_system,\n\t\t\t\t\t          file_io_handle,\n\t\t\t\t\t          parent_file_reference,\n\t\t\t\t\t          &parent_path_hint,\n\t\t\t\t\t          recursion_depth + 1,\n\t\t\t\t\t          error );\n\n\t\t\t\t\tif( result == -1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve path hint for MFT entry: %\" PRIu64 \".\",\n\t\t\t\t\t\t function,\n\t\t\t\t\t\t parent_mft_entry_index );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\telse if( result == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tparent_path      = (uint8_t *) \"$Orphan\";\n\t\t\t\t\t\tparent_path_size = 8;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tparent_path      = parent_path_hint->path;\n\t\t\t\t\t\tparent_path_size = parent_path_hint->path_size;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_file_name_values_get_utf8_name_size(\n\t\t\t\t     file_name_values,\n\t\t\t\t     &name_size,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve size of UTF-8 name.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_path_hint_initialize(\n\t\t\t\t     &safe_path_hint,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create path hint.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tsafe_path_hint->file_reference = file_reference;\n\t\t\t\tsafe_path_hint->path_size      = parent_path_size + name_size;\n\n\t\t\t\tsafe_path_hint->path = (uint8_t *) memory_allocate(\n\t\t\t\t\t\t\t\t    sizeof( uint8_t ) * safe_path_hint->path_size );\n\n\t\t\t\tif( safe_path_hint->path == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t\t \"%s: unable to create path.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( ( parent_path != NULL )\n\t\t\t\t && ( parent_path_size > 0 ) )\n\t\t\t\t{\n\t\t\t\t\tif( memory_copy(\n\t\t\t\t\t     safe_path_hint->path,\n\t\t\t\t\t     parent_path,\n\t\t\t\t\t     parent_path_size ) == NULL )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t\t\t\t \"%s: unable to copy parent path to path.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\tsafe_path_hint->path[ parent_path_size - 1 ] = '\\\\';\n\t\t\t\t}\n\t\t\t\tif( name_size > 0 )\n\t\t\t\t{\n\t\t\t\t\tif( libfsntfs_file_name_values_get_utf8_name(\n\t\t\t\t\t     file_name_values,\n\t\t\t\t\t     &( safe_path_hint->path[ parent_path_size ] ),\n\t\t\t\t\t     name_size,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t\t \"%s: unable to retrieve UTF-8 name.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( mft_entry_index == LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY )\n\t\t\t\t{\n\t\t\t\t\tsafe_path_hint->path[ 0 ] = '\\\\';\n\t\t\t\t}\n\t\t\t\tresult = libcdata_btree_insert_value(\n\t\t\t\t\t  file_system->path_hints_tree,\n\t\t\t\t\t  &value_index,\n\t\t\t\t\t  (intptr_t *) safe_path_hint,\n\t\t\t\t\t  (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_path_hint_compare_by_file_reference,\n\t\t\t\t\t  &upper_node,\n\t\t\t\t\t  (intptr_t **) &existing_path_hint,\n\t\t\t\t\t  error );\n\n\t\t\t\tif( result == -1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t \"%s: unable to insert path hint into tree.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\telse if( result == 0 )\n\t\t\t\t{\n\t\t\t\t\tif( libfsntfs_path_hint_free(\n\t\t\t\t\t     &safe_path_hint,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t\t \"%s: unable to free path hint.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\tgoto on_error;\n\t\t\t\t\t}\n\t\t\t\t\t*path_hint = existing_path_hint;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t*path_hint = safe_path_hint;\n\n\t\t\t\t\tsafe_path_hint = NULL;\n\t\t\t\t}\n\t\t\t\tresult = 1;\n\t\t\t}\n\t\t\tif( libfsntfs_file_name_values_free(\n\t\t\t     &file_name_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free file name values.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t}\n\tif( libfsntfs_path_hint_free(\n\t     &lookup_path_hint,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free path hint.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_path_hint != NULL )\n\t{\n\t\tlibfsntfs_path_hint_free(\n\t\t &safe_path_hint,\n\t\t NULL );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\tif( lookup_path_hint != NULL )\n\t{\n\t\tlibfsntfs_path_hint_free(\n\t\t &lookup_path_hint,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_file_system.h",
    "content": "/*\n * File system functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FILE_SYSTEM_H )\n#define _LIBFSNTFS_FILE_SYSTEM_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft.h\"\n#include \"libfsntfs_path_hint.h\"\n#include \"libfsntfs_security_descriptor_index.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_file_system libfsntfs_file_system_t;\n\nstruct libfsntfs_file_system\n{\n\t/* The MFT\n\t */\n\tlibfsntfs_mft_t *mft;\n\n\t/* The security descriptor index\n\t */\n\tlibfsntfs_security_descriptor_index_t *security_descriptor_index;\n\n\t/* The list data MFT entry B-tree\n\t */\n\tlibcdata_btree_t *list_data_mft_entry_tree;\n\n\t/* The path hints B-tree\n\t */\n\tlibcdata_btree_t *path_hints_tree;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nint libfsntfs_file_system_initialize(\n     libfsntfs_file_system_t **file_system,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_free(\n     libfsntfs_file_system_t **file_system,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_read_mft(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     off64_t mft_offset,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_read_bitmap(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_read_security_descriptors(\n     libfsntfs_file_system_t *file_system,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_get_number_of_mft_entries(\n     libfsntfs_file_system_t *file_system,\n     uint64_t *number_of_mft_entries,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_get_mft_entry_by_index(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_get_security_descriptor_values_by_identifier(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error );\n\nint libfsntfs_file_system_get_path_hint(\n     libfsntfs_file_system_t *file_system,\n     libbfio_handle_t *file_io_handle,\n     uint64_t file_reference,\n     libfsntfs_path_hint_t **path_hint,\n     int recursion_depth,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FILE_SYSTEM_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_fixup_values.c",
    "content": "/*\n * Fix-up values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <types.h>\n\n#include \"libfsntfs_fixup_values.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n/* Applies the fix-up values to the data\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_fixup_values_apply(\n     uint8_t *data,\n     size_t data_size,\n     uint16_t fixup_values_offset,\n     uint16_t number_of_fixup_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_fixup_values_apply\";\n\tsize_t data_offset              = 0;\n\tsize_t fixup_placeholder_offset = 0;\n\tsize_t fixup_value_offset       = 0;\n\tsize_t fixup_values_size        = 0;\n\tuint16_t fixup_value_index      = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint16_t value_16bit            = 0;\n#endif\n\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( fixup_values_offset >= data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid fix-up values offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfixup_values_size = 2 + ( (size_t) number_of_fixup_values * 2 );\n\n\tif( ( number_of_fixup_values == 0 )\n\t || ( fixup_values_size > ( data_size - fixup_values_offset ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid number of fix-up values value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: fix-up values data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t &( data[ fixup_values_offset ] ),\n\t\t fixup_values_size,\n\t\t 0 );\n\t}\n#endif\n\tfixup_placeholder_offset = (size_t) fixup_values_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t &( data[ fixup_placeholder_offset ] ),\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: fix-up placeholder value\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\t}\n#endif\n\tfixup_value_offset = fixup_placeholder_offset + 2;\n\tdata_offset        = 510;\n\n\tfor( fixup_value_index = 0;\n\t     fixup_value_index < number_of_fixup_values;\n\t     fixup_value_index++ )\n\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t\t &( data[ fixup_value_offset ] ),\n\t\t\t value_16bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: fix-up value: %\" PRIu16 \"\\t\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t\t function,\n\t\t\t fixup_value_index,\n\t\t\t value_16bit );\n\t\t}\n#endif\n\t\tif( ( data_offset + 1 ) < data_size )\n\t\t{\n\t\t\tif( ( data[ data_offset ] != data[ fixup_placeholder_offset ] )\n\t\t\t && ( data[ data_offset + 1 ] != data[ fixup_placeholder_offset + 1 ] ) )\n\t\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t{\n\t\t\t\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t\t\t\t &( data[ data_offset ] ),\n\t\t\t\t\t value_16bit );\n\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t \"%s: corruption detected - mismatch between placeholder and value at offset: %\" PRIzd \" (0x%04\" PRIx16 \")\\n\",\n\t\t\t\t\t function,\n\t\t\t\t\t data_offset,\n\t\t\t\t\t value_16bit );\n\t\t\t\t}\n#endif\n/* TODO handle error */\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: applying fix-up value: %\" PRIu16 \"\\t\\t\\t: (offset: %\" PRIzd \") 0x%02\" PRIx8 \"%02\" PRIx8 \" => (offset: %\" PRIzd \") 0x%02\" PRIx8 \"%02\" PRIx8 \"\\n\",\n\t\t\t\t function,\n\t\t\t\t fixup_value_index,\n\t\t\t\t data_offset,\n\t\t\t\t data[ data_offset + 1 ],\n\t\t\t\t data[ data_offset ],\n\t\t\t\t fixup_value_offset,\n\t\t\t\t data[ fixup_value_offset + 1 ],\n\t\t\t\t data[ fixup_value_offset ] );\n\t\t\t}\n#endif\n\t\t\tdata[ data_offset ]     = data[ fixup_value_offset ];\n\t\t\tdata[ data_offset + 1 ] = data[ fixup_value_offset + 1 ];\n\t\t}\n\t\tfixup_value_offset += 2;\n\t\tdata_offset        += 512;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_fixup_values.h",
    "content": "/*\n * Fix-up values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_FIXUP_VALUES_H )\n#define _LIBFSNTFS_FIXUP_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_fixup_values_apply(\n     uint8_t *data,\n     size_t data_size,\n     uint16_t fixup_values_offset,\n     uint16_t number_of_fixup_values,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_FIXUP_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index.c",
    "content": "/*\n * Index functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_bitmap_values.h\"\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index.h\"\n#include \"libfsntfs_index_entry.h\"\n#include \"libfsntfs_index_entry_vector.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_index_root_header.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_unused.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index\n * Make sure the value index is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_initialize(\n     libfsntfs_index_t **index,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *name,\n     size_t name_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_initialize\";\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( name_size <= 1 )\n\t || ( name_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid name size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index = memory_allocate_structure(\n\t          libfsntfs_index_t );\n\n\tif( *index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index,\n\t     0,\n\t     sizeof( libfsntfs_index_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *index );\n\n\t\t*index = NULL;\n\n\t\treturn( -1 );\n\t}\n\t( *index )->name = (uint8_t *) memory_allocate(\n\t                                sizeof( uint8_t ) * name_size );\n\n\tif( ( *index )->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_copy(\n\t     ( *index )->name,\n\t     name,\n\t     sizeof( uint8_t ) * name_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *index )->name_size = name_size;\n\t( *index )->io_handle = io_handle;\n\n\treturn( 1 );\n\non_error:\n\tif( *index != NULL )\n\t{\n\t\tif( ( *index )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *index )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *index );\n\n\t\t*index = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_free(\n     libfsntfs_index_t **index,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_free\";\n\tint result            = 1;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index != NULL )\n\t{\n\t\t/* The io_handle, index_root_attribute, index_allocation_attribute and bitmap_attribute references are freed elsewhere\n\t\t */\n\t\tif( ( *index )->root_header != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_root_header_free(\n\t\t\t     &( ( *index )->root_header ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free root header.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *index )->root_node != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_node_free(\n\t\t\t     &( ( *index )->root_node ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free root node.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *index )->index_entry_vector != NULL )\n\t\t{\n\t\t\tif( libfdata_vector_free(\n\t\t\t     &( ( *index )->index_entry_vector ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free index entry vector.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *index )->index_node_cache != NULL )\n\t\t{\n\t\t\tif( libfcache_cache_free(\n\t\t\t     &( ( *index )->index_node_cache ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free index node cache.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *index )->bitmap_values != NULL )\n\t\t{\n\t\t\tif( libfsntfs_bitmap_values_free(\n\t\t\t     &( ( *index )->bitmap_values ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free bitmap values.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *index )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *index )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *index );\n\n\t\t*index = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the index\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_index_read(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *bitmap_attribute           = NULL;\n\tlibfsntfs_mft_attribute_t *index_allocation_attribute = NULL;\n\tlibfsntfs_mft_attribute_t *index_root_attribute       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute              = NULL;\n\tstatic char *function                                 = \"libfsntfs_index_read\";\n\tuint32_t attribute_type                               = 0;\n\tuint32_t index_entry_size                             = 0;\n\tint attribute_index                                   = 0;\n\tint number_of_attributes                              = 0;\n\tint result                                            = 0;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_get_number_of_attributes(\n\t     mft_entry,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( attribute_index = 0;\n\t     attribute_index < number_of_attributes;\n\t     attribute_index++ )\n\t{\n\t\tif( libfsntfs_mft_entry_get_attribute_by_index(\n\t\t     mft_entry,\n\t\t     attribute_index,\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t\t          mft_attribute,\n\t\t          index->name,\n\t\t          index->name_size,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare UTF-8 string with attribute: %d name.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_type(\n\t\t\t     mft_attribute,\n\t\t\t     &attribute_type,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute type.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tswitch( attribute_type )\n\t\t\t{\n\t\t\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP:\n\t\t\t\t\tif( libfsntfs_mft_attribute_append_to_chain(\n\t\t\t\t\t     &bitmap_attribute,\n\t\t\t\t\t     mft_attribute,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t\t \"%s: unable to append attribute to bitmap attribute chain.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\treturn( -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION:\n\t\t\t\t\tif( libfsntfs_mft_attribute_append_to_chain(\n\t\t\t\t\t     &index_allocation_attribute,\n\t\t\t\t\t     mft_attribute,\n\t\t\t\t\t     error ) != 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t\t error,\n\t\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t\t \"%s: unable to append attribute to index allocation attribute chain.\",\n\t\t\t\t\t\t function );\n\n\t\t\t\t\t\treturn( -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\t\t\t\tindex_root_attribute = mft_attribute;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t\t \"%s: unsupported index attribute type: 0x%08\" PRIx32 \"\\n\",\n\t\t\t\t\t\t function,\n\t\t\t\t\t\t attribute_type );\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif( index_root_attribute == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libfsntfs_index_read_root_header(\n\t     index,\n\t     index_root_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* The index does not necessarily have a $BITMAP attribute\n\t */\n\tif( bitmap_attribute != NULL )\n\t{\n\t\tif( libfsntfs_index_read_bitmap(\n\t\t     index,\n\t\t     file_io_handle,\n\t\t     bitmap_attribute,\n\t\t     flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read index bitmap.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( libfsntfs_index_read_root_node(\n\t     index,\n\t     index_root_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index root node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* The index does not necessarily have an $INDEX_ALLOCATION attribute\n\t */\n\tif( index_allocation_attribute != NULL )\n\t{\n\t\tif( libfsntfs_index_root_header_get_index_entry_size(\n\t\t     index->root_header,\n\t\t     &index_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve index entry size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( index_entry_size != index->io_handle->index_entry_size )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: mismatch in index entry size (in index root header: %\" PRIu32 \", in volume header: %\" PRIu32 \").\",\n\t\t\t\t function,\n\t\t\t\t index_entry_size,\n\t\t\t\t index->io_handle->index_entry_size );\n\t\t\t}\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\tif( index_entry_size > index->io_handle->index_entry_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: invalid index entry size: %\" PRIu32 \" in index root header value exceeds value in volume header: %\" PRIu32 \".\",\n\t\t\t function,\n\t\t\t index_entry_size,\n\t\t\t index->io_handle->index_entry_size );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_index_entry_vector_initialize(\n\t\t     &( index->index_entry_vector ),\n\t\t     index->io_handle,\n\t\t     index_allocation_attribute,\n\t\t     index_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create index entry vector.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfcache_cache_initialize(\n\t\t     &( index->index_node_cache ),\n\t\t     LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_INDEX_NODES,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create index node cache.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( index->index_node_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &( index->index_node_cache ),\n\t\t NULL );\n\t}\n\tif( index->index_entry_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &( index->index_entry_vector ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the index root header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_read_root_header(\n     libfsntfs_index_t *index,\n     libfsntfs_mft_attribute_t *index_root_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data         = NULL;\n\tstatic char *function = \"libfsntfs_index_read_root_header\";\n\tsize_t data_size      = 0;\n\tint result            = 0;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->root_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index - root header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          index_root_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if index root attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident index root attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     index_root_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index root attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_root_header_initialize(\n\t     &( index->root_header ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_root_header_read_data(\n\t     index->root_header,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( index->root_header != NULL )\n\t{\n\t\tlibfsntfs_index_root_header_free(\n\t\t &( index->root_header ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the index root node\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_read_root_node(\n     libfsntfs_index_t *index,\n     libfsntfs_mft_attribute_t *index_root_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data         = NULL;\n\tstatic char *function = \"libfsntfs_index_read_root_node\";\n\tsize_t data_offset    = 0;\n\tsize_t data_size      = 0;\n\tint result            = 0;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->root_node != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index - root node value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          index_root_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if index root attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident index root attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     index_root_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index root attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_node_initialize(\n\t     &( index->root_node ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset = sizeof( fsntfs_index_root_header_t );\n\n\tif( libfsntfs_index_node_read_header(\n\t     index->root_node,\n\t     data,\n\t     data_size,\n\t     data_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index node header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset += sizeof( fsntfs_index_node_header_t );\n\n\tindex->flags = index->root_node->header->flags;\n\n\tif( libfsntfs_index_node_read_values(\n\t     index->root_node,\n\t     0,\n\t     data,\n\t     data_size,\n\t     data_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index node values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset += index->root_node->header->size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < data_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t data_size - data_offset,\n\t\t\t 0 );\n\t\t}\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n\non_error:\n\tif( index->root_node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &( index->root_node ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the index bitmap\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_read_bitmap(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *bitmap_attribute,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function     = \"libfsntfs_index_read_bitmap\";\n\tuint32_t index_entry_size = 0;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->bitmap_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index - bitmap values already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_root_header_get_index_entry_size(\n\t     index->root_header,\n\t     &index_entry_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index entry size from root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_bitmap_values_initialize(\n\t     &( index->bitmap_values ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create bitmap values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_bitmap_values_read_from_mft_attribute(\n\t     index->bitmap_values,\n\t     bitmap_attribute,\n\t     index->io_handle,\n\t     file_io_handle,\n\t     index_entry_size,\n\t     flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read bitmap values from attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( index->bitmap_values != NULL )\n\t{\n\t\tlibfsntfs_bitmap_values_free(\n\t\t &( index->bitmap_values ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the index entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_get_index_entry_size(\n     libfsntfs_index_t *index,\n     uint32_t *index_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_get_index_entry_size\";\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_root_header_get_index_entry_size(\n\t     index->root_header,\n\t     index_entry_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index entry size from root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the attribute type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_get_attribute_type(\n     libfsntfs_index_t *index,\n     uint32_t *attribute_type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_get_attribute_type\";\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_root_header_get_attribute_type(\n\t     index->root_header,\n\t     attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type from root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the collation type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_get_collation_type(\n     libfsntfs_index_t *index,\n     uint32_t *collation_type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_get_collation_type\";\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_root_header_get_collation_type(\n\t     index->root_header,\n\t     collation_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve collation type from root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Determines if a sub node is allocated\n * Returns 1 if allocated, 0 if not or -1 on error\n */\nint libfsntfs_index_sub_node_is_allocated(\n     libfsntfs_index_t *index,\n     int sub_node_vcn,\n     libcerror_error_t **error )\n{\n\tstatic char *function       = \"libfsntfs_index_sub_node_is_allocated\";\n\toff64_t sub_node_vcn_offset = 0;\n\tint result                  = 0;\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->bitmap_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index - missing bitmap values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsub_node_vcn_offset = (off64_t) sub_node_vcn * index->io_handle->cluster_block_size;\n\n\tresult = libcdata_range_list_range_is_present(\n\t          index->bitmap_values->allocated_block_list,\n\t          sub_node_vcn_offset,\n\t          index->io_handle->cluster_block_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if range of sub node with VCN: %d is allocated.\",\n\t\t function,\n\t\t sub_node_vcn );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves a sub index node\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_get_sub_node(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfcache_cache_t *index_node_cache,\n     off64_t index_entry_offset,\n     int sub_node_vcn,\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error )\n{\n\tstatic char *function            = \"libfsntfs_index_get_sub_node\";\n\toff64_t element_data_offset      = 0;\n\n#if defined( HAVE_PROFILER )\n\tint64_t profiler_start_timestamp = 0;\n\tuint32_t index_entry_size        = 0;\n#endif\n\n\tif( index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_PROFILER )\n\tif( index->io_handle->profiler != NULL )\n\t{\n\t\tif( libfsntfs_index_root_header_get_index_entry_size(\n\t\t     index->root_header,\n\t\t     &index_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve index entry size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_profiler_start_timing(\n\t\t     index->io_handle->profiler,\n\t\t     &profiler_start_timestamp,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to start timing.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n#endif /* defined( HAVE_PROFILER ) */\n\n\tif( libfdata_vector_get_element_value_at_offset(\n\t     index->index_entry_vector,\n\t     (intptr_t *) file_io_handle,\n\t     (libfdata_cache_t *) index_node_cache,\n\t     index_entry_offset,\n\t     &element_data_offset,\n\t     (intptr_t **) index_node,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index node from index entry with VCN: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t sub_node_vcn,\n\t\t index_entry_offset,\n\t\t index_entry_offset );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_PROFILER )\n\tif( index->io_handle->profiler != NULL )\n\t{\n\t\tif( libfsntfs_profiler_stop_timing(\n\t\t     index->io_handle->profiler,\n\t\t     profiler_start_timestamp,\n\t\t     function,\n\t\t     index_entry_offset,\n\t\t     index_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to stop timing.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n#endif /* defined( HAVE_PROFILER ) */\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index.h",
    "content": "/*\n * Index functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_H )\n#define _LIBFSNTFS_INDEX_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_bitmap_values.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_index_root_header.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index libfsntfs_index_t;\n\nstruct libfsntfs_index\n{\n\t/* The IO handle\n\t */\n\tlibfsntfs_io_handle_t *io_handle;\n\n\t/* The name\n\t */\n\tuint8_t *name;\n\n\t/* The name size\n\t */\n\tsize_t name_size;\n\n\t/* The flags\n\t */\n\tuint32_t flags;\n\n\t/* The root header\n\t */\n\tlibfsntfs_index_root_header_t *root_header;\n\n\t/* The root node\n\t */\n\tlibfsntfs_index_node_t *root_node;\n\n\t/* The index entry vector\n\t */\n\tlibfdata_vector_t *index_entry_vector;\n\n\t/* The index node cache\n\t */\n\tlibfcache_cache_t *index_node_cache;\n\n\t/* The bitmap values\n\t */\n\tlibfsntfs_bitmap_values_t *bitmap_values;\n};\n\nint libfsntfs_index_initialize(\n     libfsntfs_index_t **index,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *name,\n     size_t name_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_free(\n     libfsntfs_index_t **index,\n     libcerror_error_t **error );\n\nint libfsntfs_index_read(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_index_read_root_header(\n     libfsntfs_index_t *index,\n     libfsntfs_mft_attribute_t *index_root_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_index_read_root_node(\n     libfsntfs_index_t *index,\n     libfsntfs_mft_attribute_t *index_root_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_index_read_bitmap(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *bitmap_attribute,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_index_get_index_entry_size(\n     libfsntfs_index_t *index,\n     uint32_t *index_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_get_attribute_type(\n     libfsntfs_index_t *index,\n     uint32_t *attribute_type,\n     libcerror_error_t **error );\n\nint libfsntfs_index_get_collation_type(\n     libfsntfs_index_t *index,\n     uint32_t *collation_type,\n     libcerror_error_t **error );\n\nint libfsntfs_index_sub_node_is_allocated(\n     libfsntfs_index_t *index,\n     int sub_node_vcn,\n     libcerror_error_t **error );\n\nint libfsntfs_index_get_sub_node(\n     libfsntfs_index_t *index,\n     libbfio_handle_t *file_io_handle,\n     libfcache_cache_t *index_node_cache,\n     off64_t index_entry_offset,\n     int sub_node_vcn,\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry.c",
    "content": "/*\n * Index entry entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_fixup_values.h\"\n#include \"libfsntfs_index_entry.h\"\n#include \"libfsntfs_index_entry_header.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index entry\n * Make sure the value index_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_initialize(\n     libfsntfs_index_entry_t **index_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_initialize\";\n\n\tif( index_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_entry = memory_allocate_structure(\n\t                libfsntfs_index_entry_t );\n\n\tif( *index_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_entry,\n\t     0,\n\t     sizeof( libfsntfs_index_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *index_entry );\n\n\t\t*index_entry = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_entry != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_entry );\n\n\t\t*index_entry = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_free(\n     libfsntfs_index_entry_t **index_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_free\";\n\tint result            = 1;\n\n\tif( index_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_entry != NULL )\n\t{\n\t\tif( ( *index_entry )->node != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_node_free(\n\t\t\t     &( ( *index_entry )->node ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free index node.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *index_entry );\n\n\t\t*index_entry = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the index entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_read_file_io_handle(\n     libfsntfs_index_entry_t *index_entry,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     uint32_t index_entry_size,\n     uint32_t index_entry_index,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_index_entry_header_t *index_entry_header = NULL;\n\tuint8_t *index_entry_data                          = NULL;\n\tstatic char *function                              = \"libfsntfs_index_entry_read_file_io_handle\";\n\tsize_t data_offset                                 = 0;\n\tsize_t index_node_size                             = 0;\n\tsize_t index_values_offset                         = 0;\n\tsize_t unknown_data_size                           = 0;\n\tssize_t read_count                                 = 0;\n\toff64_t index_value_vcn_offset                     = 0;\n\tuint16_t fixup_values_offset                       = 0;\n\tuint16_t number_of_fixup_values                    = 0;\n\n\tif( index_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_entry->node != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index entry - node value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( index_entry_size < ( sizeof( fsntfs_index_entry_header_t ) + sizeof( fsntfs_index_node_header_t ) ) )\n\t || ( index_entry_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - index entry size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tindex_entry_data = (uint8_t *) memory_allocate(\n\t                                sizeof( uint8_t ) * index_entry_size );\n\n\tif( index_entry_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index entry data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading index entry: %\" PRIu32 \" at offset: %\" PRIi64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t index_entry_index,\n\t\t file_offset,\n\t\t file_offset );\n\t}\n#endif\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              index_entry_data,\n\t              (size_t) index_entry_size,\n\t              file_offset,\n\t              error );\n\n\tif( read_count != (ssize_t) index_entry_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index entry: %\" PRIu32 \" data at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t index_entry_index,\n\t\t file_offset,\n\t\t file_offset );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_entry_header_initialize(\n\t     &index_entry_header,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_entry_header_read_data(\n\t     index_entry_header,\n\t     index_entry_data,\n\t     (size_t) index_entry_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset = sizeof( fsntfs_index_entry_header_t );\n\n\tif( libfsntfs_index_node_initialize(\n\t     &( index_entry->node ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_node_read_header(\n\t     index_entry->node,\n\t     index_entry_data,\n\t     (size_t) index_entry_size,\n\t     data_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index node header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset += sizeof( fsntfs_index_node_header_t );\n\n\tif( libfsntfs_index_entry_header_get_fixup_values_offset(\n\t     index_entry_header,\n\t     &fixup_values_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve fix-up values offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n/* TODO check bounds of index_values_offset */\n\tindex_values_offset = (size_t) index_entry->node->header->index_values_offset + sizeof( fsntfs_index_entry_header_t );\n\n\tif( fixup_values_offset > index_values_offset )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: fix-up values offset exceeds index values offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( data_offset < fixup_values_offset )\n\t{\n\t\tunknown_data_size = (size_t) fixup_values_offset - data_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( index_entry_data[ data_offset ] ),\n\t\t\t unknown_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset += unknown_data_size;\n\t}\n\tif( libfsntfs_index_entry_header_get_number_of_fixup_values(\n\t     index_entry_header,\n\t     &number_of_fixup_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of fix-up values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( number_of_fixup_values > 0 )\n\t{\n\t\tif( libfsntfs_fixup_values_apply(\n\t\t     index_entry_data,\n\t\t     (size_t) index_entry_size,\n\t\t     fixup_values_offset,\n\t\t     number_of_fixup_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to apply fix-up values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += 2 + ( (size_t) number_of_fixup_values * 2 );\n\t}\n\tif( libfsntfs_index_entry_header_free(\n\t     &index_entry_header,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free index entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tindex_value_vcn_offset = (off64_t) index_entry_index * index_entry_size;\n\n\tif( libfsntfs_index_node_read_values(\n\t     index_entry->node,\n\t     index_value_vcn_offset,\n\t     index_entry_data,\n\t     (size_t) index_entry_size,\n\t     data_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index node values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n/* TODO refactor */\n\tindex_node_size = (size_t) index_entry->node->header->size - sizeof( fsntfs_index_node_header_t );\n\n\tif( data_offset < (size_t) index_values_offset )\n\t{\n\t\tunknown_data_size = (size_t) index_values_offset - data_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( index_entry_data[ data_offset ] ),\n\t\t\t unknown_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset     += unknown_data_size;\n\t\tindex_node_size -= unknown_data_size;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tdata_offset += index_node_size;\n\n\t\tif( data_offset < (size_t) index_entry_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( index_entry_data[ data_offset ] ),\n\t\t\t (size_t) index_entry_size - data_offset,\n\t\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t\t}\n\t}\n#endif\n\tmemory_free(\n\t index_entry_data );\n\n\treturn( 1 );\n\non_error:\n\tif( index_entry->node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &( index_entry->node ),\n\t\t NULL );\n\t}\n\tif( index_entry_header != NULL )\n\t{\n\t\tlibfsntfs_index_entry_header_free(\n\t\t &index_entry_header,\n\t\t NULL );\n\t}\n\tif( index_entry_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t index_entry_data );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry.h",
    "content": "/*\n * Index entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_ENTRY_H )\n#define _LIBFSNTFS_INDEX_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_entry libfsntfs_index_entry_t;\n\nstruct libfsntfs_index_entry\n{\n\t/* The index node\n\t */\n\tlibfsntfs_index_node_t *node;\n};\n\nint libfsntfs_index_entry_initialize(\n     libfsntfs_index_entry_t **index_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_free(\n     libfsntfs_index_entry_t **index_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_read_file_io_handle(\n     libfsntfs_index_entry_t *index_entry,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     uint32_t index_entry_size,\n     uint32_t index_entry_index,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry_header.c",
    "content": "/*\n * The NTFS index entry header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_index_entry_header.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\nconst char fsntfs_index_entry_signature[ 4 ] = { 'I', 'N', 'D', 'X' };\n\n/* Creates an index entry header\n * Make sure the value index_entry_header is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_header_initialize(\n     libfsntfs_index_entry_header_t **index_entry_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_header_initialize\";\n\n\tif( index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_entry_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index entry header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_entry_header = memory_allocate_structure(\n\t                       libfsntfs_index_entry_header_t );\n\n\tif( *index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_entry_header,\n\t     0,\n\t     sizeof( libfsntfs_index_entry_header_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_entry_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_entry_header );\n\n\t\t*index_entry_header = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index entry header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_header_free(\n     libfsntfs_index_entry_header_t **index_entry_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_header_free\";\n\n\tif( index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_entry_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_entry_header );\n\n\t\t*index_entry_header = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the index entry header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_header_read_data(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_header_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit  = 0;\n#endif\n\n\tif( index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < sizeof( fsntfs_index_entry_header_t ) )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index entry header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_index_entry_header_t ),\n\t\t 0 );\n\t}\n#endif\n\tif( memory_compare(\n\t     ( (fsntfs_index_entry_header_t *) data )->signature,\n\t     fsntfs_index_entry_signature,\n\t     4 ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid index entry signature.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_index_entry_header_t *) data )->fixup_values_offset,\n\t index_entry_header->fixup_values_offset );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_index_entry_header_t *) data )->number_of_fixup_values,\n\t index_entry_header->number_of_fixup_values );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: signature\\t\\t\\t: %c%c%c%c\\n\",\n\t\t function,\n\t\t ( (fsntfs_index_entry_header_t *) data )->signature[ 0 ],\n\t\t ( (fsntfs_index_entry_header_t *) data )->signature[ 1 ],\n\t\t ( (fsntfs_index_entry_header_t *) data )->signature[ 2 ],\n\t\t ( (fsntfs_index_entry_header_t *) data )->signature[ 3 ] );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: fixup values offset\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t index_entry_header->fixup_values_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: number of fixup values\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t index_entry_header->number_of_fixup_values );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_index_entry_header_t *) data )->journal_sequence_number,\n\t\t value_64bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: journal sequence number\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t value_64bit );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_index_entry_header_t *) data )->vcn,\n\t\t value_64bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: VCN\\t\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t value_64bit );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( index_entry_header->fixup_values_offset < ( sizeof( fsntfs_index_entry_header_t ) + sizeof( fsntfs_index_node_header_t ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid fix-up values offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the fix-up values offset\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_header_get_fixup_values_offset(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     uint16_t *fixup_values_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_header_get_fixup_values_offset\";\n\n\tif( index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( fixup_values_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid fix-up values offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*fixup_values_offset = index_entry_header->fixup_values_offset;\n\n\treturn( 1 );\n}\n\n/* Retrieves the number of fix-up values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_header_get_number_of_fixup_values(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     uint16_t *number_of_fixup_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_entry_header_get_number_of_fixup_values\";\n\n\tif( index_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( number_of_fixup_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of fix-up values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*number_of_fixup_values = index_entry_header->number_of_fixup_values;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry_header.h",
    "content": "/*\n * The NTFS index entry header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_ENTRY_HEADER_H )\n#define _LIBFSNTFS_INDEX_ENTRY_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_entry_header libfsntfs_index_entry_header_t;\n\nstruct libfsntfs_index_entry_header\n{\n\t/* The fix-up values offset\n\t */\n\tuint16_t fixup_values_offset;\n\n\t/* The number of fix-up values\n\t */\n\tuint16_t number_of_fixup_values;\n};\n\nint libfsntfs_index_entry_header_initialize(\n     libfsntfs_index_entry_header_t **index_entry_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_header_free(\n     libfsntfs_index_entry_header_t **index_entry_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_header_read_data(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_header_get_fixup_values_offset(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     uint16_t *fixup_values_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_header_get_number_of_fixup_values(\n     libfsntfs_index_entry_header_t *index_entry_header,\n     uint16_t *number_of_fixup_values,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_ENTRY_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry_vector.c",
    "content": "/*\n * The index entry vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index_entry.h\"\n#include \"libfsntfs_index_entry_vector.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_unused.h\"\n\n/* Creates an index entry vector\n * Make sure the value index_entry_vector is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_vector_initialize(\n     libfdata_vector_t **index_entry_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint32_t index_entry_size,\n     libcerror_error_t **error )\n{\n\tlibfdata_vector_t *safe_index_entry_vector   = NULL;\n\tlibfsntfs_data_run_t *data_run               = NULL;\n\tstatic char *function                        = \"libfsntfs_index_entry_vector_initialize\";\n\tsize64_t attribute_data_vcn_size             = 0;\n\tsize64_t calculated_allocated_data_size      = 0;\n\tsize64_t stored_allocated_data_size          = 0;\n\toff64_t attribute_data_vcn_offset            = 0;\n\toff64_t calculated_attribute_data_vcn_offset = 0;\n\tuint16_t attribute_data_flags                = 0;\n\tint attribute_index                          = 0;\n\tint entry_index                              = 0;\n\tint number_of_entries                        = 0;\n\tint segment_index                            = 0;\n\n\tif( index_entry_vector == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry vector.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_entry_vector != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index entry vector value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_entry_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid index entry size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_data_flags(\n\t     mft_attribute,\n\t     &attribute_data_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute data flags.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( attribute_data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported compressed attribute data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_get_allocated_data_size(\n\t     mft_attribute,\n\t     &stored_allocated_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute allocated data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_initialize(\n\t     &safe_index_entry_vector,\n\t     (size64_t) index_entry_size,\n\t     NULL,\n\t     NULL,\n\t     NULL,\n\t     (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_index_entry_vector_read_element_data,\n\t     NULL,\n\t     LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index entry vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( mft_attribute != NULL )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_vcn_range(\n\t\t     mft_attribute,\n\t\t     (uint64_t *) &attribute_data_vcn_offset,\n\t\t     (uint64_t *) &attribute_data_vcn_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute data VCN range.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_data_vcn_size != 0xffffffffffffffffULL )\n\t\t{\n\t\t\tif( (uint64_t) attribute_data_vcn_offset > (uint64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_size > (size64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data last VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( attribute_data_vcn_offset > (off64_t) attribute_data_vcn_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tattribute_data_vcn_size   += 1;\n\t\t\tattribute_data_vcn_size   -= attribute_data_vcn_offset;\n\t\t\tattribute_data_vcn_offset *= io_handle->cluster_block_size;\n\t\t\tattribute_data_vcn_size   *= io_handle->cluster_block_size;\n\n\t\t\tif( ( calculated_attribute_data_vcn_offset != 0 )\n\t\t\t && ( calculated_attribute_data_vcn_offset != attribute_data_vcn_offset ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid attribute data VCN offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_attribute_data_vcn_offset = attribute_data_vcn_offset + (off64_t) attribute_data_vcn_size;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_number_of_data_runs(\n\t\t     mft_attribute,\n\t\t     &number_of_entries,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d number of data runs.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfor( entry_index = 0;\n\t\t     entry_index < number_of_entries;\n\t\t     entry_index++ )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_get_data_run_by_index(\n\t\t\t     mft_attribute,\n\t\t\t     entry_index,\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( data_run == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t \"%s: missing attribute: %d data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libfdata_vector_append_segment(\n\t\t\t     safe_index_entry_vector,\n\t\t\t     &segment_index,\n\t\t\t     0,\n\t\t\t     data_run->start_offset,\n\t\t\t     data_run->size,\n\t\t\t     0,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append attribute: %d data run: %d vector segment.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index,\n\t\t\t\t entry_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tcalculated_allocated_data_size += data_run->size;\n\t\t}\n\t\tattribute_index++;\n\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     mft_attribute,\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( calculated_allocated_data_size != stored_allocated_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size of data runs: %\" PRIu64 \" does not match allocated data size: %\" PRIu64 \".\",\n\t\t function,\n\t\t calculated_allocated_data_size,\n\t\t stored_allocated_data_size );\n\n\t\tgoto on_error;\n\t}\n\t*index_entry_vector = safe_index_entry_vector;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_index_entry_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &safe_index_entry_vector,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the index entry\n * Callback function for the index entry vector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_entry_vector_read_element_data(\n     intptr_t *data_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n     off64_t index_entry_offset,\n     size64_t index_entry_size,\n     uint32_t element_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_index_entry_t *index_entry = NULL;\n\tstatic char *function                = \"libfsntfs_index_entry_vector_read_element_data\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( data_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_data_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_flags )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n\tif( (uint64_t) element_index > (uint64_t) UINT32_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid element index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( (uint64_t) index_entry_size > (uint64_t) UINT32_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid index entry size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_entry_initialize(\n\t     &index_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_entry_read_file_io_handle(\n\t     index_entry,\n\t     file_io_handle,\n\t     index_entry_offset,\n\t     (uint32_t) index_entry_size,\n\t     (uint32_t) element_index,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index entry: %d at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t element_index,\n\t\t index_entry_offset,\n\t\t index_entry_offset );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_set_element_value_by_index(\n\t     vector,\n\t     (intptr_t *) file_io_handle,\n\t     cache,\n\t     element_index,\n\t     (intptr_t *) index_entry->node,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_index_node_free,\n\t     LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set index node as element value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tindex_entry->node = NULL;\n\n\tif( libfsntfs_index_entry_free(\n\t     &index_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free index entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( index_entry != NULL )\n\t{\n\t\tlibfsntfs_index_entry_free(\n\t\t &index_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_entry_vector.h",
    "content": "/*\n * The index entry vector functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_ENTRY_VECTOR_H )\n#define _LIBFSNTFS_INDEX_ENTRY_VECTOR_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_index_entry_vector_initialize(\n     libfdata_vector_t **index_entry_vector,\n     libfsntfs_io_handle_t *io_handle,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint32_t index_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_entry_vector_read_element_data(\n     intptr_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_file_index,\n     off64_t index_entry_offset,\n     size64_t index_entry_size,\n     uint32_t element_flags,\n     uint8_t read_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_ENTRY_VECTOR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_node.c",
    "content": "/*\n * Index node functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_index_node_header.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index node\n * Make sure the value index_node is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_initialize(\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_initialize\";\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_node != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index node value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_node = memory_allocate_structure(\n\t               libfsntfs_index_node_t );\n\n\tif( *index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_node,\n\t     0,\n\t     sizeof( libfsntfs_index_node_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index node.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *index_node );\n\n\t\t*index_node = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *index_node )->values_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create values array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_node != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_node );\n\n\t\t*index_node = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index node\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_free(\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_free\";\n\tint result            = 1;\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_node != NULL )\n\t{\n\t\tif( ( *index_node )->header != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_node_header_free(\n\t\t\t     &( ( *index_node )->header ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free index node header.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( libcdata_array_free(\n\t\t     &( ( *index_node )->values_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_index_value_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free values array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *index_node );\n\n\t\t*index_node = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the index node header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_read_header(\n     libfsntfs_index_node_t *index_node,\n     const uint8_t *data,\n     size_t data_size,\n     size_t data_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_read_header\";\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_node->header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index node - header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_offset >= data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: data offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_node_header_initialize(\n\t     &( index_node->header ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create index node header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_index_node_header_read_data(\n\t     index_node->header,\n\t     &( data[ data_offset ] ),\n\t     data_size - data_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read index node header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tindex_node->header_data_offset = data_offset;\n\n\treturn( 1 );\n\non_error:\n\tif( index_node->header != NULL )\n\t{\n\t\tlibfsntfs_index_node_header_free(\n\t\t &( index_node->header ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the index node values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_read_values(\n     libfsntfs_index_node_t *index_node,\n     off64_t index_value_vcn_offset,\n     const uint8_t *data,\n     size_t data_size,\n     size_t data_offset,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_index_value_t *index_value = NULL;\n\tstatic char *function                = \"libfsntfs_index_node_read_values\";\n\tsize_t index_node_size               = 0;\n\tsize_t index_values_offset           = 0;\n\tsize_t unknown_data_size             = 0;\n\tssize_t read_count                   = 0;\n\tuint32_t index_value_flags           = 0;\n\tint entry_index                      = 0;\n\tint index_value_entry                = 0;\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_node->header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid index node - missing header value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_offset >= data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: data offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tindex_values_offset = (size_t) index_node->header->index_values_offset;\n\n\tif( index_values_offset > ( data_size - index_node->header_data_offset ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid index values offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tindex_values_offset += index_node->header_data_offset;\n\n\tindex_node_size = index_node->header->size;\n\n\tif( ( index_node_size < sizeof( fsntfs_index_node_header_t ) )\n\t || ( index_node_size > data_size ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid index node size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tindex_node_size -= sizeof( fsntfs_index_node_header_t );\n\n\tif( index_node_size == 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\tif( data_offset < index_values_offset )\n\t{\n\t\tunknown_data_size = (size_t) index_values_offset - data_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t unknown_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset += unknown_data_size;\n\n\t\tif( unknown_data_size > index_node_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid index values offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tindex_node_size -= (uint32_t) unknown_data_size;\n\t}\n\twhile( index_node_size > 0 )\n\t{\n\t\tif( libfsntfs_index_value_initialize(\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create index value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tread_count = libfsntfs_index_value_read(\n\t\t              index_value,\n\t\t              index_value_vcn_offset + data_offset,\n\t\t              &index_value_entry,\n\t\t              data,\n\t\t              data_size,\n\t\t              data_offset,\n\t\t              error );\n\n\t\tif( read_count == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read index value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset     += read_count;\n\t\tindex_node_size -= (uint32_t) read_count;\n\n\t\tindex_value_flags = index_value->flags;\n\n\t\tif( libcdata_array_append_entry(\n\t\t     index_node->values_array,\n\t\t     &entry_index,\n\t\t     (intptr_t *) index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append index value to values array.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tindex_value = NULL;\n\n\t\tif( ( index_value_flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( index_node_size > 0 )\n\t{\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) index_node_size,\n\t\t\t 0 );\n\t\t}\n\t\tdata_offset += index_node_size;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( index_value != NULL )\n\t{\n\t\tlibfsntfs_index_value_free(\n\t\t &index_value,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_get_number_of_values(\n     libfsntfs_index_node_t *index_node,\n     int *number_of_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_get_number_of_values\";\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     index_node->values_array,\n\t     number_of_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from values array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_get_value_by_index(\n     libfsntfs_index_node_t *index_node,\n     int value_entry,\n     libfsntfs_index_value_t **value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_get_value_by_index\";\n\n\tif( index_node == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     index_node->values_array,\n\t     value_entry,\n\t     (intptr_t **) value,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from values array.\",\n\t\t function,\n\t\t value_entry );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_node.h",
    "content": "/*\n * Index node functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_NODE_H )\n#define _LIBFSNTFS_INDEX_NODE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_index_node_header.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_node libfsntfs_index_node_t;\n\nstruct libfsntfs_index_node\n{\n\t/* The node header data offset\n\t */\n\tsize_t header_data_offset;\n\n\t/* The header\n\t */\n\tlibfsntfs_index_node_header_t *header;\n\n\t/* The values array\n\t */\n\tlibcdata_array_t *values_array;\n};\n\nint libfsntfs_index_node_initialize(\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_free(\n     libfsntfs_index_node_t **index_node,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_read_header(\n     libfsntfs_index_node_t *index_node,\n     const uint8_t *data,\n     size_t data_size,\n     size_t data_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_read_values(\n     libfsntfs_index_node_t *index_node,\n     off64_t index_value_vcn_offset,\n     const uint8_t *data,\n     size_t data_size,\n     size_t data_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_get_number_of_values(\n     libfsntfs_index_node_t *index_node,\n     int *number_of_values,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_get_value_by_index(\n     libfsntfs_index_node_t *index_node,\n     int value_entry,\n     libfsntfs_index_value_t **value,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_NODE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_node_header.c",
    "content": "/*\n * Index node header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index_node_header.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index node header\n * Make sure the value index_node_header is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_header_initialize(\n     libfsntfs_index_node_header_t **index_node_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_header_initialize\";\n\n\tif( index_node_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_node_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index node header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_node_header = memory_allocate_structure(\n\t                      libfsntfs_index_node_header_t );\n\n\tif( *index_node_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index node header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_node_header,\n\t     0,\n\t     sizeof( libfsntfs_index_node_header_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index node header.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *index_node_header );\n\n\t\t*index_node_header = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_node_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_node_header );\n\n\t\t*index_node_header = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index node header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_node_header_free(\n     libfsntfs_index_node_header_t **index_node_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_header_free\";\n\n\tif( index_node_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_node_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_node_header );\n\n\t\t*index_node_header = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the index node header header\n * Returns the number of bytes read if successful or -1 on error\n */\nint libfsntfs_index_node_header_read_data(\n     libfsntfs_index_node_header_t *index_node_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_node_header_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint32_t value_32bit  = 0;\n#endif\n\n\tif( index_node_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index node header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < sizeof( fsntfs_index_node_header_t ) )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index node header header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_index_node_header_t ),\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_node_header_t *) data )->index_values_offset,\n\t index_node_header->index_values_offset );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_node_header_t *) data )->size,\n\t index_node_header->size );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_node_header_t *) data )->flags,\n\t index_node_header->flags );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index values offset\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t index_node_header->index_values_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: size\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t index_node_header->size );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_index_node_header_t *) data )->allocated_size,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: allocated size\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: flags\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t index_node_header->flags );\n\t\tlibfsntfs_debug_print_index_node_flags(\n\t\t index_node_header->flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( index_node_header->size > 0 )\n\t{\n\t\tif( (size_t) index_node_header->size < sizeof( fsntfs_index_node_header_t ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid index node header size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( ( (size_t) index_node_header->index_values_offset < sizeof( fsntfs_index_node_header_t ) )\n\t\t || ( index_node_header->index_values_offset > index_node_header->size )\n\t\t || ( ( index_node_header->index_values_offset % 8 ) != 0 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid index values offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_node_header.h",
    "content": "/*\n * Index node header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_NODE_HEADER_H )\n#define _LIBFSNTFS_INDEX_NODE_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_node_header libfsntfs_index_node_header_t;\n\nstruct libfsntfs_index_node_header\n{\n\t/* The size\n\t */\n\tuint32_t size;\n\n\t/* The index values offset\n\t */\n\tuint32_t index_values_offset;\n\n\t/* The flags\n\t */\n\tuint32_t flags;\n};\n\nint libfsntfs_index_node_header_initialize(\n     libfsntfs_index_node_header_t **index_node_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_header_free(\n     libfsntfs_index_node_header_t **index_node_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_node_header_read_data(\n     libfsntfs_index_node_header_t *index_node_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_NODE_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_root_header.c",
    "content": "/*\n * The NTFS index root header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_index_root_header.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index root header\n * Make sure the value index_root_header is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_initialize(\n     libfsntfs_index_root_header_t **index_root_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_initialize\";\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_root_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index root header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_root_header = memory_allocate_structure(\n\t                      libfsntfs_index_root_header_t );\n\n\tif( *index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_root_header,\n\t     0,\n\t     sizeof( libfsntfs_index_root_header_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index root header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_root_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_root_header );\n\n\t\t*index_root_header = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index root header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_free(\n     libfsntfs_index_root_header_t **index_root_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_free\";\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_root_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_root_header );\n\n\t\t*index_root_header = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the index root header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_read_data(\n     libfsntfs_index_root_header_t *index_root_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint32_t value_32bit  = 0;\n#endif\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < sizeof( fsntfs_index_root_header_t ) )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index root header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_index_root_header_t ),\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_root_header_t *) data )->attribute_type,\n\t index_root_header->attribute_type );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_root_header_t *) data )->collation_type,\n\t index_root_header->collation_type );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_root_header_t *) data )->index_entry_size,\n\t index_root_header->index_entry_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: attribute type\\t\\t\\t\\t: 0x%08\" PRIx32 \" (%s)\\n\",\n\t\t function,\n\t\t index_root_header->attribute_type,\n\t\t libfsntfs_debug_print_attribute_type(\n\t\t  index_root_header->attribute_type ) );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: collation type\\t\\t\\t\\t: 0x%08\" PRIx32 \" (%s)\\n\",\n\t\t function,\n\t\t index_root_header->collation_type,\n\t\t libfsntfs_debug_print_collation_type(\n\t\t  index_root_header->collation_type ) );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index entry size\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t index_root_header->index_entry_size );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_index_root_header_t *) data )->index_entry_number_of_cluster_blocks,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: index entry number of cluster blocks\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n}\n\n/* Retrieves the index entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_get_index_entry_size(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *index_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_get_index_entry_size\";\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_entry_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_entry_size = index_root_header->index_entry_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the attribute type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_get_attribute_type(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *attribute_type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_get_attribute_type\";\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*attribute_type = index_root_header->attribute_type;\n\n\treturn( 1 );\n}\n\n/* Retrieves the collation type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_root_header_get_collation_type(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *collation_type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_root_header_get_collation_type\";\n\n\tif( index_root_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index root header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( collation_type == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid collation type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*collation_type = index_root_header->collation_type;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_root_header.h",
    "content": "/*\n * The NTFS index root header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_ROOT_HEADER_H )\n#define _LIBFSNTFS_INDEX_ROOT_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_root_header libfsntfs_index_root_header_t;\n\nstruct libfsntfs_index_root_header\n{\n\t/* The index entry size\n\t */\n\tuint32_t index_entry_size;\n\n\t/* The attribute type\n\t */\n\tuint32_t attribute_type;\n\n\t/* The collation type\n\t */\n\tuint32_t collation_type;\n};\n\nint libfsntfs_index_root_header_initialize(\n     libfsntfs_index_root_header_t **index_root_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_root_header_free(\n     libfsntfs_index_root_header_t **index_root_header,\n     libcerror_error_t **error );\n\nint libfsntfs_index_root_header_read_data(\n     libfsntfs_index_root_header_t *index_root_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_root_header_get_index_entry_size(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *index_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_index_root_header_get_attribute_type(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *attribute_type,\n     libcerror_error_t **error );\n\nint libfsntfs_index_root_header_get_collation_type(\n     libfsntfs_index_root_header_t *index_root_header,\n     uint32_t *collation_type,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_ROOT_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_value.c",
    "content": "/*\n * Index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n\n#include \"fsntfs_index.h\"\n\n/* Creates an index value\n * Make sure the value index_value is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_value_initialize(\n     libfsntfs_index_value_t **index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_value_initialize\";\n\n\tif( index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_value != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid index value value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_value = memory_allocate_structure(\n\t                libfsntfs_index_value_t );\n\n\tif( *index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create index value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *index_value,\n\t     0,\n\t     sizeof( libfsntfs_index_value_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear index value.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *index_value );\n\n\t\t*index_value = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *index_value != NULL )\n\t{\n\t\tmemory_free(\n\t\t *index_value );\n\n\t\t*index_value = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an index value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_index_value_free(\n     libfsntfs_index_value_t **index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_index_value_free\";\n\n\tif( index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *index_value != NULL )\n\t{\n\t\tif( ( *index_value )->key_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *index_value )->key_data );\n\t\t}\n\t\tif( ( *index_value )->value_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *index_value )->value_data );\n\t\t}\n\t\tmemory_free(\n\t\t *index_value );\n\n\t\t*index_value = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the index value\n * Returns the number of bytes read if successful or -1 on error\n */\nssize_t libfsntfs_index_value_read(\n         libfsntfs_index_value_t *index_value,\n         off64_t index_value_vcn_offset,\n         int *index_value_entry,\n         const uint8_t *data,\n         size_t data_size,\n         size_t data_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function   = \"libfsntfs_index_value_read\";\n\tuint32_t remaining_size = 0;\n\n\tif( index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_value_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index value entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_offset > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data offset value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_offset >= data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: data offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < sizeof( fsntfs_index_value_t ) )\n\t || ( data_offset > ( data_size - sizeof( fsntfs_index_value_t ) ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: data size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tindex_value->offset = index_value_vcn_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d header data:\\n\",\n\t\t function,\n\t\t *index_value_entry );\n\t\tlibcnotify_print_data(\n\t\t &( data[ data_offset ] ),\n\t\t sizeof( fsntfs_index_value_t ),\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_index_value_t *) &( data[ data_offset ] ) )->file_reference,\n\t index_value->file_reference );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_index_value_t *) &( data[ data_offset ] ) )->size,\n\t index_value->size );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_index_value_t *) &( data[ data_offset ] ) )->key_data_size,\n\t index_value->key_data_size );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_index_value_t *) &( data[ data_offset ] ) )->flags,\n\t index_value->flags );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t function,\n\t\t *index_value_entry,\n\t\t index_value->file_reference & 0xffffffffffffUL,\n\t\t index_value->file_reference >> 48 );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d offset\\t\\t\\t: %\" PRIi64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t *index_value_entry,\n\t\t index_value->offset,\n\t\t index_value->offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d size\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t *index_value_entry,\n\t\t index_value->size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d key data size\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t *index_value_entry,\n\t\t index_value->key_data_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index value: %03d flags\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t *index_value_entry,\n\t\t index_value->flags );\n\t\tlibfsntfs_debug_print_index_value_flags(\n\t\t index_value->flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tdata_offset += sizeof( fsntfs_index_value_t );\n\n\tif( ( (size_t) index_value->size < sizeof( fsntfs_index_value_t ) )\n\t || ( (size_t) index_value->size > data_size ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: index value: %03d size exceeds data size.\",\n\t\t function,\n\t\t *index_value_entry );\n\n\t\tgoto on_error;\n\t}\n\tremaining_size = (size_t) index_value->size - sizeof( fsntfs_index_value_t );\n\n\tif( index_value->key_data_size > 0 )\n\t{\n\t\tif( (uint32_t) index_value->key_data_size > remaining_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: index value: %03d data size exceeds size.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tindex_value->key_data = (uint8_t *) memory_allocate(\n\t\t                                     sizeof( uint8_t ) * index_value->key_data_size );\n\n\t\tif( index_value->key_data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create index value: %03d key data.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( data_offset > ( data_size - index_value->key_data_size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: data size value too small.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     index_value->key_data,\n\t\t     &( data[ data_offset ] ),\n\t\t     (size_t) index_value->key_data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy index value: %03d data.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d key data:\\n\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) index_value->key_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset    += index_value->key_data_size;\n\t\tremaining_size -= index_value->key_data_size;\n\t}\n\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n\t\tif( remaining_size < 8 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: index value: %03d sub node data size exceeds size.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tremaining_size -= 8;\n\t}\n\tif( remaining_size > 0 )\n\t{\n\t\tindex_value->value_data = (uint8_t *) memory_allocate(\n\t\t                                       sizeof( uint8_t ) * remaining_size );\n\n\t\tif( index_value->value_data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create index value: %03d value data.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tindex_value->value_data_size = remaining_size;\n\n\t\tif( data_offset > ( data_size - index_value->value_data_size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: data size value too small.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     index_value->value_data,\n\t\t     &( data[ data_offset ] ),\n\t\t     (size_t) index_value->value_data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy index value: %03d data.\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d value data:\\n\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\t\t\tlibcnotify_print_data(\n\t\t\t index_value->value_data,\n\t\t\t (size_t) index_value->value_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset += remaining_size;\n\t}\n\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d sub node VCN data:\\n\",\n\t\t\t function,\n\t\t\t *index_value_entry );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t 8,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tif( data_offset > ( data_size - 8 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: data size value too small.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t &( data[ data_offset ] ),\n\t\t index_value->sub_node_vcn );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index value: %03d sub node VCN\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t *index_value_entry,\n\t\t\t index_value->sub_node_vcn );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t}\n\t*index_value_entry += 1;\n\n\treturn( (ssize_t) index_value->size );\n\non_error:\n\tif( index_value->value_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t index_value->value_data );\n\n\t\tindex_value->value_data = NULL;\n\t}\n\tindex_value->value_data_size = 0;\n\n\tif( index_value->key_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t index_value->key_data );\n\n\t\tindex_value->key_data = NULL;\n\t}\n\tindex_value->key_data_size = 0;\n\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_index_value.h",
    "content": "/*\n * Index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INDEX_VALUE_H )\n#define _LIBFSNTFS_INDEX_VALUE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_index_value libfsntfs_index_value_t;\n\nstruct libfsntfs_index_value\n{\n\t/* The offset\n\t */\n\toff64_t offset;\n\n\t/* The size\n\t */\n\tuint32_t size;\n\n\t/* The key data\n\t */\n\tuint8_t *key_data;\n\n\t/* The key data size\n\t */\n\tuint16_t key_data_size;\n\n\t/* The value data\n\t */\n\tuint8_t *value_data;\n\n\t/* The value data size\n\t */\n\tuint32_t value_data_size;\n\n\t/* The file reference\n\t */\n\tuint64_t file_reference;\n\n\t/* The flags\n\t */\n\tuint32_t flags;\n\n\t/* The sub node virtual cluster number (VCN)\n\t */\n\tuint64_t sub_node_vcn;\n};\n\nint libfsntfs_index_value_initialize(\n     libfsntfs_index_value_t **index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_index_value_free(\n     libfsntfs_index_value_t **index_value,\n     libcerror_error_t **error );\n\nssize_t libfsntfs_index_value_read(\n         libfsntfs_index_value_t *index_value,\n         off64_t index_value_vcn_offset,\n         int *index_value_entry,\n         const uint8_t *data,\n         size_t data_size,\n         size_t data_offset,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INDEX_VALUE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_io_handle.c",
    "content": "/*\n * Input/Output (IO) handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n\nconst char *fsntfs_volume_file_system_signature = \"NTFS    \";\n\n/* Creates an IO handle\n * Make sure the value io_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_io_handle_initialize(\n     libfsntfs_io_handle_t **io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_io_handle_initialize\";\n\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *io_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid IO handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*io_handle = memory_allocate_structure(\n\t              libfsntfs_io_handle_t );\n\n\tif( *io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *io_handle,\n\t     0,\n\t     sizeof( libfsntfs_io_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear IO handle.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *io_handle );\n\n\t\t*io_handle = NULL;\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_PROFILER )\n\tif( libfsntfs_profiler_initialize(\n\t     &( ( *io_handle )->profiler ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize profiler.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_profiler_open(\n\t     ( *io_handle )->profiler,\n\t     \"profiler.csv\",\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open profiler.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif /* defined( HAVE_PROFILER ) */\n\n\treturn( 1 );\n\non_error:\n\tif( *io_handle != NULL )\n\t{\n#if defined( HAVE_PROFILER )\n\t\tif( ( *io_handle )->profiler != NULL )\n\t\t{\n\t\t\tlibfsntfs_profiler_free(\n\t\t\t &( ( *io_handle )->profiler ),\n\t\t\t NULL );\n\t\t}\n#endif\n\t\tmemory_free(\n\t\t *io_handle );\n\n\t\t*io_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees an IO handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_io_handle_free(\n     libfsntfs_io_handle_t **io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_io_handle_free\";\n\tint result            = 1;\n\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *io_handle != NULL )\n\t{\n#if defined( HAVE_PROFILER )\n\t\tif( libfsntfs_profiler_close(\n\t\t     ( *io_handle )->profiler,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close profiler.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libfsntfs_profiler_free(\n\t\t     &( ( *io_handle )->profiler ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free profiler.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif /* defined( HAVE_PROFILER ) */\n\n\t\tmemory_free(\n\t\t *io_handle );\n\n\t\t*io_handle = NULL;\n\t}\n\treturn( result );\n}\n\n/* Clears the IO handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_io_handle_clear(\n     libfsntfs_io_handle_t *io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function          = \"libfsntfs_io_handle_clear\";\n\n#if defined( HAVE_PROFILER )\n\tlibfsntfs_profiler_t *profiler = NULL;\n#endif\n\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_PROFILER )\n\tprofiler = io_handle->profiler;\n#endif\n\tif( memory_set(\n\t     io_handle,\n\t     0,\n\t     sizeof( libfsntfs_io_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_PROFILER )\n\tio_handle->profiler = profiler;\n#endif\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_io_handle.h",
    "content": "/*\n * Input/Output (IO) handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_IO_HANDLE_H )\n#define _LIBFSNTFS_IO_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_profiler.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern const char *fsntfs_volume_file_system_signature;\n\ntypedef struct libfsntfs_io_handle libfsntfs_io_handle_t;\n\nstruct libfsntfs_io_handle\n{\n\t/* The cluster block size\n\t */\n\tsize32_t cluster_block_size;\n\n\t/* The index entry size\n\t */\n\tuint32_t index_entry_size;\n\n\t/* The MFT entry size\n\t */\n\tuint32_t mft_entry_size;\n\n\t/* The number of bytes per sector\n\t */\n\tuint16_t bytes_per_sector;\n\n#if defined( HAVE_PROFILER )\n\t/* The profiler\n\t */\n\tlibfsntfs_profiler_t *profiler;\n#endif\n\n\t/* Value to indicate if abort was signalled\n\t */\n\tint abort;\n};\n\nint libfsntfs_io_handle_initialize(\n     libfsntfs_io_handle_t **io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_io_handle_free(\n     libfsntfs_io_handle_t **io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_io_handle_clear(\n     libfsntfs_io_handle_t *io_handle,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_IO_HANDLE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libbfio.h",
    "content": "/*\n * The libbfio header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBBFIO_H )\n#define _LIBFSNTFS_LIBBFIO_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBBFIO for local use of libbfio\n */\n#if defined( HAVE_LOCAL_LIBBFIO )\n\n#include <libbfio_definitions.h>\n#include <libbfio_file.h>\n#include <libbfio_file_pool.h>\n#include <libbfio_file_range.h>\n#include <libbfio_handle.h>\n#include <libbfio_memory_range.h>\n#include <libbfio_pool.h>\n#include <libbfio_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT\n * before including libbfio.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBBFIO_DLL_IMPORT\n#endif\n\n#include <libbfio.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT )\n#error Multi-threading support requires libbfio with multi-threading support\n#endif\n\n#endif /* defined( HAVE_LOCAL_LIBBFIO ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBBFIO_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libcdata.h",
    "content": "/*\n * The libcdata header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBCDATA_H )\n#define _LIBFSNTFS_LIBCDATA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCDATA for local use of libcdata\n */\n#if defined( HAVE_LOCAL_LIBCDATA )\n\n#include <libcdata_array.h>\n#include <libcdata_btree.h>\n#include <libcdata_definitions.h>\n#include <libcdata_list.h>\n#include <libcdata_list_element.h>\n#include <libcdata_range_list.h>\n#include <libcdata_tree_node.h>\n#include <libcdata_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT\n * before including libcdata.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCDATA_DLL_IMPORT\n#endif\n\n#include <libcdata.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCDATA ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBCDATA_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libcerror.h",
    "content": "/*\n * The libcerror header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBCERROR_H )\n#define _LIBFSNTFS_LIBCERROR_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCERROR for local use of libcerror\n */\n#if defined( HAVE_LOCAL_LIBCERROR )\n\n#include <libcerror_definitions.h>\n#include <libcerror_error.h>\n#include <libcerror_system.h>\n#include <libcerror_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT\n * before including libcerror.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCERROR_DLL_IMPORT\n#endif\n\n#include <libcerror.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCERROR ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBCERROR_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libclocale.h",
    "content": "/*\n * The libclocale header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBCLOCALE_H )\n#define _LIBFSNTFS_LIBCLOCALE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale\n */\n#if defined( HAVE_LOCAL_LIBCLOCALE )\n\n#include <libclocale_codepage.h>\n#include <libclocale_definitions.h>\n#include <libclocale_locale.h>\n#include <libclocale_support.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT\n * before including libclocale.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCLOCALE_DLL_IMPORT\n#endif\n\n#include <libclocale.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBCLOCALE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libcnotify.h",
    "content": "/*\n * The libcnotify header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBCNOTIFY_H )\n#define _LIBFSNTFS_LIBCNOTIFY_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify\n */\n#if defined( HAVE_LOCAL_LIBCNOTIFY )\n\n#include <libcnotify_definitions.h>\n#include <libcnotify_print.h>\n#include <libcnotify_stream.h>\n#include <libcnotify_verbose.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT\n * before including libcnotify.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCNOTIFY_DLL_IMPORT\n#endif\n\n#include <libcnotify.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBCNOTIFY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libcthreads.h",
    "content": "/*\n * The libcthreads header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBCTHREADS_H )\n#define _LIBFSNTFS_LIBCTHREADS_H\n\n#include <common.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBFSNTFS )\n#define HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT\n#endif\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\n/* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads\n */\n#if defined( HAVE_LOCAL_LIBCTHREADS )\n\n#include <libcthreads_condition.h>\n#include <libcthreads_definitions.h>\n#include <libcthreads_lock.h>\n#include <libcthreads_mutex.h>\n#include <libcthreads_read_write_lock.h>\n#include <libcthreads_queue.h>\n#include <libcthreads_thread.h>\n#include <libcthreads_thread_attributes.h>\n#include <libcthreads_thread_pool.h>\n#include <libcthreads_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCTHREADS_DLL_IMPORT\n * before including libcthreads.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCTHREADS_DLL_IMPORT\n#endif\n\n#include <libcthreads.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCTHREADS ) */\n\n#endif /* defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBCTHREADS_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libfcache.h",
    "content": "/*\n * The libfcache header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBFCACHE_H )\n#define _LIBFSNTFS_LIBFCACHE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache\n */\n#if defined( HAVE_LOCAL_LIBFCACHE )\n\n#include <libfcache_cache.h>\n#include <libfcache_date_time.h>\n#include <libfcache_definitions.h>\n#include <libfcache_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT\n * before including libfcache.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFCACHE_DLL_IMPORT\n#endif\n\n#include <libfcache.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFCACHE ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBFCACHE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libfdata.h",
    "content": "/*\n * The libfdata header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBFDATA_H )\n#define _LIBFSNTFS_LIBFDATA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFDATA for local use of libfdata\n */\n#if defined( HAVE_LOCAL_LIBFDATA )\n\n#include <libfdata_area.h>\n#include <libfdata_definitions.h>\n#include <libfdata_list.h>\n#include <libfdata_list_element.h>\n#include <libfdata_range_list.h>\n#include <libfdata_stream.h>\n#include <libfdata_types.h>\n#include <libfdata_vector.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFDATA_DLL_IMPORT\n * before including libfdata.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFDATA_DLL_IMPORT\n#endif\n\n#include <libfdata.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFDATA ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBFDATA_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libfdatetime.h",
    "content": "/*\n * The libfdatetime header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBFDATETIME_H )\n#define _LIBFSNTFS_LIBFDATETIME_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime\n */\n#if defined( HAVE_LOCAL_LIBFDATETIME )\n\n#include <libfdatetime_date_time_values.h>\n#include <libfdatetime_definitions.h>\n#include <libfdatetime_fat_date_time.h>\n#include <libfdatetime_filetime.h>\n#include <libfdatetime_floatingtime.h>\n#include <libfdatetime_hfs_time.h>\n#include <libfdatetime_nsf_timedate.h>\n#include <libfdatetime_posix_time.h>\n#include <libfdatetime_systemtime.h>\n#include <libfdatetime_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT\n * before including libfdatetime.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFDATETIME_DLL_IMPORT\n#endif\n\n#include <libfdatetime.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFDATETIME ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBFDATETIME_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libfguid.h",
    "content": "/*\n * The libfguid header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBFGUID_H )\n#define _LIBFSNTFS_LIBFGUID_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFGUID for local use of libfguid\n */\n#if defined( HAVE_LOCAL_LIBFGUID )\n\n#include <libfguid_definitions.h>\n#include <libfguid_identifier.h>\n#include <libfguid_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT\n * before including libfguid.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFGUID_DLL_IMPORT\n#endif\n\n#include <libfguid.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFGUID ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBFGUID_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libfwnt.h",
    "content": "/*\n * The libfwnt header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBFWNT_H )\n#define _LIBFSNTFS_LIBFWNT_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt\n */\n#if defined( HAVE_LOCAL_LIBFWNT )\n\n#include <libfwnt_access_control_entry.h>\n#include <libfwnt_access_control_list.h>\n#include <libfwnt_bit_stream.h>\n#include <libfwnt_definitions.h>\n#include <libfwnt_huffman_tree.h>\n#include <libfwnt_locale_identifier.h>\n#include <libfwnt_lznt1.h>\n#include <libfwnt_lzx.h>\n#include <libfwnt_lzxpress.h>\n#include <libfwnt_security_descriptor.h>\n#include <libfwnt_security_identifier.h>\n#include <libfwnt_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFWNT_DLL_IMPORT\n * before including libfwnt.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFWNT_DLL_IMPORT\n#endif\n\n#include <libfwnt.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFWNT ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBFWNT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_libuna.h",
    "content": "/*\n * The libuna header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LIBUNA_H )\n#define _LIBFSNTFS_LIBUNA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBUNA for local use of libuna\n */\n#if defined( HAVE_LOCAL_LIBUNA )\n\n#include <libuna_base16_stream.h>\n#include <libuna_base32_stream.h>\n#include <libuna_base64_stream.h>\n#include <libuna_byte_stream.h>\n#include <libuna_unicode_character.h>\n#include <libuna_url_stream.h>\n#include <libuna_utf16_stream.h>\n#include <libuna_utf16_string.h>\n#include <libuna_utf32_stream.h>\n#include <libuna_utf32_string.h>\n#include <libuna_utf7_stream.h>\n#include <libuna_utf8_stream.h>\n#include <libuna_utf8_string.h>\n#include <libuna_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT\n * before including libuna.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBUNA_DLL_IMPORT\n#endif\n\n#include <libuna.h>\n\n#endif /* defined( HAVE_LOCAL_LIBUNA ) */\n\n#endif /* !defined( _LIBFSNTFS_LIBUNA_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_logged_utility_stream_values.c",
    "content": "/*\n * Logged utility stream attribute ($LOGGED_UTILITY_STREAM) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_logged_utility_stream_values.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#include \"fsntfs_logged_utility_stream.h\"\n\n/* Creates logged utility stream values\n * Make sure the value logged_utility_stream_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_logged_utility_stream_values_initialize(\n     libfsntfs_logged_utility_stream_values_t **logged_utility_stream_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_logged_utility_stream_values_initialize\";\n\n\tif( logged_utility_stream_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid logged utility stream values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *logged_utility_stream_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid logged utility stream values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*logged_utility_stream_values = memory_allocate_structure(\n\t                                 libfsntfs_logged_utility_stream_values_t );\n\n\tif( *logged_utility_stream_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create logged utility stream values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *logged_utility_stream_values,\n\t     0,\n\t     sizeof( libfsntfs_logged_utility_stream_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear logged utility stream values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *logged_utility_stream_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *logged_utility_stream_values );\n\n\t\t*logged_utility_stream_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees logged utility stream values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_logged_utility_stream_values_free(\n     libfsntfs_logged_utility_stream_values_t **logged_utility_stream_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_logged_utility_stream_values_free\";\n\n\tif( logged_utility_stream_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid logged utility stream values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *logged_utility_stream_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *logged_utility_stream_values );\n\n\t\t*logged_utility_stream_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the logged utility stream values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_logged_utility_stream_values_read_data(\n     libfsntfs_logged_utility_stream_values_t *logged_utility_stream_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_logged_utility_stream_values_read_data\";\n\n\tif( logged_utility_stream_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid logged utility stream values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: logged utility stream data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( data_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported logged utility stream data size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Reads the logged utility stream values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n     libfsntfs_logged_utility_stream_values_t *logged_utility_stream_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_logged_utility_stream_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( logged_utility_stream_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid logged utility stream values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_logged_utility_stream_values_read_data(\n\t     logged_utility_stream_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read logged utility stream values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_logged_utility_stream_values.h",
    "content": "/*\n * Logged utility stream attribute ($LOGGED_UTILITY_STREAM) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_LOGGED_UTILITY_STREAM_VALUES_H )\n#define _LIBFSNTFS_LOGGED_UTILITY_STREAM_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_logged_utility_stream_values libfsntfs_logged_utility_stream_values_t;\n\nstruct libfsntfs_logged_utility_stream_values\n{\n\t/* Dummy\n\t */\n\tint dummy;\n};\n\nint libfsntfs_logged_utility_stream_values_initialize(\n     libfsntfs_logged_utility_stream_values_t **logged_utility_stream_values,\n     libcerror_error_t **error );\n\nint libfsntfs_logged_utility_stream_values_free(\n     libfsntfs_logged_utility_stream_values_t **logged_utility_stream_values,\n     libcerror_error_t **error );\n\nint libfsntfs_logged_utility_stream_values_read_data(\n     libfsntfs_logged_utility_stream_values_t *logged_utility_stream_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n     libfsntfs_logged_utility_stream_values_t *logged_utility_stream_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_LOGGED_UTILITY_STREAM_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft.c",
    "content": "/*\n * MFT functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_types.h\"\n\n/* Creates a MFT\n * Make sure the value mft is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_initialize(\n     libfsntfs_mft_t **mft,\n     libfsntfs_io_handle_t *io_handle,\n     size64_t mft_entry_size,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_initialize\";\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft = memory_allocate_structure(\n\t        libfsntfs_mft_t );\n\n\tif( *mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *mft,\n\t     0,\n\t     sizeof( libfsntfs_mft_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear MFT.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *mft );\n\n\t\t*mft = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_vector_initialize(\n\t     &( ( *mft )->mft_entry_vector ),\n\t     mft_entry_size,\n\t     (intptr_t *) io_handle,\n\t     NULL,\n\t     NULL,\n\t     (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libfsntfs_mft_entry_read_element_data,\n\t     NULL,\n\t     LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry vector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfcache_cache_initialize(\n\t     &( ( *mft )->mft_entry_cache ),\n\t     LIBFSNTFS_MAXIMUM_CACHE_ENTRIES_MFT_ENTRIES,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfcache_cache_initialize(\n\t     &( ( *mft )->single_mft_entry_cache ),\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create signle MFT entry cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *mft )->io_handle = io_handle;\n\t( *mft )->flags     = flags;\n\n\treturn( 1 );\n\non_error:\n\tif( *mft != NULL )\n\t{\n\t\tif( ( *mft )->mft_entry_cache != NULL )\n\t\t{\n\t\t\tlibfcache_cache_free(\n\t\t\t &( ( *mft )->mft_entry_cache ),\n\t\t\t NULL );\n\t\t}\n\t\tif( ( *mft )->mft_entry_vector != NULL )\n\t\t{\n\t\t\tlibfdata_vector_free(\n\t\t\t &( ( *mft )->mft_entry_vector ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *mft );\n\n\t\t*mft = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a MFT\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_free(\n     libfsntfs_mft_t **mft,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_free\";\n\tint result            = 1;\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft != NULL )\n\t{\n\t\tif( libfdata_vector_free(\n\t\t     &( ( *mft )->mft_entry_vector ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free MFT entry vector.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libfcache_cache_free(\n\t\t     &( ( *mft )->mft_entry_cache ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free MFT entry cache.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libfcache_cache_free(\n\t\t     &( ( *mft )->single_mft_entry_cache ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free single MFT entry cache.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( ( *mft )->attribute_list_tree != NULL )\n\t\t{\n\t\t\tif( libcdata_btree_free(\n\t\t\t     &( ( *mft )->attribute_list_tree ),\n\t\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_list_free,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attribute list tree.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *mft );\n\n\t\t*mft = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the attribute list data MFT entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_read_list_data_mft_entries(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                        = NULL;\n\tlibfsntfs_mft_attribute_list_t *attribute_list          = NULL;\n\tlibfsntfs_mft_attribute_list_t *existing_attribute_list = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry                        = NULL;\n\tstatic char *function                                   = \"libfsntfs_mft_read_list_data_mft_entries\";\n\tuint64_t base_record_file_reference                     = 0;\n\tuint64_t file_reference                                 = 0;\n\tuint64_t mft_entry_index                                = 0;\n\tint result                                              = 0;\n\tint value_index                                         = 0;\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft->attribute_list_tree != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT - attribute list tree value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_btree_initialize(\n\t     &( mft->attribute_list_tree ),\n\t     LIBFSNTFS_INDEX_TREE_MAXIMUM_NUMBER_OF_SUB_NODES,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create attribute list B-tree.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( mft_entry_index = 0;\n\t     mft_entry_index < mft->number_of_mft_entries;\n\t     mft_entry_index++ )\n\t{\n\t\tif( libfdata_vector_get_element_value_by_index(\n\t\t     mft->mft_entry_vector,\n\t\t     (intptr_t *) file_io_handle,\n\t\t     (libfdata_cache_t *) mft->mft_entry_cache,\n\t\t     (int) mft_entry_index,\n\t\t     (intptr_t **) &mft_entry,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t\t          mft_entry,\n\t\t          &base_record_file_reference,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve base record file reference from MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( result == 0 )\n\t\t || ( base_record_file_reference == 0 ) )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_initialize(\n\t\t     &attribute_list,\n\t\t     base_record_file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create attribute list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libcdata_btree_insert_value(\n\t\t\t  mft->attribute_list_tree,\n\t\t\t  &value_index,\n\t\t\t  (intptr_t *) attribute_list,\n\t\t\t  (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_mft_attribute_list_compare_by_base_record_file_reference,\n\t\t\t  &upper_node,\n\t\t\t  (intptr_t **) &existing_attribute_list,\n\t\t\t  error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to insert attribute list into tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_list_free(\n\t\t\t     &attribute_list,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attribute list.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\texisting_attribute_list = attribute_list;\n\n\t\t\tattribute_list = NULL;\n\t\t}\n\t\tif( libfsntfs_mft_entry_get_file_reference(\n\t\t     mft_entry,\n\t\t     &file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve file reference from MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_insert_file_reference(\n\t\t     existing_attribute_list,\n\t\t     file_reference,\n\t\t     error ) == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to insert attribute list data file reference in attribute list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &attribute_list,\n\t\t NULL );\n\t}\n\tif( mft->attribute_list_tree != NULL )\n\t{\n\t\tlibcdata_btree_free(\n\t\t &( mft->attribute_list_tree ),\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_list_free,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of MFT entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_get_number_of_entries(\n     libfsntfs_mft_t *mft,\n     uint64_t *number_of_entries,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_get_number_of_entries\";\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( number_of_entries == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*number_of_entries = mft->number_of_mft_entries;\n\n\treturn( 1 );\n}\n\n/* Retrieves the MFT entry for a specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_get_mft_entry_by_index(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_entry_t *safe_mft_entry = NULL;\n\tstatic char *function                 = \"libfsntfs_mft_get_mft_entry_by_index\";\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry_index > mft->number_of_mft_entries )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT entry index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_vector_get_element_value_by_index(\n\t     mft->mft_entry_vector,\n\t     (intptr_t *) file_io_handle,\n\t     (libfdata_cache_t *) mft->mft_entry_cache,\n\t     (int) mft_entry_index,\n\t     (intptr_t **) &safe_mft_entry,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_read_attributes(\n\t     safe_mft_entry,\n\t     mft->io_handle,\n\t     file_io_handle,\n\t     mft->mft_entry_vector,\n\t     mft->attribute_list_tree,\n\t     mft->flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry: %d attributes.\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry = safe_mft_entry;\n\n\treturn( 1 );\n}\n\n/* Retrieves the MFT entry for a specific index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_get_mft_entry_by_index_no_cache(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_entry_t *safe_mft_entry = NULL;\n\tstatic char *function                 = \"libfsntfs_mft_get_mft_entry_by_index_no_cache\";\n\n\tif( mft == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry_index > mft->number_of_mft_entries )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT entry index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_vector_get_element_value_by_index(\n\t     mft->mft_entry_vector,\n\t     (intptr_t *) file_io_handle,\n\t     (libfdata_cache_t *) mft->single_mft_entry_cache,\n\t     (int) mft_entry_index,\n\t     (intptr_t **) &safe_mft_entry,\n\t     LIBFDATA_READ_FLAG_IGNORE_CACHE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_read_attributes(\n\t     safe_mft_entry,\n\t     mft->io_handle,\n\t     file_io_handle,\n\t     mft->mft_entry_vector,\n\t     mft->attribute_list_tree,\n\t     mft->flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry: %d attributes.\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\treturn( -1 );\n\t}\n\tif( libfcache_cache_clear_value_by_index(\n\t     mft->single_mft_entry_cache,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear single MFT entry cache entry: 0.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry = safe_mft_entry;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft.h",
    "content": "/*\n * MFT functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_H )\n#define _LIBFSNTFS_MFT_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft libfsntfs_mft_t;\n\nstruct libfsntfs_mft\n{\n\t/* The number of MFT entries\n\t */\n\tuint64_t number_of_mft_entries;\n\n\t/* The MFT entry vector\n\t */\n\tlibfdata_vector_t *mft_entry_vector;\n\n\t/* The MFT entry cache\n\t */\n\tlibfcache_cache_t *mft_entry_cache;\n\n\t/* The single MFT entry cache\n\t */\n\tlibfcache_cache_t *single_mft_entry_cache;\n\n\t/* The attribute list B-tree\n\t */\n\tlibcdata_btree_t *attribute_list_tree;\n\n\t/* The IO handle\n\t */\n\tlibfsntfs_io_handle_t *io_handle;\n\n\t/* The flags\n\t */\n\tuint8_t flags;\n};\n\nint libfsntfs_mft_initialize(\n     libfsntfs_mft_t **mft,\n     libfsntfs_io_handle_t *io_handle,\n     size64_t mft_entry_size,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_free(\n     libfsntfs_mft_t **mft,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_read_list_data_mft_entries(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_get_number_of_entries(\n     libfsntfs_mft_t *mft,\n     uint64_t *number_of_entries,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_get_mft_entry_by_index(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_get_mft_entry_by_index_no_cache(\n     libfsntfs_mft_t *mft,\n     libbfio_handle_t *file_io_handle,\n     uint64_t mft_entry_index,\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute.c",
    "content": "/*\n * Master File Table (MFT) attribute functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_extent.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_name.h\"\n\n#include \"fsntfs_mft_attribute.h\"\n\n/* Creates a MFT attribute\n * Make sure the value mft_attribute is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_initialize(\n     libfsntfs_mft_attribute_t **mft_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_initialize\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_attribute != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT attribute value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_attribute = memory_allocate_structure(\n\t                  libfsntfs_mft_attribute_t );\n\n\tif( *mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *mft_attribute,\n\t     0,\n\t     sizeof( libfsntfs_mft_attribute_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear MFT attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *mft_attribute != NULL )\n\t{\n\t\tmemory_free(\n\t\t *mft_attribute );\n\n\t\t*mft_attribute = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_free(\n     libfsntfs_mft_attribute_t **mft_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_free\";\n\tint result            = 1;\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_attribute != NULL )\n\t{\n\t\tif( ( *mft_attribute )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *mft_attribute )->name );\n\t\t}\n\t\tif( ( *mft_attribute )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *mft_attribute )->data );\n\t\t}\n\t\tif( ( *mft_attribute )->data_runs_array != NULL )\n\t\t{\n\t\t\tif( libcdata_array_free(\n\t\t\t     &( ( *mft_attribute )->data_runs_array ),\n\t\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_data_run_free,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free data runs array.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t *mft_attribute );\n\n\t\t*mft_attribute = NULL;\n\t}\n\treturn( result );\n}\n\n/* Clones a MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_clone(\n     libfsntfs_mft_attribute_t **destination_mft_attribute,\n     libfsntfs_mft_attribute_t *source_mft_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_clone\";\n\n\tif( destination_mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_mft_attribute != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid destination MFT attribute value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( source_mft_attribute == NULL )\n\t{\n\t\t*destination_mft_attribute = source_mft_attribute;\n\n\t\treturn( 1 );\n\t}\n\t*destination_mft_attribute = memory_allocate_structure(\n\t                              libfsntfs_mft_attribute_t );\n\n\tif( *destination_mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create destnation MFT attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_copy(\n\t     *destination_mft_attribute,\n\t     source_mft_attribute,\n\t     sizeof( libfsntfs_mft_attribute_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to copy source MFT attribute to destination.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *destination_mft_attribute )->name            = NULL;\n\t( *destination_mft_attribute )->data            = NULL;\n\t( *destination_mft_attribute )->data_runs_array = NULL;\n\t( *destination_mft_attribute )->next_attribute  = NULL;\n\n\tif( source_mft_attribute->name != NULL )\n\t{\n\t\t( *destination_mft_attribute )->name = (uint8_t *) memory_allocate(\n\t\t                                                    source_mft_attribute->name_size );\n\n\t\tif( ( *destination_mft_attribute )->name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create destination name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     ( *destination_mft_attribute )->name,\n\t\t     source_mft_attribute->name,\n\t\t     source_mft_attribute->name_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy source name to destination.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t( *destination_mft_attribute )->name_size = source_mft_attribute->name_size;\n\t}\n\tif( source_mft_attribute->data != NULL )\n\t{\n\t\t( *destination_mft_attribute )->data = (uint8_t *) memory_allocate(\n\t\t                                                    source_mft_attribute->data_size );\n\n\t\tif( ( *destination_mft_attribute )->data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create destination data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     ( *destination_mft_attribute )->data,\n\t\t     source_mft_attribute->data,\n\t\t     source_mft_attribute->data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy source data to destination.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t( *destination_mft_attribute )->data_size = source_mft_attribute->data_size;\n\t}\n\tif( libcdata_array_clone(\n\t     &( ( *destination_mft_attribute )->data_runs_array ),\n\t     source_mft_attribute->data_runs_array,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_data_run_free,\n\t     (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfsntfs_data_run_clone,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to clone data runs array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *destination_mft_attribute != NULL )\n\t{\n\t\tif( ( *destination_mft_attribute )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *destination_mft_attribute )->data );\n\t\t}\n\t\tif( ( *destination_mft_attribute )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *destination_mft_attribute )->data );\n\t\t}\n\t\tmemory_free(\n\t\t *destination_mft_attribute );\n\n\t\t*destination_mft_attribute = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Reads the MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_read_data(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_data_run_t *data_run     = NULL;\n\tconst uint8_t *non_resident_data   = NULL;\n\tconst uint8_t *resident_data       = NULL;\n\tstatic char *function              = \"libfsntfs_mft_attribute_read_data\";\n\tsize_t data_offset                 = 0;\n\tsize_t non_resident_data_size      = 0;\n\tssize_t read_count                 = 0;\n\tuint64_t last_cluster_block_number = 0;\n\tuint16_t compression_unit_size     = 0;\n\tuint16_t data_runs_offset          = 0;\n\tuint16_t name_offset               = 0;\n\tint data_run_index                 = 0;\n\tint entry_index                    = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit               = 0;\n\tuint32_t value_32bit               = 0;\n#endif\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->name != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT attribute - name value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->data != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT attribute - data value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->data_runs_array != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT attribute - data runs array value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size < sizeof( fsntfs_mft_attribute_header_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: unsupported data size value too small\\n\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: MFT attribute header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_mft_attribute_header_t ),\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_mft_attribute_header_t *) data )->type,\n\t mft_attribute->type );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_mft_attribute_header_t *) data )->size,\n\t mft_attribute->size );\n\n\tmft_attribute->non_resident_flag = ( (fsntfs_mft_attribute_header_t *) data )->non_resident_flag;\n\n\tmft_attribute->name_size = (uint16_t) ( (fsntfs_mft_attribute_header_t *) data )->name_size;\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_attribute_header_t *) data )->name_offset,\n\t name_offset );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_attribute_header_t *) data )->data_flags,\n\t mft_attribute->data_flags );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_attribute_header_t *) data )->identifier,\n\t mft_attribute->identifier );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: type\\t\\t\\t\\t\\t: 0x%08\" PRIx32 \" (%s)\\n\",\n\t\t function,\n\t\t mft_attribute->type,\n\t\t libfsntfs_debug_print_attribute_type(\n\t\t  mft_attribute->type ) );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: size\\t\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t mft_attribute->size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: non resident flag\\t\\t\\t: 0x%02\" PRIx8 \"\\n\",\n\t\t function,\n\t\t mft_attribute->non_resident_flag );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name size\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_attribute->name_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name offset\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t name_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data flags\\t\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t mft_attribute->data_flags );\n\t\tlibfsntfs_debug_print_mft_attribute_data_flags(\n\t\t mft_attribute->data_flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: identifier\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_attribute->identifier );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tdata_offset = sizeof( fsntfs_mft_attribute_header_t );\n\n\tif( ( mft_attribute->size < sizeof( fsntfs_mft_attribute_header_t ) )\n\t || ( mft_attribute->size > data_size ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0x0000 )\n\t && ( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0x0001 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported compression flags: 0x%04\" PRIx16 \".\",\n\t\t function,\n\t\t mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK );\n\n\t\tgoto on_error;\n\t}\n\tif( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t{\n\t\tif( io_handle->cluster_block_size > 4096 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported compression flags: 0x%04\" PRIx16 \" for volume with cluster block size: %\" PRIzd \".\",\n\t\t\t function,\n\t\t\t mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK,\n\t\t\t io_handle->cluster_block_size );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tmft_attribute->name_size *= 2;\n\n\tif( ( mft_attribute->non_resident_flag & 0x01 ) == 0 )\n\t{\n\t\tif( data_size < ( data_offset + sizeof( fsntfs_mft_attribute_resident_t ) ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: unsupported data size value too small\\n\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tresident_data = &( data[ data_offset ] );\n\n\t\tif( mft_attribute->size < ( data_offset + sizeof( fsntfs_mft_attribute_resident_t ) ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid MFT attribute size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: MFT attribute resident data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t resident_data,\n\t\t\t sizeof( fsntfs_mft_attribute_resident_t ),\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_mft_attribute_resident_t *) resident_data )->data_size,\n\t\t mft_attribute->data_size );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mft_attribute_resident_t *) resident_data )->data_offset,\n\t\t mft_attribute->data_offset );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data size\\t\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t mft_attribute->data_size );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data offset\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t\t function,\n\t\t\t mft_attribute->data_offset );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: indexed flag\\t\\t\\t\\t: 0x%02\" PRIx8 \"\\n\",\n\t\t\t function,\n\t\t\t ( (fsntfs_mft_attribute_resident_t *) resident_data )->indexed_flag );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: padding\\t\\t\\t\\t: 0x%02\" PRIx8 \"\\n\",\n\t\t\t function,\n\t\t\t ( (fsntfs_mft_attribute_resident_t *) resident_data )->padding );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\tdata_offset += sizeof( fsntfs_mft_attribute_resident_t );\n\t}\n\telse\n\t{\n\t\tif( data_size < ( data_offset + sizeof( fsntfs_mft_attribute_non_resident_t ) ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: unsupported data size value too small\\n\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tnon_resident_data      = &( data[ data_offset ] );\n\t\tnon_resident_data_size = sizeof( fsntfs_mft_attribute_non_resident_t );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->compression_unit_size,\n\t\t compression_unit_size );\n\n\t\tif( compression_unit_size != 0 )\n\t\t{\n\t\t\tif( data_size < ( data_offset + sizeof( fsntfs_mft_attribute_non_resident_compressed_t ) ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t\t \"%s: unsupported data size value too small.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tnon_resident_data_size = sizeof( fsntfs_mft_attribute_non_resident_compressed_t );\n\n\t\t\tif( compression_unit_size > 31 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: compression unit size value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\t/* The size is calculated as: 2 ^ value\n\t\t\t */\n\t\t\tmft_attribute->compression_unit_size  = (size_t) 1 << compression_unit_size;\n\t\t\tmft_attribute->compression_unit_size *= io_handle->cluster_block_size;\n\t\t}\n\t\telse if( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: data is flagged as compressed but no compression unit size set.\\n\",\n\t\t\t\t function );\n\t\t\t}\n#endif\n\t\t\tmft_attribute->compression_unit_size = 16 * io_handle->cluster_block_size;\n\t\t}\n\t\tif( mft_attribute->size < ( data_offset + non_resident_data_size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid MFT attribute size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: MFT attribute non-resident data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t non_resident_data,\n\t\t\t non_resident_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->data_first_vcn,\n\t\t mft_attribute->data_first_vcn );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->data_last_vcn,\n\t\t mft_attribute->data_last_vcn );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->data_runs_offset,\n\t\t data_runs_offset );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->allocated_data_size,\n\t\t mft_attribute->allocated_data_size );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->data_size,\n\t\t mft_attribute->data_size );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->valid_data_size,\n\t\t mft_attribute->valid_data_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data first VCN\\t\\t\\t: %\" PRIi64 \"\\n\",\n\t\t\t function,\n\t\t\t (int64_t) mft_attribute->data_first_vcn );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data last VCN\\t\\t\\t: %\" PRIi64 \"\\n\",\n\t\t\t function,\n\t\t\t (int64_t) mft_attribute->data_last_vcn );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data runs offset\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t\t function,\n\t\t\t data_runs_offset );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: compression unit size\\t\\t: %\" PRIu16 \" (%\" PRIzd \")\\n\",\n\t\t\t function,\n\t\t\t compression_unit_size,\n\t\t\t mft_attribute->compression_unit_size );\n\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t ( (fsntfs_mft_attribute_non_resident_t *) non_resident_data )->padding,\n\t\t\t value_32bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: padding\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t\t function,\n\t\t\t value_32bit );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: allocated data size\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t mft_attribute->allocated_data_size );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: data size\\t\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t mft_attribute->data_size );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: valid data size\\t\\t\\t: %\" PRIu64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t\t function,\n\t\t\t mft_attribute->valid_data_size,\n\t\t\t mft_attribute->valid_data_size );\n\n\t\t\tif( compression_unit_size > 0 )\n\t\t\t{\n\t\t\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t\t\t ( (fsntfs_mft_attribute_non_resident_compressed_t *) non_resident_data )->total_data_size,\n\t\t\t\t value_64bit );\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: total data size\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t\t function,\n\t\t\t\t value_64bit );\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\tdata_offset += sizeof( fsntfs_mft_attribute_non_resident_t );\n\n\t\tif( mft_attribute->valid_data_size > mft_attribute->data_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: valid data size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( mft_attribute->name_size > 0 )\n\t{\n\t\tif( ( name_offset < data_offset )\n\t\t || ( name_offset >= mft_attribute->size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: name offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( data_offset < name_offset )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: unknown data:\\n\",\n\t\t\t\t function );\n\t\t\t\tlibcnotify_print_data(\n\t\t\t\t &( data[ data_offset ] ),\n\t\t\t\t (size_t) name_offset - data_offset,\n\t\t\t\t 0 );\n\t\t\t}\n\t\t}\n#endif\n\t\tif( mft_attribute->name_size > ( mft_attribute->size - name_offset ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset = (size_t) name_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: name data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) mft_attribute->name_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tmft_attribute->name = (uint8_t *) memory_allocate(\n\t\t                                   sizeof( uint8_t ) * (size_t) mft_attribute->name_size );\n\n\t\tif( mft_attribute->name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     mft_attribute->name,\n\t\t     &( data[ data_offset ] ),\n\t\t     (size_t) mft_attribute->name_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += (size_t) mft_attribute->name_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_utf16_string_value(\n\t\t\t     function,\n\t\t\t     \"name\\t\\t\\t\\t\\t\",\n\t\t\t     mft_attribute->name,\n\t\t\t     (size_t) mft_attribute->name_size,\n\t\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print UTF-16 string value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t}\n\tif( ( mft_attribute->non_resident_flag & 0x01 ) == 0 )\n\t{\n\t\tif( mft_attribute->data_size > 0 )\n\t\t{\n\t\t\tif( ( mft_attribute->data_offset < data_offset )\n\t\t\t || ( mft_attribute->data_offset >= mft_attribute->size ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: resident data offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( mft_attribute->data_size > ( mft_attribute->size - mft_attribute->data_offset ) )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: resident data size value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: resident data:\\n\",\n\t\t\t\t function );\n\t\t\t\tlibcnotify_print_data(\n\t\t\t\t &( data[ mft_attribute->data_offset ] ),\n\t\t\t\t (size_t) mft_attribute->data_size,\n\t\t\t\t 0 );\n\t\t\t}\n#endif\n\t\t\tmft_attribute->data = (uint8_t *) memory_allocate(\n\t\t\t                                   sizeof( uint8_t ) * (size_t) mft_attribute->data_size );\n\n\t\t\tif( mft_attribute->data == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create resident data.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( memory_copy(\n\t\t\t     mft_attribute->data,\n\t\t\t     &( data[ mft_attribute->data_offset ] ),\n\t\t\t     (size_t) mft_attribute->data_size ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy resident data.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tdata_offset = (size_t) mft_attribute->data_offset + (size_t) mft_attribute->data_size;\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* Note that data size is set in the first attribute of a chain\n\t\t * and successive elements contain a size of 0\n\t\t */\n\t\tif( ( data_runs_offset < data_offset )\n\t\t || ( data_runs_offset >= mft_attribute->size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: data runs offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( data_offset < name_offset )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: unknown data:\\n\",\n\t\t\t\t function );\n\t\t\t\tlibcnotify_print_data(\n\t\t\t\t &( data[ data_offset ] ),\n\t\t\t\t (size_t) data_runs_offset - data_offset,\n\t\t\t\t 0 );\n\t\t\t}\n\t\t}\n#endif\n\t\tdata_offset = (size_t) data_runs_offset;\n\n\t\tif( libcdata_array_initialize(\n\t\t     &( mft_attribute->data_runs_array ),\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create data runs array.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\twhile( data_offset < data_size )\n\t\t{\n\t\t\tif( libfsntfs_data_run_initialize(\n\t\t\t     &data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: reading data run: %d.\\n\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\t\t\t}\n#endif\n\t\t\tread_count = libfsntfs_data_run_read_data(\n\t\t\t              data_run,\n\t\t\t              io_handle,\n\t\t\t              &( data[ data_offset ] ),\n\t\t\t              data_size - data_offset,\n\t\t\t              last_cluster_block_number,\n\t\t\t              error );\n\n\t\t\tif( read_count <= -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read data run: %d.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( read_count == 1 )\n\t\t\t{\n\t\t\t\tif( libfsntfs_data_run_free(\n\t\t\t\t     &data_run,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free data run: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdata_offset += read_count;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tif( ( data_run->start_offset == 0 )\n\t\t\t\t && ( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) == 0 )\n\t\t\t\t && ( ( mft_attribute->data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_SPARSE ) == 0 ) )\n\t\t\t\t{\n\t\t\t\t\tlibcnotify_printf(\n\t\t\t\t\t \"%s: data run is sparse but no attribute data flags set.\\n\\n\",\n\t\t\t\t\t function );\n\t\t\t\t}\n\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) == 0 )\n\t\t\t{\n\t\t\t\tlast_cluster_block_number = data_run->cluster_block_number;\n\t\t\t}\n\t\t\tif( libcdata_array_append_entry(\n\t\t\t     mft_attribute->data_runs_array,\n\t\t\t     &entry_index,\n\t\t\t     (intptr_t *) data_run,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append data run: %d to array.\",\n\t\t\t\t function,\n\t\t\t\t data_run_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tdata_run = NULL;\n\n\t\t\tdata_run_index++;\n\t\t}\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < mft_attribute->size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) mft_attribute->size - data_offset,\n\t\t\t 0 );\n\t\t}\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( data_run != NULL )\n\t{\n\t\tlibfsntfs_data_run_free(\n\t\t &data_run,\n\t\t NULL );\n\t}\n\tif( mft_attribute->data_runs_array != NULL )\n\t{\n\t\tlibcdata_array_free(\n\t\t &( mft_attribute->data_runs_array ),\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_data_run_free,\n\t\t NULL );\n\t}\n\tif( mft_attribute->data != NULL )\n\t{\n\t\tmemory_free(\n\t\t mft_attribute->data );\n\n\t\tmft_attribute->data = NULL;\n\t}\n\tif( mft_attribute->name != NULL )\n\t{\n\t\tmemory_free(\n\t\t mft_attribute->name );\n\n\t\tmft_attribute->name = NULL;\n\t}\n\tmft_attribute->name_size = 0;\n\n\treturn( -1 );\n}\n\n/* Determines if the attribute data is resident\n * Returns 1 if the attribute data is resident, 0 if not or -1 on error\n */\nint libfsntfs_mft_attribute_data_is_resident(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_data_is_resident\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_attribute->non_resident_flag & 0x01 ) == 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Retrieves the type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_type(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint32_t *type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_type\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( type == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*type = mft_attribute->type;\n\n\treturn( 1 );\n}\n\n/* Retrieves the data flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_data_flags(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint16_t *data_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_data_flags\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*data_flags = mft_attribute->data_flags;\n\n\treturn( 1 );\n}\n\n/* Retrieves the data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_data_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*data_size = mft_attribute->data_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the data VCN range\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_attribute_get_data_vcn_range(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *data_first_vcn,\n     uint64_t *data_last_vcn,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_data_vcn_range\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_first_vcn == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data first VCN.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_last_vcn == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data last VCN.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_attribute->non_resident_flag & 0x01 ) != 0 )\n\t{\n\t\t*data_first_vcn = mft_attribute->data_first_vcn;\n\t\t*data_last_vcn  = mft_attribute->data_last_vcn;\n\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Retrieves the allocated data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_allocated_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *allocated_data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_allocated_data_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( allocated_data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid allocated data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*allocated_data_size = mft_attribute->allocated_data_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the valid data size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_valid_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *valid_data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_valid_data_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( valid_data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid valid data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*valid_data_size = mft_attribute->valid_data_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_utf8_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_utf8_name_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_attribute->name == NULL )\n\t || ( mft_attribute->name_size == 0 ) )\n\t{\n\t\tif( utf8_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf8_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf8_string_size_from_utf16_stream(\n\t\t     mft_attribute->name,\n\t\t     (size_t) mft_attribute->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_utf8_name(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_utf8_name\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT attribute - missing name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     mft_attribute->name,\n\t     (size_t) mft_attribute->name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_utf16_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_utf16_name_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_attribute->name == NULL )\n\t || ( mft_attribute->name_size == 0 ) )\n\t{\n\t\tif( utf16_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf16_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf16_string_size_from_utf16_stream(\n\t\t     mft_attribute->name,\n\t\t     (size_t) mft_attribute->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_utf16_name(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_utf16_name\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT attribute - missing name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     mft_attribute->name,\n\t     (size_t) mft_attribute->name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Compares the name with an UTF-8 encoded string\n * Returns 1 if the strings are equal, 0 if not or -1 on error\n */\nint libfsntfs_mft_attribute_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_compare_name_with_utf8_string\";\n\tint result            = 0;\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->name == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          mft_attribute->name,\n\t          mft_attribute->name_size,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t \"%s: unable to compare UTF-8 string with name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Compares the name with an UTF-16 encoded string\n * Returns 1 if the strings are equal, 0 if not or -1 on error\n */\nint libfsntfs_mft_attribute_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_compare_name_with_utf16_string\";\n\tint result            = 0;\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->name == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          mft_attribute->name,\n\t          mft_attribute->name_size,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t \"%s: unable to compare UTF-16 string with name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Retrieves the compression unit size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_compression_unit_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *compression_unit_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_compression_unit_size\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( compression_unit_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid compression unit size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*compression_unit_size = mft_attribute->compression_unit_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the resident data\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_resident_data(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint8_t **resident_data,\n     size_t *resident_data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_resident_data\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_attribute->non_resident_flag & 0x01 ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid MFT attribute - non-resident flag is set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->data_size > (uint64_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT attribute - data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( resident_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid resident data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( resident_data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid resident data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*resident_data      = mft_attribute->data;\n\t*resident_data_size = (size_t) mft_attribute->data_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the number of data runs\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_number_of_data_runs(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     int *number_of_data_runs,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_number_of_data_runs\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_attribute->data_runs_array == NULL )\n\t{\n\t\tif( number_of_data_runs == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid number of data runs.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*number_of_data_runs = 0;\n\t}\n\telse\n\t{\n\t\tif( libcdata_array_get_number_of_entries(\n\t\t     mft_attribute->data_runs_array,\n\t\t     number_of_data_runs,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve number of data runs.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific data run\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_data_run_by_index(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     int data_run_index,\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_data_run_by_index\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_attribute->data_runs_array,\n\t     data_run_index,\n\t     (intptr_t **) data_run,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data run: %d.\",\n\t\t function,\n\t\t data_run_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the data extents array\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_data_extents_array(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libcdata_array_t **data_extents_array,\n     libcerror_error_t **error )\n{\n\tlibcdata_array_t *safe_data_extents_array    = NULL;\n\tlibfsntfs_data_run_t *data_run               = NULL;\n\tlibfsntfs_extent_t *data_extent              = NULL;\n\tstatic char *function                        = \"libfsntfs_mft_attribute_get_data_extents_array\";\n\tsize64_t attribute_data_vcn_size             = 0;\n\tsize64_t calculated_allocated_data_size      = 0;\n\tsize64_t stored_allocated_data_size          = 0;\n\toff64_t attribute_data_vcn_offset            = 0;\n\toff64_t calculated_attribute_data_vcn_offset = 0;\n\tint attribute_index                          = 0;\n\tint data_run_index                           = 0;\n\tint entry_index                              = 0;\n\tint number_of_data_runs                      = 0;\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( io_handle->cluster_block_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid IO handle - cluster block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_extents_array == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data extents array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_allocated_data_size(\n\t     mft_attribute,\n\t     &stored_allocated_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute allocated data size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libcdata_array_initialize(\n\t     &safe_data_extents_array,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create extents array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( mft_attribute != NULL )\n\t{\n\t\tif( mft_attribute->data_runs_array != NULL )\n\t\t{\n\t\t\tattribute_data_vcn_offset = mft_attribute->data_first_vcn;\n\t\t\tattribute_data_vcn_size   = mft_attribute->data_last_vcn;\n\n\t\t\tif( attribute_data_vcn_size != 0xffffffffffffffffULL )\n\t\t\t{\n\t\t\t\tif( (uint64_t) attribute_data_vcn_offset > (uint64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( attribute_data_vcn_size > (size64_t) ( ( INT64_MAX / io_handle->cluster_block_size ) - 1 ) )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid attribute data last VCN value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( attribute_data_vcn_offset > (off64_t) attribute_data_vcn_size )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid attribute data first VCN value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tattribute_data_vcn_size   += 1;\n\t\t\t\tattribute_data_vcn_size   -= attribute_data_vcn_offset;\n\t\t\t\tattribute_data_vcn_offset *= io_handle->cluster_block_size;\n\t\t\t\tattribute_data_vcn_size   *= io_handle->cluster_block_size;\n\n\t\t\t\tif( ( calculated_attribute_data_vcn_offset != 0 )\n\t\t\t\t && ( calculated_attribute_data_vcn_offset != attribute_data_vcn_offset ) )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t\t \"%s: invalid attribute data VCN offset value out of bounds.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tcalculated_attribute_data_vcn_offset = attribute_data_vcn_offset + (off64_t) attribute_data_vcn_size;\n\t\t\t}\n\t\t\tif( libcdata_array_get_number_of_entries(\n\t\t\t     mft_attribute->data_runs_array,\n\t\t\t     &number_of_data_runs,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve attribute: %d number of data runs.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tfor( data_run_index = 0;\n\t\t\t     data_run_index < number_of_data_runs;\n\t\t\t     data_run_index++ )\n\t\t\t{\n\t\t\t\tif( libcdata_array_get_entry_by_index(\n\t\t\t\t     mft_attribute->data_runs_array,\n\t\t\t\t     data_run_index,\n\t\t\t\t     (intptr_t **) &data_run,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve attribute: %d data run: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( data_run == NULL )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t\t\t \"%s: missing attribute: %d data run: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t attribute_index,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_extent_initialize(\n\t\t\t\t     &data_extent,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create data extent: %d.\",\n\t\t\t\t\t function,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tdata_extent->start_offset = data_run->start_offset;\n\t\t\t\tdata_extent->size         = data_run->size;\n\t\t\t\tdata_extent->range_flags  = 0;\n\n\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_SPARSE ) != 0 )\n\t\t\t\t{\n\t\t\t\t\tdata_extent->range_flags |= LIBFSNTFS_EXTENT_FLAG_IS_SPARSE;\n\t\t\t\t}\n\t\t\t\tif( ( data_run->range_flags & LIBFDATA_RANGE_FLAG_IS_COMPRESSED ) != 0 )\n\t\t\t\t{\n\t\t\t\t\tdata_extent->range_flags |= LIBFSNTFS_EXTENT_FLAG_IS_COMPRESSED;\n\t\t\t\t}\n\t\t\t\tif( libcdata_array_append_entry(\n\t\t\t\t     safe_data_extents_array,\n\t\t\t\t     &entry_index,\n\t\t\t\t     (intptr_t *) data_extent,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t\t \"%s: unable to append data extent: %d to array.\",\n\t\t\t\t\t function,\n\t\t\t\t\t data_run_index );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tcalculated_allocated_data_size += data_run->size;\n\n\t\t\t\tdata_extent = NULL;\n\t\t\t}\n\t\t}\n\t\tattribute_index++;\n\n\t\tif( libfsntfs_mft_attribute_get_next_attribute(\n\t\t     mft_attribute,\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve next MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( calculated_allocated_data_size != stored_allocated_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size of data runs: %\" PRIu64 \" does not match allocated data size: %\" PRIu64 \".\",\n\t\t function,\n\t\t calculated_allocated_data_size,\n\t\t stored_allocated_data_size );\n\n\t\tgoto on_error;\n\t}\n\t*data_extents_array = safe_data_extents_array;\n\n\treturn( 1 );\n\non_error:\n\tif( data_extent != NULL )\n\t{\n\t\tlibfsntfs_extent_free(\n\t\t &data_extent,\n\t\t NULL );\n\t}\n\tif( safe_data_extents_array != NULL )\n\t{\n\t\tlibcdata_array_free(\n\t\t &safe_data_extents_array,\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the next attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_get_next_attribute(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_mft_attribute_t **next_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_get_next_attribute\";\n\n\tif( mft_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( next_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid next attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*next_attribute = mft_attribute->next_attribute;\n\n\treturn( 1 );\n}\n\n/* Appends the attribute to the attribute chain\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_append_to_chain(\n     libfsntfs_mft_attribute_t **first_attribute,\n     libfsntfs_mft_attribute_t *additional_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute      = NULL;\n\tlibfsntfs_mft_attribute_t *previous_attribute = NULL;\n\tstatic char *function                         = \"libfsntfs_mft_attribute_append_to_chain\";\n\n\tif( first_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( additional_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid additional attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tmft_attribute = *first_attribute;\n\n\tif( mft_attribute != NULL )\n\t{\n\t\tif( mft_attribute->type != additional_attribute->type )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: unable to chain attributes of different types.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\twhile( mft_attribute != NULL )\n\t{\n\t\tif( mft_attribute == additional_attribute )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid chained attribute value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( mft_attribute->data_first_vcn > additional_attribute->data_first_vcn )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tprevious_attribute = mft_attribute;\n\t\tmft_attribute      = mft_attribute->next_attribute;\n\t}\n\tif( previous_attribute == NULL )\n\t{\n\t\tadditional_attribute->next_attribute = mft_attribute;\n\n\t\t*first_attribute = additional_attribute;\n\t}\n\telse\n\t{\n\t\tif( previous_attribute->next_attribute != NULL )\n\t\t{\n\t\t\tadditional_attribute->next_attribute = previous_attribute->next_attribute;\n\t\t}\n\t\tprevious_attribute->next_attribute = additional_attribute;\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute.h",
    "content": "/*\n * Master File Table (MFT) attribute functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_ATTRIBUTE_H )\n#define _LIBFSNTFS_MFT_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_data_run.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft_attribute libfsntfs_mft_attribute_t;\n\nstruct libfsntfs_mft_attribute\n{\n\t/* The type\n\t */\n\tuint32_t type;\n\n\t/* The size\n\t */\n\tuint32_t size;\n\n\t/* The non-resident flag\n\t */\n\tuint8_t non_resident_flag;\n\n\t/* The name size\n\t */\n\tuint16_t name_size;\n\n\t/* The data flags\n\t */\n\tuint16_t data_flags;\n\n\t/* The identifier\n\t */\n\tuint16_t identifier;\n\n\t/* The data size\n\t */\n\tuint64_t data_size;\n\n\t/* The data offset\n\t */\n\tuint16_t data_offset;\n\n\t/* The data first VCN\n\t */\n\tuint64_t data_first_vcn;\n\n\t/* The data last VCN\n\t */\n\tuint64_t data_last_vcn;\n\n\t/* The compression unit size\n\t */\n\tsize_t compression_unit_size;\n\n\t/* The allocated data size\n\t */\n\tuint64_t allocated_data_size;\n\n\t/* The valid data size\n\t */\n\tuint64_t valid_data_size;\n\n\t/* The name\n\t */\n\tuint8_t *name;\n\n\t/* The data\n\t */\n\tuint8_t *data;\n\n\t/* The data runs array\n\t */\n\tlibcdata_array_t *data_runs_array;\n\n\t/* The next attribute in an attribute chain\n\t */\n\tlibfsntfs_mft_attribute_t *next_attribute;\n};\n\nint libfsntfs_mft_attribute_initialize(\n     libfsntfs_mft_attribute_t **mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_free(\n     libfsntfs_mft_attribute_t **mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_clone(\n     libfsntfs_mft_attribute_t **destination_mft_attribute,\n     libfsntfs_mft_attribute_t *source_mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_read_data(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_data_is_resident(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_type(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint32_t *type,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_data_flags(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint16_t *data_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_data_vcn_range(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *data_first_vcn,\n     uint64_t *data_last_vcn,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_allocated_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *allocated_data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_valid_data_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint64_t *valid_data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_utf8_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_utf8_name(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_utf16_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_utf16_name(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_compression_unit_size(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     size_t *compression_unit_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_resident_data(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     uint8_t **resident_data,\n     size_t *resident_data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_number_of_data_runs(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     int *number_of_data_runs,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_data_run_by_index(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     int data_run_index,\n     libfsntfs_data_run_t **data_run,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_data_extents_array(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libcdata_array_t **data_extents_array,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_get_next_attribute(\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_mft_attribute_t **next_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_append_to_chain(\n     libfsntfs_mft_attribute_t **first_attribute,\n     libfsntfs_mft_attribute_t *additional_attribute,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute_list.c",
    "content": "/*\n * Attribute list attribute ($ATTRIBUTE_LIST) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block.h\"\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n\n#include \"fsntfs_mft_attribute_list.h\"\n\n/* Creates attribute list\n * Make sure the value attribute_list is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_initialize(\n     libfsntfs_mft_attribute_list_t **attribute_list,\n     uint64_t base_record_file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_initialize\";\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute list value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*attribute_list = memory_allocate_structure(\n\t                   libfsntfs_mft_attribute_list_t );\n\n\tif( *attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create attribute list.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *attribute_list,\n\t     0,\n\t     sizeof( libfsntfs_mft_attribute_list_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear attribute list.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *attribute_list );\n\n\t\t*attribute_list = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *attribute_list )->entries_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create entries array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *attribute_list )->file_references_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file references array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *attribute_list )->base_record_file_reference = base_record_file_reference;\n\n\treturn( 1 );\n\non_error:\n\tif( *attribute_list != NULL )\n\t{\n\t\tif( ( *attribute_list )->entries_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( ( *attribute_list )->entries_array ),\n\t\t\t NULL,\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *attribute_list );\n\n\t\t*attribute_list = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees attribute list\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_free(\n     libfsntfs_mft_attribute_list_t **attribute_list,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_free\";\n\tint result            = 1;\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list != NULL )\n\t{\n\t\tif( libcdata_array_free(\n\t\t     &( ( *attribute_list )->entries_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_list_entry_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free entries array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libcdata_array_free(\n\t\t     &( ( *attribute_list )->file_references_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_list_file_reference_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file references array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *attribute_list );\n\n\t\t*attribute_list = NULL;\n\t}\n\treturn( result );\n}\n\n/* Frees attribute list file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_file_reference_free(\n     uint64_t **file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_file_reference_free\";\n\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_reference != NULL )\n\t{\n\t\tmemory_free(\n\t\t *file_reference );\n\n\t\t*file_reference = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the attribute list\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_read_data(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tstatic char *function                                          = \"libfsntfs_mft_attribute_list_read_data\";\n\tsize_t data_offset                                             = 0;\n\tint attribute_index                                            = 0;\n\tint entry_index                                                = 0;\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: attribute list data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\twhile( data_offset < data_size )\n\t{\n\t\tif( libfsntfs_mft_attribute_list_entry_initialize(\n\t\t     &mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create MFT attribute list entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_entry_read_data(\n\t\t     mft_attribute_list_entry,\n\t\t     &( data[ data_offset ] ),\n\t\t     data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read MFT attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += mft_attribute_list_entry->size;\n\n\t\tif( libcdata_array_append_entry(\n\t\t     attribute_list->entries_array,\n\t\t     &entry_index,\n\t\t     (intptr_t *) mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append MFT attribute list entry: %d to array.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmft_attribute_list_entry = NULL;\n\n\t\tattribute_index++;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < data_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: alignment padding:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t data_size - data_offset,\n\t\t\t 0 );\n\t\t}\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the attribute list\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_read_from_attribute(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *list_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t data[ sizeof( fsntfs_mft_attribute_list_entry_header_t ) + 256 ];\n\n\tlibfdata_stream_t *cluster_block_stream                        = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tstatic char *function                                          = \"libfsntfs_mft_attribute_list_read_from_attribute\";\n\tsize64_t data_size                                             = 0;\n\tssize_t read_count                                             = 0;\n\toff64_t data_offset                                            = 0;\n\tint attribute_index                                            = 0;\n\tint entry_index                                                = 0;\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_cluster_block_stream_initialize(\n\t     &cluster_block_stream,\n\t     io_handle,\n\t     list_attribute,\n\t     NULL,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create cluster block stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_get_size(\n\t     cluster_block_stream,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size from cluster block stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\twhile( (size64_t) data_offset < data_size )\n\t{\n\t\tif( memory_set(\n\t\t     data,\n\t\t     0,\n\t\t     sizeof( fsntfs_mft_attribute_list_entry_header_t ) + 256 ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to clear data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tread_count = libfdata_stream_read_buffer_at_offset(\n\t\t              cluster_block_stream,\n\t\t              (intptr_t *) file_io_handle,\n\t\t              data,\n\t\t              sizeof( fsntfs_mft_attribute_list_entry_header_t ) + 256,\n\t\t              data_offset,\n\t\t              0,\n\t\t              error );\n\n\t\tif( read_count < 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attribute list entry: %d from cluster block stream at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t function,\n\t\t\t attribute_index,\n\t\t\t data_offset,\n\t\t\t data_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_entry_initialize(\n\t\t     &mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_entry_read_data(\n\t\t     mft_attribute_list_entry,\n\t\t     data,\n\t\t     sizeof( fsntfs_mft_attribute_list_entry_header_t ) + 256,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += mft_attribute_list_entry->size;\n\n\t\tif( libcdata_array_append_entry(\n\t\t     attribute_list->entries_array,\n\t\t     &entry_index,\n\t\t     (intptr_t *) mft_attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append attribute list entry: %d to array.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmft_attribute_list_entry = NULL;\n\n\t\tattribute_index++;\n\t}\n\tif( libfdata_stream_free(\n\t     &cluster_block_stream,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free cluster block stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the number of attribute list entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_get_number_of_entries(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int *number_of_entries,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_get_number_of_entries\";\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     attribute_list->entries_array,\n\t     number_of_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific attribute list entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_get_entry_by_index(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int entry_index,\n     libfsntfs_mft_attribute_list_entry_t **mft_attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_attribute_by_index\";\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     attribute_list->entries_array,\n\t     entry_index,\n\t     (intptr_t **) mft_attribute_list_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from array.\",\n\t\t function,\n\t\t entry_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Compares attribute lists by their base record file reference\n * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_compare_by_base_record_file_reference(\n     libfsntfs_mft_attribute_list_t *first_attribute_list,\n     libfsntfs_mft_attribute_list_t *second_attribute_list,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_mft_attribute_list_compare_by_base_record_file_reference\";\n\tuint64_t first_mft_entry_index  = 0;\n\tuint64_t second_mft_entry_index = 0;\n\n\tif( first_attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( second_attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid second attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfirst_mft_entry_index  = first_attribute_list->base_record_file_reference & 0xffffffffffffUL;\n\tsecond_mft_entry_index = second_attribute_list->base_record_file_reference & 0xffffffffffffUL;\n\n\tif( first_mft_entry_index < second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_mft_entry_index > second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\treturn( LIBCDATA_COMPARE_EQUAL );\n}\n\n/* Retrieves the number of attribute list data file references\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_get_number_of_file_references(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int *number_of_file_references,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_get_number_of_file_references\";\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     attribute_list->file_references_array,\n\t     number_of_file_references,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific attribute list data file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_get_file_reference_by_index(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int file_reference_index,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tuint64_t *safe_file_reference = NULL;\n\tstatic char *function         = \"libfsntfs_mft_attribute_list_get_file_reference_by_index\";\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     attribute_list->file_references_array,\n\t     file_reference_index,\n\t     (intptr_t **) &safe_file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from array.\",\n\t\t function,\n\t\t file_reference_index );\n\n\t\treturn( -1 );\n\t}\n\t*file_reference = *safe_file_reference;\n\n\treturn( 1 );\n}\n\n/* Compares attribute list data file references\n * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_compare_file_reference(\n     uint64_t *first_file_reference,\n     uint64_t *second_file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_mft_attribute_list_compare_file_reference\";\n\tuint64_t first_mft_entry_index  = 0;\n\tuint64_t second_mft_entry_index = 0;\n\n\tif( first_file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( second_file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid second file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfirst_mft_entry_index  = *first_file_reference & 0xffffffffffffUL;\n\tsecond_mft_entry_index = *second_file_reference & 0xffffffffffffUL;\n\n\tif( first_mft_entry_index < second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_mft_entry_index > second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\treturn( LIBCDATA_COMPARE_EQUAL );\n}\n\n/* Insert an attribute list data file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_insert_file_reference(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     uint64_t file_reference,\n     libcerror_error_t **error )\n{\n\tuint64_t *safe_file_reference = NULL;\n\tstatic char *function         = \"libfsntfs_mft_attribute_list_insert_file_reference\";\n\tint entry_index               = 0;\n\tint result                    = 0;\n\n\tif( attribute_list == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsafe_file_reference = (uint64_t *) memory_allocate(\n\t                                    sizeof( uint64_t ) );\n\n\tif( safe_file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file reference.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t*safe_file_reference = file_reference;\n\n\tresult = libcdata_array_insert_entry(\n\t          attribute_list->file_references_array,\n\t          &entry_index,\n\t          (intptr_t *) safe_file_reference,\n\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_mft_attribute_list_compare_file_reference,\n\t          LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t \"%s: unable to insert file reference in array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tmemory_free(\n\t\t safe_file_reference );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( safe_file_reference != NULL )\n\t{\n\t\tmemory_free(\n\t\t safe_file_reference );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute_list.h",
    "content": "/*\n * Attribute list attribute ($ATTRIBUTE_LIST) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_ATTRIBUTE_LIST_H )\n#define _LIBFSNTFS_MFT_ATTRIBUTE_LIST_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft_attribute_list libfsntfs_mft_attribute_list_t;\n\nstruct libfsntfs_mft_attribute_list\n{\n\t/* The base record file reference\n\t */\n\tuint64_t base_record_file_reference;\n\n\t/* The attribute list entries array\n\t */\n\tlibcdata_array_t *entries_array;\n\n\t/* The attribute list data file references attary\n\t */\n\tlibcdata_array_t *file_references_array;\n};\n\nint libfsntfs_mft_attribute_list_initialize(\n     libfsntfs_mft_attribute_list_t **attribute_list,\n     uint64_t base_record_file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_free(\n     libfsntfs_mft_attribute_list_t **attribute_list,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_file_reference_free(\n     uint64_t **file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_read_data(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_read_from_attribute(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *list_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_get_number_of_entries(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int *number_of_entries,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_get_entry_by_index(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int entry_index,\n     libfsntfs_mft_attribute_list_entry_t **mft_attribute_list_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_compare_by_base_record_file_reference(\n     libfsntfs_mft_attribute_list_t *first_attribute_list,\n     libfsntfs_mft_attribute_list_t *second_attribute_list,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_get_number_of_file_references(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int *number_of_file_references,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_get_file_reference_by_index(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     int file_reference_index,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_compare_file_reference(\n     uint64_t *first_file_reference,\n     uint64_t *second_file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_insert_file_reference(\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     uint64_t file_reference,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_ATTRIBUTE_LIST_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute_list_entry.c",
    "content": "/*\n * Attribute list entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n#include \"libfsntfs_name.h\"\n\n#include \"fsntfs_mft_attribute_list.h\"\n\n/* Creates attribute list entry\n * Make sure the value attribute_list_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_initialize(\n     libfsntfs_mft_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_initialize\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute list entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*attribute_list_entry = memory_allocate_structure(\n\t                         libfsntfs_mft_attribute_list_entry_t );\n\n\tif( *attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create attribute list entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *attribute_list_entry,\n\t     0,\n\t     sizeof( libfsntfs_mft_attribute_list_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear attribute list entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *attribute_list_entry != NULL )\n\t{\n\t\tmemory_free(\n\t\t *attribute_list_entry );\n\n\t\t*attribute_list_entry = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees attribute list entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_free(\n     libfsntfs_mft_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_free\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *attribute_list_entry != NULL )\n\t{\n\t\tif( ( *attribute_list_entry )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *attribute_list_entry )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *attribute_list_entry );\n\n\t\t*attribute_list_entry = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the attribute list entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_read_data(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_read_data\";\n\tsize_t data_offset    = 0;\n\tuint8_t name_offset   = 0;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_list_entry->name != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid attribute list entry - name value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size < sizeof( fsntfs_mft_attribute_list_entry_header_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: unsupported data size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: attribute list entry header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_mft_attribute_list_entry_header_t ),\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_mft_attribute_list_entry_header_t *) data )->type,\n\t attribute_list_entry->attribute_type );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_attribute_list_entry_header_t *) data )->size,\n\t attribute_list_entry->size );\n\n\tattribute_list_entry->name_size = (uint16_t) ( (fsntfs_mft_attribute_list_entry_header_t *) data )->name_size;\n\n\tname_offset = ( (fsntfs_mft_attribute_list_entry_header_t *) data )->name_offset;\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_mft_attribute_list_entry_header_t *) data )->data_first_vcn,\n\t attribute_list_entry->data_first_vcn );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_mft_attribute_list_entry_header_t *) data )->file_reference,\n\t attribute_list_entry->file_reference );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_attribute_list_entry_header_t *) data )->identifier,\n\t attribute_list_entry->identifier );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: type\\t\\t\\t: 0x%08\" PRIx32 \" (%s)\\n\",\n\t\t function,\n\t\t attribute_list_entry->attribute_type,\n\t\t libfsntfs_debug_print_attribute_type(\n\t\t  attribute_list_entry->attribute_type ) );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: size\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t attribute_list_entry->size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name size\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t attribute_list_entry->name_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: name offset\\t\\t: %\" PRIu8 \"\\n\",\n\t\t function,\n\t\t name_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data first VCN\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t attribute_list_entry->data_first_vcn );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t function,\n\t\t attribute_list_entry->file_reference & 0xffffffffffffUL,\n\t\t attribute_list_entry->file_reference >> 48 );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: identifier\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t attribute_list_entry->identifier );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tdata_offset = sizeof( fsntfs_mft_attribute_list_entry_header_t );\n\n\tif( ( attribute_list_entry->size < sizeof( fsntfs_mft_attribute_list_entry_header_t ) )\n\t || ( attribute_list_entry->size > data_size ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tattribute_list_entry->name_size *= 2;\n\n\tif( attribute_list_entry->name_size > 0 )\n\t{\n\t\tif( ( name_offset < sizeof( fsntfs_mft_attribute_list_entry_header_t ) )\n\t\t || ( name_offset >= attribute_list_entry->size ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: name offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( data_offset < name_offset )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: unknown data:\\n\",\n\t\t\t\t function );\n\t\t\t\tlibcnotify_print_data(\n\t\t\t\t &( data[ data_offset ] ),\n\t\t\t\t (size_t) name_offset - data_offset,\n\t\t\t\t 0 );\n\t\t\t}\n\t\t}\n#endif\n\t\tif( attribute_list_entry->name_size > ( attribute_list_entry->size - name_offset ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset = (size_t) name_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: name data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) attribute_list_entry->name_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tattribute_list_entry->name = (uint8_t *) memory_allocate(\n\t\t                                          sizeof( uint8_t ) * (size_t) attribute_list_entry->name_size );\n\n\t\tif( attribute_list_entry->name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     attribute_list_entry->name,\n\t\t     &( data[ data_offset ] ),\n\t\t     (size_t) attribute_list_entry->name_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += (size_t) attribute_list_entry->name_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_utf16_string_value(\n\t\t\t     function,\n\t\t\t     \"name\\t\\t\\t\",\n\t\t\t     attribute_list_entry->name,\n\t\t\t     (size_t) attribute_list_entry->name_size,\n\t\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print UTF-16 string value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < attribute_list_entry->size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: trailing data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) attribute_list_entry->size - data_offset,\n\t\t\t 0 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( attribute_list_entry->name != NULL )\n\t{\n\t\tmemory_free(\n\t\t attribute_list_entry->name );\n\n\t\tattribute_list_entry->name = NULL;\n\t}\n\tattribute_list_entry->name_size = 0;\n\n\treturn( -1 );\n}\n\n/* Retrieves the attribute type\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_attribute_type(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint32_t *attribute_type,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_attribute_type\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*attribute_type = attribute_list_entry->attribute_type;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file references as an MFT entry index and sequence number\n * If the value sequence_number is NULL it will be ignored\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_file_reference(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_file_reference\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_reference = attribute_list_entry->file_reference;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_utf8_name_size\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( attribute_list_entry->name == NULL )\n\t || ( attribute_list_entry->name_size == 0 ) )\n\t{\n\t\tif( utf8_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf8_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf8_string_size_from_utf16_stream(\n\t\t     attribute_list_entry->name,\n\t\t     (size_t) attribute_list_entry->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_utf8_name(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_utf8_name\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_list_entry->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute list entry - missing name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     attribute_list_entry->name,\n\t     (size_t) attribute_list_entry->name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_utf16_name_size\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( attribute_list_entry->name == NULL )\n\t || ( attribute_list_entry->name_size == 0 ) )\n\t{\n\t\tif( utf16_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf16_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf16_string_size_from_utf16_stream(\n\t\t     attribute_list_entry->name,\n\t\t     (size_t) attribute_list_entry->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_get_utf16_name(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_get_utf16_name\";\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute list entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_list_entry->name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute list entry - missing name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     attribute_list_entry->name,\n\t     (size_t) attribute_list_entry->name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Compares the name with an UTF-8 encoded string\n * Returns 1 if the strings are equal, 0 if not or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string\";\n\tint result            = 0;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_list_entry->name == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          attribute_list_entry->name,\n\t          attribute_list_entry->name_size,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t \"%s: unable to compare UTF-8 string with name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Compares the name with an UTF-16 encoded string\n * Returns 1 if the strings are equal, 0 if not or -1 on error\n */\nint libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string\";\n\tint result            = 0;\n\n\tif( attribute_list_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_list_entry->name == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          attribute_list_entry->name,\n\t          attribute_list_entry->name_size,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t \"%s: unable to compare UTF-16 string with name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_attribute_list_entry.h",
    "content": "/*\n * Attribute list entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_ATTRIBUTE_LIST_ENTRY_H )\n#define _LIBFSNTFS_MFT_ATTRIBUTE_LIST_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft_attribute_list_entry libfsntfs_mft_attribute_list_entry_t;\n\nstruct libfsntfs_mft_attribute_list_entry\n{\n\t/* The attribute type\n\t */\n\tuint32_t attribute_type;\n\n\t/* The size\n\t */\n\tuint16_t size;\n\n\t/* The name size\n\t */\n\tuint16_t name_size;\n\n\t/* The data first VCN\n\t */\n\tuint64_t data_first_vcn;\n\n\t/* The file reference\n\t */\n\tuint64_t file_reference;\n\n\t/* The identifier\n\t */\n\tuint16_t identifier;\n\n\t/* The name\n\t */\n\tuint8_t *name;\n};\n\nint libfsntfs_mft_attribute_list_entry_initialize(\n     libfsntfs_mft_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_free(\n     libfsntfs_mft_attribute_list_entry_t **attribute_list_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_read_data(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_attribute_type(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint32_t *type,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_file_reference(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_utf8_name(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_get_utf16_name(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_list_entry_t *attribute_list_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_ATTRIBUTE_LIST_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_entry.c",
    "content": "/*\n * Master File Table (MFT) entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_fixup_values.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_attribute_list_entry.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_mft_entry_header.h\"\n#include \"libfsntfs_standard_information_values.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_unused.h\"\n\n#include \"fsntfs_mft_entry.h\"\n\nconst char fsntfs_mft_entry_signature[ 4 ] = { 'F', 'I', 'L', 'E' };\n\n/* Checks if a buffer containing the MFT entry is filled with 0-byte values (empty-block)\n * Returns 1 if empty, 0 if not or -1 on error\n */\nint libfsntfs_mft_entry_check_for_empty_block(\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_aligned_t *aligned_data_index = NULL;\n\tlibfsntfs_aligned_t *aligned_data_start = NULL;\n\tuint8_t *data_index                     = NULL;\n\tuint8_t *data_start                     = NULL;\n\tstatic char *function                   = \"libfsntfs_mft_entry_check_for_empty_block\";\n\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tdata_start = (uint8_t *) data;\n\tdata_index = (uint8_t *) data + 1;\n\tdata_size -= 1;\n\n\t/* Only optimize for data larger than the alignment\n\t */\n\tif( data_size > ( 2 * sizeof( libfsntfs_aligned_t ) ) )\n\t{\n\t\t/* Align the data start\n\t\t */\n\t\twhile( ( (intptr_t) data_start % sizeof( libfsntfs_aligned_t ) ) != 0 )\n\t\t{\n\t\t\tif( *data_start != *data_index )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\tdata_start += 1;\n\t\t\tdata_index += 1;\n\t\t\tdata_size  -= 1;\n\t\t}\n\t\t/* Align the data index\n\t\t */\n\t\twhile( ( (intptr_t) data_index % sizeof( libfsntfs_aligned_t ) ) != 0 )\n\t\t{\n\t\t\tif( *data_start != *data_index )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\tdata_index += 1;\n\t\t\tdata_size  -= 1;\n\t\t}\n\t\taligned_data_start = (libfsntfs_aligned_t *) data_start;\n\t\taligned_data_index = (libfsntfs_aligned_t *) data_index;\n\n\t\twhile( data_size > sizeof( libfsntfs_aligned_t ) )\n\t\t{\n\t\t\tif( *aligned_data_start != *aligned_data_index )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\taligned_data_index += 1;\n\t\t\tdata_size          -= sizeof( libfsntfs_aligned_t );\n\t\t}\n\t\tdata_index = (uint8_t *) aligned_data_index;\n\t}\n\twhile( data_size != 0 )\n\t{\n\t\tif( *data_start != *data_index )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tdata_index += 1;\n\t\tdata_size  -= 1;\n\t}\n\treturn( 1 );\n}\n\n/* Creates a MFT entry\n * Make sure the value mft_entry is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_initialize(\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_initialize\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry = memory_allocate_structure(\n\t              libfsntfs_mft_entry_t );\n\n\tif( *mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *mft_entry,\n\t     0,\n\t     sizeof( libfsntfs_mft_entry_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear MFT entry.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *mft_entry );\n\n\t\t*mft_entry = NULL;\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *mft_entry )->attributes_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create attributes array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libcdata_array_initialize(\n\t     &( ( *mft_entry )->alternate_data_attributes_array ),\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create alternate data attributes array.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *mft_entry )->file_name_attribute_index            = -1;\n\t( *mft_entry )->reparse_point_attribute_index        = -1;\n\t( *mft_entry )->security_descriptor_attribute_index  = -1;\n\t( *mft_entry )->standard_information_attribute_index = -1;\n\t( *mft_entry )->volume_information_attribute_index   = -1;\n\t( *mft_entry )->volume_name_attribute_index          = -1;\n\n\treturn( 1 );\n\non_error:\n\tif( *mft_entry != NULL )\n\t{\n\t\tif( ( *mft_entry )->alternate_data_attributes_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( ( *mft_entry )->alternate_data_attributes_array ),\n\t\t\t NULL,\n\t\t\t NULL );\n\t\t}\n\t\tif( ( *mft_entry )->attributes_array != NULL )\n\t\t{\n\t\t\tlibcdata_array_free(\n\t\t\t &( ( *mft_entry )->attributes_array ),\n\t\t\t NULL,\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t *mft_entry );\n\n\t\t*mft_entry = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a MFT entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_free(\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_free\";\n\tint result            = 1;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_entry != NULL )\n\t{\n\t\tif( ( *mft_entry )->header != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_entry_header_free(\n\t\t\t     &( ( *mft_entry )->header ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free MFT entry header.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( ( *mft_entry )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *mft_entry )->data );\n\t\t}\n\t\t/* The specific attribute references point to attributes in the array\n\t\t * and are freed by freeing the array and its values\n\t\t */\n\t\tif( libcdata_array_free(\n\t\t     &( ( *mft_entry )->attributes_array ),\n\t\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_free,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free attributes array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( ( *mft_entry )->attribute_list != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_list_free(\n\t\t\t     &( ( *mft_entry )->attribute_list ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free attribute list.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\t/* The alternate_data_attributes_array only contains references that are managed\n\t\t * by the attributes_array\n\t\t */\n\t\tif( libcdata_array_free(\n\t\t     &( ( *mft_entry )->alternate_data_attributes_array ),\n\t\t     NULL,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free alternate data attributes array.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *mft_entry );\n\n\t\t*mft_entry = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the MFT entry\n * Returns 1 if successful, 0 if empty or marked as bad, or -1 on error\n */\nint libfsntfs_mft_entry_read_data(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t *data,\n     size_t data_size,\n     uint32_t mft_entry_index,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_mft_entry_read_data\";\n\tsize_t data_offset              = 0;\n\tsize_t unknown_data_size        = 0;\n\tuint16_t attributes_offset      = 0;\n\tuint16_t fixup_values_offset    = 0;\n\tuint16_t number_of_fixup_values = 0;\n\tint result                      = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint32_t total_entry_size       = 0;\n#endif\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT entry - header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          data,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if MFT entry is empty.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: MFT entry: %\" PRIu32 \" is empty.\\n\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\t\t}\n#endif\n\t\tmft_entry->is_empty = 1;\n\n\t\treturn( 0 );\n\t}\n\tif( libfsntfs_mft_entry_header_initialize(\n\t     &( mft_entry->header ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry->header,\n\t          data,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\t/* Note that an empty MFT data can contain arbitrary data\n\t\t */\n\t\tmft_entry->is_empty = 1;\n\n\t\treturn( 0 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( libfsntfs_mft_entry_header_get_total_entry_size(\n\t\t     mft_entry->header,\n\t\t     &total_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve total entry size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( data_size != (size_t) total_entry_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: mismatch in total MFT entry size (calculated: %\" PRIzd \", stored: %\" PRIu32 \").\\n\",\n\t\t\t function,\n\t\t\t data_size,\n\t\t\t total_entry_size );\n\t\t}\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( libfsntfs_mft_entry_header_get_attributes_offset(\n\t     mft_entry->header,\n\t     &attributes_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attributes offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( attributes_offset >= data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid attributes offset value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_entry_header_get_fixup_values_offset(\n\t     mft_entry->header,\n\t     &fixup_values_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve fix-up values offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( fixup_values_offset > attributes_offset )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: fix-up values offset exceeds attributes offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( fixup_values_offset > 42 )\n\t{\n\t\tdata_offset = sizeof( fsntfs_mft_entry_header_t );\n\t}\n\telse\n\t{\n\t\t/* In NTFS 1.2 the fix-up values offset can point to wfixupPattern\n\t\t */\n\t\tdata_offset = 42;\n\t}\n\tif( data_offset < fixup_values_offset )\n\t{\n\t\tunknown_data_size = (size_t) fixup_values_offset - data_offset;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t unknown_data_size,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tdata_offset += unknown_data_size;\n\t}\n\tif( libfsntfs_mft_entry_header_get_number_of_fixup_values(\n\t     mft_entry->header,\n\t     &number_of_fixup_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of fix-up values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( number_of_fixup_values > 0 )\n\t{\n\t\tif( libfsntfs_fixup_values_apply(\n\t\t     data,\n\t\t     data_size,\n\t\t     fixup_values_offset,\n\t\t     number_of_fixup_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to apply fix-up values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += 2 + ( (size_t) number_of_fixup_values * 2 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( data_offset < attributes_offset )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( data[ data_offset ] ),\n\t\t\t (size_t) attributes_offset - data_offset,\n\t\t\t 0 );\n\t\t}\n\t}\n#endif\n\tmft_entry->is_empty = 0;\n\n\tmft_entry->index = mft_entry->header->index;\n\n\tif( mft_entry->index != mft_entry_index )\n\t{\n\t\tmft_entry->index = mft_entry_index;\n\t}\n\tmft_entry->file_reference = ( (uint64_t) mft_entry->header->sequence << 48 ) | mft_entry->index;\n\n\treturn( 1 );\n\non_error:\n\tif( mft_entry->header != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_header_free(\n\t\t &( mft_entry->header ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads the MFT entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_file_io_handle(\n     libfsntfs_mft_entry_t *mft_entry,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     uint32_t mft_entry_size,\n     uint32_t mft_entry_index,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_read_file_io_handle\";\n\tssize_t read_count    = 0;\n\tint result            = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->data != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT entry - data value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( (size_t) mft_entry_size <= 42 )\n\t || ( (size_t) mft_entry_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT entry size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmft_entry->data = (uint8_t *) memory_allocate(\n\t                               (size_t) mft_entry_size );\n\n\tif( mft_entry->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT entry data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tmft_entry->data_size = (size_t) mft_entry_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading MFT entry at offset: %\" PRIi64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset );\n\t}\n#endif\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              mft_entry->data,\n\t              mft_entry->data_size,\n\t              file_offset,\n\t              error );\n\n\tif( read_count != (ssize_t) mft_entry->data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry data at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry->data,\n\t          mft_entry->data_size,\n\t          mft_entry_index,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tmemory_free(\n\t\t mft_entry->data );\n\n\t\tmft_entry->data      = NULL;\n\t\tmft_entry->data_size = 0;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( mft_entry->header != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_header_free(\n\t\t &( mft_entry->header ),\n\t\t NULL );\n\t}\n\tif( mft_entry->data != NULL )\n\t{\n\t\tmemory_free(\n\t\t mft_entry->data );\n\n\t\tmft_entry->data = NULL;\n\t}\n\tmft_entry->data_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the MFT attributes\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_attributes_data(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_mft_entry_read_attributes_data\";\n\tsize_t data_offset                       = 0;\n\tuint32_t attribute_type                  = 0;\n\tuint16_t attributes_offset               = 0;\n\tint attribute_index                      = 0;\n\tint entry_index                          = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint32_t used_entry_size                 = 0;\n#endif\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size < 4 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: unsupported data size value too small\\n\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_header_get_attributes_offset(\n\t     mft_entry->header,\n\t     &attributes_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attributes offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tdata_offset = (size_t) attributes_offset;\n\n\tdo\n\t{\n\t\tif( data_offset > ( data_size - 4 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid MFT entry - attribute offset: %d value out of bounds.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t &( data[ data_offset ] ),\n\t\t attribute_type );\n\n\t\tif( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_END_OF_ATTRIBUTES )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_initialize(\n\t\t     &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_read_data(\n\t\t     mft_attribute,\n\t\t     io_handle,\n\t\t     &( data[ data_offset ] ),\n\t\t     data_size - data_offset,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read MFT attribute: %d of type: 0x%08\" PRIx32 \".\",\n\t\t\t function,\n\t\t\t attribute_index,\n\t\t\t attribute_type );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tdata_offset += mft_attribute->size;\n\n\t\tif( attribute_type == LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST )\n\t\t{\n\t\t\tif( mft_entry->list_attribute != NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - list attribute value already set.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tmft_entry->list_attribute = mft_attribute;\n\t\t}\n\t\t/* mft_entry->attributes_array takes over management of mft_attribute\n\t\t */\n\t\tif( libcdata_array_append_entry(\n\t\t     mft_entry->attributes_array,\n\t\t     &entry_index,\n\t\t     (intptr_t *) mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append attribute to array.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_entry_set_attribute_helper_values(\n\t\t     mft_entry,\n\t\t     entry_index,\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set helper values for attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\tmft_attribute = NULL;\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tmft_attribute = NULL;\n\n\t\tattribute_index++;\n\t}\n\twhile( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_END_OF_ATTRIBUTES );\n\n\tdata_offset += 4;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( libfsntfs_mft_entry_header_get_used_entry_size(\n\t\t     mft_entry->header,\n\t\t     &used_entry_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve used entry size.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( data_offset != (size_t) used_entry_size )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: mismatch in used MFT entry size (calculated: %\" PRIzd \", stored: %\" PRIu32 \").\\n\",\n\t\t\t function,\n\t\t\t data_offset,\n\t\t\t used_entry_size );\n\t\t}\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tlibcdata_array_empty(\n\t mft_entry->attributes_array,\n\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_free,\n\t NULL );\n\n\tmft_entry->file_name_attribute_index            = -1;\n\tmft_entry->reparse_point_attribute_index        = -1;\n\tmft_entry->security_descriptor_attribute_index  = -1;\n\tmft_entry->standard_information_attribute_index = -1;\n\tmft_entry->volume_information_attribute_index   = -1;\n\tmft_entry->volume_name_attribute_index          = -1;\n\tmft_entry->list_attribute                       = NULL;\n\tmft_entry->data_attribute                       = NULL;\n\tmft_entry->wof_compressed_data_attribute        = NULL;\n\n\treturn( -1 );\n}\n\n/* Reads the MFT attributes\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libcdata_btree_t *attribute_list_tree,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibcdata_tree_node_t *upper_node                      = NULL;\n\tlibfsntfs_mft_attribute_list_t *attribute_list        = NULL;\n\tlibfsntfs_mft_attribute_list_t *lookup_attribute_list = NULL;\n\tstatic char *function                                 = \"libfsntfs_mft_entry_read_attributes\";\n\tint result                                            = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->attributes_read != 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\tif( mft_entry->is_empty == 0 )\n\t{\n\t\tif( libfsntfs_mft_entry_read_attributes_data(\n\t\t     mft_entry,\n\t\t     io_handle,\n\t\t     mft_entry->data,\n\t\t     mft_entry->data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attributes of MFT entry: %d.\",\n\t\t\t function,\n\t\t\t mft_entry->index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( mft_entry->list_attribute != NULL )\n\t\t{\n\t\t\tif( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) != 0 )\n\t\t\t{\n\t\t\t\tif( libfsntfs_mft_attribute_list_initialize(\n\t\t\t\t     &lookup_attribute_list,\n\t\t\t\t     mft_entry->file_reference,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to create lookup attribute list.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tresult = libcdata_btree_get_value_by_value(\n\t\t\t\t          attribute_list_tree,\n\t\t\t\t          (intptr_t *) lookup_attribute_list,\n\t\t\t\t          (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfsntfs_mft_attribute_list_compare_by_base_record_file_reference,\n\t\t\t\t          &upper_node,\n\t\t\t\t          (intptr_t **) &attribute_list,\n\t\t\t\t          error );\n\n\t\t\t\tif( result == -1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t\t \"%s: unable to retrieve path hint from tree.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tif( libfsntfs_mft_attribute_list_free(\n\t\t\t\t     &lookup_attribute_list,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free lookup attribute list.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( libfsntfs_mft_entry_read_attribute_list(\n\t\t\t\t     mft_entry,\n\t\t\t\t     io_handle,\n\t\t\t\t     file_io_handle,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read attribute list.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t\tattribute_list = mft_entry->attribute_list;\n\t\t\t}\n\t\t\tif( attribute_list != NULL )\n\t\t\t{\n\t\t\t\tif( libfsntfs_mft_entry_read_attribute_list_data_mft_entries(\n\t\t\t\t     mft_entry,\n\t\t\t\t     attribute_list,\n\t\t\t\t     io_handle,\n\t\t\t\t     file_io_handle,\n\t\t\t\t     mft_entry_vector,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t\t \"%s: unable to read attribute list data MFT entries.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmft_entry->is_corrupted = 1;\n\t\t\t}\n\t\t}\n\t}\n\tmft_entry->attributes_read = 1;\n\n\treturn( 1 );\n\non_error:\n\tif( lookup_attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &lookup_attribute_list,\n\t\t NULL );\n\t}\n\tif( mft_entry->attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &( mft_entry->attribute_list ),\n\t\t NULL );\n\t}\n\tlibcdata_array_empty(\n\t mft_entry->alternate_data_attributes_array,\n\t NULL,\n\t NULL );\n\n\tlibcdata_array_empty(\n\t mft_entry->attributes_array,\n\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_attribute_free,\n\t NULL );\n\n\treturn( -1 );\n}\n\n/* Reads the attribute list\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_attribute_list(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_list_entry_t *attribute_list_entry = NULL;\n\tstatic char *function                                      = \"libfsntfs_mft_entry_read_attribute_list\";\n\tuint64_t attribute_list_data_mft_entry_index               = 0;\n\tuint64_t file_reference                                    = 0;\n\tint attribute_list_entry_index                             = 0;\n\tint number_of_attribute_list_entries                       = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->list_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT entry - missing list attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->attribute_list != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT entry - attribute list value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_list_initialize(\n\t     &( mft_entry->attribute_list ),\n\t     mft_entry->file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create attribute list.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_list_read_from_attribute(\n\t     mft_entry->attribute_list,\n\t     io_handle,\n\t     file_io_handle,\n\t     mft_entry->list_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read attribute list.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_list_get_number_of_entries(\n\t     mft_entry->attribute_list,\n\t     &number_of_attribute_list_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attribute list entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( attribute_list_entry_index = 0;\n\t     attribute_list_entry_index < number_of_attribute_list_entries;\n\t     attribute_list_entry_index++ )\n\t{\n\t\tif( libfsntfs_mft_attribute_list_get_entry_by_index(\n\t\t     mft_entry->attribute_list,\n\t\t     attribute_list_entry_index,\n\t\t     &attribute_list_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute list entry: %d.\",\n\t\t\t function,\n\t\t\t attribute_list_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_entry_get_file_reference(\n\t\t     attribute_list_entry,\n\t\t     &file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute list entry: %d file reference.\",\n\t\t\t function,\n\t\t\t attribute_list_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tattribute_list_data_mft_entry_index = file_reference & 0xffffffffffffUL;\n\n\t\tif( attribute_list_data_mft_entry_index > (uint64_t) INT_MAX )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: attribute list data MFT entry reference value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t/* Ignore the current MFT entry\n\t\t */\n\t\tif( attribute_list_data_mft_entry_index == (uint64_t) mft_entry->index )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_list_insert_file_reference(\n\t\t     mft_entry->attribute_list,\n\t\t     file_reference,\n\t\t     error ) == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to insert attribute list data file reference in attribute list.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( mft_entry->attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &( mft_entry->attribute_list ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Reads a specific attribute list data MFT entry\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_entry_read_attribute_list_data_mft_entry_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libfcache_cache_t *mft_entry_cache,\n     uint64_t file_reference,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *data_mft_attribute = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute      = NULL;\n\tlibfsntfs_mft_entry_t *data_mft_entry         = NULL;\n\tstatic char *function                         = \"libfsntfs_mft_entry_read_attribute_list_data_mft_entry_by_index\";\n\tuint64_t attribute_list_data_mft_entry        = 0;\n\tuint64_t base_record_file_reference           = 0;\n\tint attribute_index                           = 0;\n\tint entry_index                               = 0;\n\tint number_of_attributes                      = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tattribute_list_data_mft_entry = file_reference & 0xffffffffffffUL;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading data file reference: %\" PRIu64 \"-%\" PRIu16 \"\\n\",\n\t\t function,\n\t\t attribute_list_data_mft_entry,\n\t\t (uint16_t) ( file_reference >> 48 ) );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\tif( libfdata_vector_get_element_value_by_index(\n\t     mft_entry_vector,\n\t     (intptr_t *) file_io_handle,\n\t     (libfdata_cache_t *) mft_entry_cache,\n\t     (int) attribute_list_data_mft_entry,\n\t     (intptr_t **) &data_mft_entry,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t attribute_list_data_mft_entry );\n\n\t\treturn( -1 );\n\t}\n\tif( data_mft_entry->header == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libfsntfs_mft_entry_header_get_base_record_file_reference(\n\t     data_mft_entry->header,\n\t     &base_record_file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->file_reference != base_record_file_reference )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libfsntfs_mft_entry_read_attributes_data(\n\t     data_mft_entry,\n\t     io_handle,\n\t     data_mft_entry->data,\n\t     data_mft_entry->data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read attributes.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     data_mft_entry->attributes_array,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( attribute_index = 0;\n\t     attribute_index < number_of_attributes;\n\t     attribute_index++ )\n\t{\n\t\tif( libcdata_array_get_entry_by_index(\n\t\t     data_mft_entry->attributes_array,\n\t\t     attribute_index,\n\t\t     (intptr_t **) &mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute: %d from list MFT entry.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_mft_attribute_clone(\n\t\t     &data_mft_attribute,\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to clone MFT attribute: %d.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t/* mft_entry->attributes_array takes over management of data_mft_attribute\n\t\t */\n\t\tif( libcdata_array_append_entry(\n\t\t     mft_entry->attributes_array,\n\t\t     &entry_index,\n\t\t     (intptr_t *) data_mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to append MFT attribute to array.\",\n\t\t\t function );\n\n\t\t\tlibfsntfs_mft_attribute_free(\n\t\t\t &data_mft_attribute,\n\t\t\t NULL );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_mft_entry_set_attribute_helper_values(\n\t\t     mft_entry,\n\t\t     entry_index,\n\t\t     data_mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to set helper values for attribute: %d.\",\n\t\t\t function,\n\t\t\t entry_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tdata_mft_attribute = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the attribute list data MFT entries\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_attribute_list_data_mft_entries(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libcerror_error_t **error )\n{\n\tlibfcache_cache_t *mft_entry_cache = NULL;\n\tstatic char *function              = \"libfsntfs_mft_entry_read_attribute_list_data_mft_entries\";\n\tuint64_t file_reference            = 0;\n\tint file_reference_index           = 0;\n\tint number_of_file_entries         = 0;\n\tint result                         = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Read the list data MFT entries\n\t * Use a local cache to prevent cache outs\n\t */\n\tif( libfcache_cache_initialize(\n\t     &mft_entry_cache,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_attribute_list_get_number_of_file_references(\n\t     attribute_list,\n\t     &number_of_file_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of attribute list data MFT entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( file_reference_index = 0;\n\t     file_reference_index < number_of_file_entries;\n\t     file_reference_index++ )\n\t{\n\t\tif( libfsntfs_mft_attribute_list_get_file_reference_by_index(\n\t\t     attribute_list,\n\t\t     file_reference_index,\n\t\t     &file_reference,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute list data MFT entry: %d.\",\n\t\t\t function,\n\t\t\t file_reference_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_mft_entry_read_attribute_list_data_mft_entry_by_index(\n\t\t          mft_entry,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          mft_entry_vector,\n\t\t          mft_entry_cache,\n\t\t          file_reference,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read attribute list data MFT entry: %\" PRIu64 \"-%\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t file_reference & 0xffffffffffffUL,\n\t\t\t file_reference >> 48 );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tmft_entry->is_corrupted = 1;\n\t\t}\n\t}\n\tif( libfcache_cache_free(\n\t     &mft_entry_cache,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free MFT entry cache.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( mft_entry_cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &mft_entry_cache,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Determines if the MFT entry is empty\n * Returns 1 if empty, 0 if not or -1 on error\n */\nint libfsntfs_mft_entry_is_empty(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_is_empty\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (int) mft_entry->is_empty );\n}\n\n/* Determines if the MFT entry is allocated (in use)\n * Returns 1 if allocated, 0 if not or -1 on error\n */\nint libfsntfs_mft_entry_is_allocated(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_is_allocated\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT entry - missing header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( mft_entry->header->flags & LIBFSNTFS_MFT_ENTRY_FLAG_IN_USE ) != 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Determines if the MFT entry is corrupted\n * Returns 1 if corrupted, 0 if not or -1 on error\n */\nint libfsntfs_mft_entry_is_corrupted(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_is_corrupted\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (int) mft_entry->is_corrupted );\n}\n\n/* Retrieves the file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_file_reference(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_file_reference\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_reference = mft_entry->file_reference;\n\n\treturn( 1 );\n}\n\n/* Retrieves the base record file reference\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_entry_get_base_record_file_reference(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_base_record_file_reference\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->header == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libfsntfs_mft_entry_header_get_base_record_file_reference(\n\t     mft_entry->header,\n\t     file_reference,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the journal sequence number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_journal_sequence_number(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_journal_sequence_number\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_header_get_journal_sequence_number(\n\t     mft_entry->header,\n\t     journal_sequence_number,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve journal sequence number.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the number of attributes\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_number_of_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_number_of_attributes\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     mft_entry->attributes_array,\n\t     number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from attributes array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_attribute_by_index\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_entry->attributes_array,\n\t     attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from attributes array.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the $STANDARD_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_entry_get_standard_information_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_standard_information_attribute\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->standard_information_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_entry->attributes_array,\n\t     mft_entry->standard_information_attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from attributes array.\",\n\t\t function,\n\t\t mft_entry->standard_information_attribute_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the $VOLUME_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_entry_get_volume_information_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_volume_information_attribute\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->volume_information_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_entry->attributes_array,\n\t     mft_entry->volume_information_attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from attributes array.\",\n\t\t function,\n\t\t mft_entry->volume_information_attribute_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the $VOLUME_NAME attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_entry_get_volume_name_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_volume_name_attribute\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry->volume_name_attribute_index == -1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_entry->attributes_array,\n\t     mft_entry->volume_name_attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from attributes array.\",\n\t\t function,\n\t\t mft_entry->volume_name_attribute_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the number of alternate data attributes\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_number_of_alternate_data_attributes\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     mft_entry->alternate_data_attributes_array,\n\t     number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from alternate data attributes array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific alternate data attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_get_alternate_data_attribute_by_index\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_entry_by_index(\n\t     mft_entry->alternate_data_attributes_array,\n\t     attribute_index,\n\t     (intptr_t **) attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve entry: %d from alternate data attributes array.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves a specific alternate data attribute for an UTF-8 encoded name\n * Returns 1 if successful, 0 if no such alternate data attribute or -1 on error\n */\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function    = \"libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name\";\n\tint attribute_index      = 0;\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     mft_entry->alternate_data_attributes_array,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from alternate data attributes array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( attribute_index = 0;\n\t     attribute_index < number_of_attributes;\n\t     attribute_index++ )\n\t{\n\t\tif( libcdata_array_get_entry_by_index(\n\t\t     mft_entry->alternate_data_attributes_array,\n\t\t     attribute_index,\n\t\t     (intptr_t **) attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve entry: %d from alternative data attributes array.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t\t          *attribute,\n\t\t          utf8_string,\n\t\t          utf8_string_length,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare UTF-8 string with alternative data attribute name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 1 )\n\t\t{\n\t\t\treturn( 1 );\n\t\t}\n\t}\n\t*attribute = NULL;\n\n\treturn( 0 );\n\non_error:\n\t*attribute = NULL;\n\n\treturn( -1 );\n}\n\n/* Retrieves a specific alternate data attribute for an UTF-16 encoded name\n * Returns 1 if successful, 0 if no such alternate data attribute or -1 on error\n */\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function    = \"libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name\";\n\tint attribute_index      = 0;\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     mft_entry->alternate_data_attributes_array,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of entries from alternate data attributes array.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( attribute_index = 0;\n\t     attribute_index < number_of_attributes;\n\t     attribute_index++ )\n\t{\n\t\tif( libcdata_array_get_entry_by_index(\n\t\t     mft_entry->alternate_data_attributes_array,\n\t\t     attribute_index,\n\t\t     (intptr_t **) attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve entry: %d from alternative data attributes array.\",\n\t\t\t function,\n\t\t\t attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t\t          *attribute,\n\t\t          utf16_string,\n\t\t          utf16_string_length,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare UTF-16 string with alternative data attribute name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 1 )\n\t\t{\n\t\t\treturn( 1 );\n\t\t}\n\t}\n\t*attribute = NULL;\n\n\treturn( 0 );\n\non_error:\n\t*attribute = NULL;\n\n\treturn( -1 );\n}\n\n/* Sets the attribute helper values for an attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_set_attribute_helper_values(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t *attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t utf8_attribute_name[ 8 ];\n\n\tstatic char *function                                                = \"libfsntfs_mft_entry_set_attribute_helper_values\";\n\tsize_t utf8_attribute_name_size                                      = 0;\n\tuint32_t attribute_type                                              = 0;\n\tint result                                                           = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n#endif\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_utf8_name_size(\n\t     attribute,\n\t     &utf8_attribute_name_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 attribute name size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_DATA:\n\t\t\tif( libfsntfs_mft_entry_set_data_attribute_helper_values(\n\t\t\t     mft_entry,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to set data attribute helper values.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\tif( mft_entry->file_name_attribute_index == -1 )\n\t\t\t{\n\t\t\t\tmft_entry->file_name_attribute_index = attribute_index;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT:\n\t\t\t/* Only interested in attribute names that would match $I30\n\t\t\t */\n\t\t\tif( ( utf8_attribute_name_size == 0 )\n\t\t\t || ( utf8_attribute_name_size > 8 ) )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif( libfsntfs_mft_attribute_get_utf8_name(\n\t\t\t     attribute,\n\t\t\t     utf8_attribute_name,\n\t\t\t     utf8_attribute_name_size,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve UTF-8 attribute name.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tresult = libuna_utf8_string_compare_with_utf8_stream(\n\t\t\t          utf8_attribute_name,\n\t\t\t          utf8_attribute_name_size,\n\t\t\t          (uint8_t *) \"$I30\",\n\t\t\t          4,\n\t\t\t          error );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t\t \"%s: unable to compare UTF-8 string with $I30.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\telse if( result == LIBUNA_COMPARE_EQUAL )\n\t\t\t{\n\t\t\t\tmft_entry->has_i30_index = 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\t/* Assume only one reparse point attribute per MFT entry is allowed\n\t\t\t */\n\t\t\tif( mft_entry->reparse_point_attribute_index != -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - reparse point attribute index value already set.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tmft_entry->reparse_point_attribute_index = attribute_index;\n\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\t/* Assume only one security descriptor attribute per MFT entry is allowed\n\t\t\t */\n\t\t\tif( mft_entry->security_descriptor_attribute_index != -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - security descriptor attribute index value already set.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tmft_entry->security_descriptor_attribute_index = attribute_index;\n\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libfsntfs_standard_information_values_initialize(\n\t\t\t     &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_read_from_mft_attribute(\n\t\t\t     standard_information_values,\n\t\t\t     attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read standard information values from MFT attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tlibfsntfs_standard_information_values_free(\n\t\t\t\t &standard_information_values,\n\t\t\t\t NULL );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( libfsntfs_standard_information_values_free(\n\t\t\t     &standard_information_values,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free standard information values.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\t/* Assume only one standard information attribute per MFT entry is allowed\n\t\t\t */\n\t\t\tif( mft_entry->standard_information_attribute_index != -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - standard information attribute index value already set.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tmft_entry->standard_information_attribute_index = attribute_index;\n\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\t/* Assume only one volume information attribute per MFT entry is allowed\n\t\t\t */\n\t\t\tif( mft_entry->volume_information_attribute_index != -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - volume information attribute index value already set.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tmft_entry->volume_information_attribute_index = attribute_index;\n\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\t/* Assume only one volume name attribute per MFT entry is allowed\n\t\t\t */\n\t\t\tif( mft_entry->volume_name_attribute_index != -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t\t\t \"%s: invalid MFT entry - volume name attribute index value already set.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tmft_entry->volume_name_attribute_index = attribute_index;\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn( 1 );\n}\n\n/* Sets the attribute helper values for a $DATA attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_set_data_attribute_helper_values(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *existing_data_attribute = NULL;\n\tuint8_t *utf8_attribute_name                       = NULL;\n\tstatic char *function                              = \"libfsntfs_mft_entry_set_data_attribute_helper_values\";\n\tsize_t utf8_attribute_name_size                    = 0;\n\tint attribute_index                                = 0;\n\tint entry_index                                    = 0;\n\tint result                                         = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_utf8_name_size(\n\t     data_attribute,\n\t     &utf8_attribute_name_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 attribute name size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( utf8_attribute_name_size <= 1 )\n\t{\n\t\tif( libfsntfs_mft_attribute_append_to_chain(\n\t\t     &( mft_entry->data_attribute ),\n\t\t     data_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t \"%s: unable to chain attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( utf8_attribute_name_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid UTF-8 attribute name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tutf8_attribute_name = (uint8_t *) memory_allocate(\n\t\t                                   (size_t) utf8_attribute_name_size );\n\n\t\tif( utf8_attribute_name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create UTF-8 attribute name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_mft_attribute_get_utf8_name(\n\t\t     data_attribute,\n\t\t     utf8_attribute_name,\n\t\t     utf8_attribute_name_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 attribute name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_mft_entry_get_data_attribute_by_utf8_name(\n\t\t          mft_entry,\n\t\t          utf8_attribute_name,\n\t\t          utf8_attribute_name_size,\n\t\t          &attribute_index,\n\t\t          &existing_data_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tif( libcdata_array_append_entry(\n\t\t\t     mft_entry->alternate_data_attributes_array,\n\t\t\t     &entry_index,\n\t\t\t     (intptr_t *) data_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to append alternate data attribute to array.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\texisting_data_attribute = data_attribute;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( libfsntfs_mft_attribute_append_to_chain(\n\t\t\t     &existing_data_attribute,\n\t\t\t     data_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_APPEND_FAILED,\n\t\t\t\t \"%s: unable to chain alternate data attribute.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( libcdata_array_set_entry_by_index(\n\t\t\t     mft_entry->alternate_data_attributes_array,\n\t\t\t     attribute_index,\n\t\t\t     (intptr_t *) existing_data_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to append set data attribute: %d in array.\",\n\t\t\t\t function,\n\t\t\t\t attribute_index );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tmemory_free(\n\t\t utf8_attribute_name );\n\n\t\tutf8_attribute_name = NULL;\n\n\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t\t          data_attribute,\n\t\t          (uint8_t *) \"WofCompressedData\",\n\t\t          17,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare UTF-8 string with alternative data attribute name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 1 )\n\t\t{\n\t\t\tmft_entry->wof_compressed_data_attribute = existing_data_attribute;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( utf8_attribute_name != NULL )\n\t{\n\t\tmemory_free(\n\t\t utf8_attribute_name );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves a data attribute with the specified name\n * Returns 1 if successful, 0 if no attribute was found or -1 on error\n */\nint libfsntfs_mft_entry_get_data_attribute_by_utf8_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     int *attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *safe_attribute = NULL;\n\tstatic char *function                     = \"libfsntfs_mft_entry_get_data_attribute_by_utf8_name\";\n\tint number_of_attributes                  = 0;\n\tint result                                = 0;\n\tint safe_attribute_index                  = 0;\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string_length > (size_t) ( SSIZE_MAX - 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-8 string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libcdata_array_get_number_of_entries(\n\t     mft_entry->alternate_data_attributes_array,\n\t     &number_of_attributes,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of alternate data attributes.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfor( safe_attribute_index = 0;\n\t     safe_attribute_index < number_of_attributes;\n\t     safe_attribute_index++ )\n\t{\n\t\tif( libcdata_array_get_entry_by_index(\n\t\t     mft_entry->alternate_data_attributes_array,\n\t\t     safe_attribute_index,\n\t\t     (intptr_t **) &safe_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve alternate data attribute: %d.\",\n\t\t\t function,\n\t\t\t safe_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t\t          safe_attribute,\n\t\t          utf8_string,\n\t\t          utf8_string_length,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GENERIC,\n\t\t\t \"%s: unable to compare UTF-8 string with alternative data attribute: %d name.\",\n\t\t\t function,\n\t\t\t safe_attribute_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif( result != 0 )\n\t{\n\t\t*attribute_index = safe_attribute_index;\n\t\t*attribute       = safe_attribute;\n\t}\n\telse\n\t{\n\t\t*attribute_index = 0;\n\t\t*attribute       = NULL;\n\t}\n\treturn( result );\n}\n\n/* Determines if the file entry has the directory entries ($I30) index\n * Returns 1 if the default data stream, 0 if not or -1 on error\n */\nint libfsntfs_mft_entry_has_directory_entries_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_has_directory_entries_index\";\n\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (int) mft_entry->has_i30_index );\n}\n\n/* Reads the MFT entry\n * Callback function for the MFT entry vector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_read_element_data(\n     intptr_t *data_handle LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index LIBFSNTFS_ATTRIBUTE_UNUSED,\n     off64_t element_data_offset,\n     size64_t element_data_size,\n     uint32_t element_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     uint8_t read_flags LIBFSNTFS_ATTRIBUTE_UNUSED,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tstatic char *function            = \"libfsntfs_mft_entry_read_element_data\";\n\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( data_handle )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_data_file_index )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( element_flags )\n\tLIBFSNTFS_UNREFERENCED_PARAMETER( read_flags )\n\n#if ( SIZEOF_INT <= 4 )\n\tif( element_index < 0 )\n#else\n\tif( ( element_index < 0 )\n\t || ( (int64_t) element_index > (int64_t) UINT32_MAX ) )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid element index value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( element_data_size > (size64_t) UINT32_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid element data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_entry_initialize(\n\t     &mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create MFT entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_entry_read_file_io_handle(\n\t     mft_entry,\n\t     file_io_handle,\n\t     element_data_offset,\n\t     (uint32_t) element_data_size,\n\t     (uint32_t) element_index,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT entry: %d.\",\n\t\t function,\n\t\t element_index );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_vector_set_element_value_by_index(\n\t     vector,\n\t     (intptr_t *) file_io_handle,\n\t     cache,\n\t     element_index,\n\t     (intptr_t *) mft_entry,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_mft_entry_free,\n\t     LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set MFT entry as element value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_entry.h",
    "content": "/*\n * Master File Table (MFT) entry functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_ENTRY_H )\n#define _LIBFSNTFS_MFT_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_attribute_list.h\"\n#include \"libfsntfs_mft_entry_header.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft_entry libfsntfs_mft_entry_t;\n\nstruct libfsntfs_mft_entry\n{\n\t/* The MFT entry header\n\t */\n\tlibfsntfs_mft_entry_header_t *header;\n\n\t/* The data\n\t */\n\tuint8_t *data;\n\n\t/* The data size\n\t */\n\tsize_t data_size;\n\n\t/* The index\n\t */\n\tuint32_t index;\n\n\t/* The file reference\n\t */\n\tuint64_t file_reference;\n\n\t/* The attributes array\n\t */\n\tlibcdata_array_t *attributes_array;\n\n\t/* The (attribute) list attribute\n\t */\n\tlibfsntfs_mft_attribute_t *list_attribute;\n\n\t/* The attribute list\n\t */\n\tlibfsntfs_mft_attribute_list_t *attribute_list;\n\n\t/* The default (nameless) $DATA attribute\n\t */\n\tlibfsntfs_mft_attribute_t *data_attribute;\n\n\t/* The WofCompressedData $DATA attribute\n\t */\n\tlibfsntfs_mft_attribute_t *wof_compressed_data_attribute;\n\n\t/* The alternate data attributes array\n\t */\n\tlibcdata_array_t *alternate_data_attributes_array;\n\n\t/* The index of the (first) file name attribute or -1 if not set\n\t */\n\tint file_name_attribute_index;\n\n\t/* The index of the reparse point attribute or -1 if not set\n\t */\n\tint reparse_point_attribute_index;\n\n\t/* The index of the security descriptor attribute or -1 if not set\n\t */\n\tint security_descriptor_attribute_index;\n\n\t/* The index of the standard information attribute or -1 if not set\n\t */\n\tint standard_information_attribute_index;\n\n\t/* The index of the volume information attribute or -1 if not set\n\t */\n\tint volume_information_attribute_index;\n\n\t/* The index of the volume name attribute or -1 if not set\n\t */\n\tint volume_name_attribute_index;\n\n\t/* Value to indicate the MFT entry is empty\n\t */\n\tuint8_t is_empty;\n\n\t/* Value to indicate the MFT entry is corrupted\n\t */\n\tuint8_t is_corrupted;\n\n\t/* Value to indicate the MFT entry has an $I30 index\n\t */\n\tuint8_t has_i30_index;\n\n\t/* Value to indicate the attributes have been read\n\t */\n\tuint8_t attributes_read;\n};\n\nint libfsntfs_mft_entry_check_for_empty_block(\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_initialize(\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_free(\n     libfsntfs_mft_entry_t **mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_data(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint8_t *data,\n     size_t data_size,\n     uint32_t mft_entry_index,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_file_io_handle(\n     libfsntfs_mft_entry_t *mft_entry,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     uint32_t mft_entry_size,\n     uint32_t mft_entry_index,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_attributes_data(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libcdata_btree_t *attribute_list_tree,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_attribute_list(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_attribute_list_data_mft_entry_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libfcache_cache_t *mft_entry_cache,\n     uint64_t file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_attribute_list_data_mft_entries(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_list_t *attribute_list,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *mft_entry_vector,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_is_empty(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_is_allocated(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_is_corrupted(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_file_reference(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_base_record_file_reference(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *file_reference,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_journal_sequence_number(\n     libfsntfs_mft_entry_t *mft_entry,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_number_of_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_standard_information_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_volume_information_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_volume_name_attribute(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_set_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n     libfsntfs_mft_entry_t *mft_entry,\n     int *number_of_attributes,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_set_attribute_helper_values(\n     libfsntfs_mft_entry_t *mft_entry,\n     int attribute_index,\n     libfsntfs_mft_attribute_t *attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_set_data_attribute_helper_values(\n     libfsntfs_mft_entry_t *mft_entry,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_get_data_attribute_by_utf8_name(\n     libfsntfs_mft_entry_t *mft_entry,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     int *attribute_index,\n     libfsntfs_mft_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_has_directory_entries_index(\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_read_element_data(\n     intptr_t *data_handle,\n     libbfio_handle_t *file_io_handle,\n     libfdata_vector_t *vector,\n     libfdata_cache_t *cache,\n     int element_index,\n     int element_data_file_index,\n     off64_t element_data_offset,\n     size64_t element_data_size,\n     uint32_t element_flags,\n     uint8_t read_flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_ENTRY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_entry_header.c",
    "content": "/*\n * Master File Table (MFT) entry header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_entry_header.h\"\n\n#include \"fsntfs_mft_entry.h\"\n\n/* Creates MFT entry header\n * Make sure the value mft_entry_header is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_initialize(\n     libfsntfs_mft_entry_header_t **mft_entry_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_initialize\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_entry_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT entry header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry_header = memory_allocate_structure(\n\t                     libfsntfs_mft_entry_header_t );\n\n\tif( *mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *mft_entry_header,\n\t     0,\n\t     sizeof( libfsntfs_mft_entry_header_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear MFT entry header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *mft_entry_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *mft_entry_header );\n\n\t\t*mft_entry_header = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees MFT entry header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_free(\n     libfsntfs_mft_entry_header_t **mft_entry_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_free\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_entry_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *mft_entry_header );\n\n\t\t*mft_entry_header = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the MFT entry header\n * Returns 1 if successful, 0 if FILE signature is not present or -1 on error\n */\nint libfsntfs_mft_entry_header_read_data(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"libfsntfs_mft_entry_header_read_data\";\n\tsize_t header_data_size = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint16_t value_16bit    = 0;\n#endif\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < 2 )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->fixup_values_offset,\n\t mft_entry_header->fixup_values_offset );\n\n\tif( mft_entry_header->fixup_values_offset > 42 )\n\t{\n\t\theader_data_size = sizeof( fsntfs_mft_entry_header_t );\n\t}\n\telse\n\t{\n\t\theader_data_size = 42;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: MFT entry header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t header_data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( data_size < header_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( memory_compare(\n\t     ( (fsntfs_mft_entry_header_t *) data )->signature,\n\t     \"BAAD\",\n\t     4 ) == 0 )\n\t{\n\t\tmft_entry_header->is_bad = 1;\n\n\t\treturn( 0 );\n\t}\n\tmft_entry_header->is_bad = 0;\n\n\tif( memory_compare(\n\t     ( (fsntfs_mft_entry_header_t *) data )->signature,\n\t     \"FILE\",\n\t     4 ) != 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->number_of_fixup_values,\n\t mft_entry_header->number_of_fixup_values );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->journal_sequence_number,\n\t mft_entry_header->journal_sequence_number );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->sequence,\n\t mft_entry_header->sequence );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->reference_count,\n\t mft_entry_header->reference_count );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->attributes_offset,\n\t mft_entry_header->attributes_offset );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->flags,\n\t mft_entry_header->flags );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->used_entry_size,\n\t mft_entry_header->used_entry_size );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->total_entry_size,\n\t mft_entry_header->total_entry_size );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_mft_entry_header_t *) data )->base_record_file_reference,\n\t mft_entry_header->base_record_file_reference );\n\n\tif( header_data_size > 42 )\n\t{\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_mft_entry_header_t *) data )->index,\n\t\t mft_entry_header->index );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: signature\\t\\t\\t\\t\\t: %c%c%c%c\\n\",\n\t\t function,\n\t\t ( (fsntfs_mft_entry_header_t *) data )->signature[ 0 ],\n\t\t ( (fsntfs_mft_entry_header_t *) data )->signature[ 1 ],\n\t\t ( (fsntfs_mft_entry_header_t *) data )->signature[ 2 ],\n\t\t ( (fsntfs_mft_entry_header_t *) data )->signature[ 3 ] );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: fix-up values offset\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->fixup_values_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: number of fix-up values\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->number_of_fixup_values );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: journal sequence number\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->journal_sequence_number );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: sequence\\t\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->sequence );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: reference count\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->reference_count );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: attributes offset\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->attributes_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: flags\\t\\t\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->flags );\n\t\tlibfsntfs_debug_print_mft_entry_flags(\n\t\t mft_entry_header->flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: used entry size\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->used_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: total entry size\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->total_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: base record file reference\\t\\t: %\" PRIu64 \"-%\" PRIu64 \"\\n\",\n\t\t function,\n\t\t mft_entry_header->base_record_file_reference & 0xffffffffffffUL,\n\t\t mft_entry_header->base_record_file_reference >> 48 );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mft_entry_header_t *) data )->first_available_attribute_identifier,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: first available attribute identifier\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tif( header_data_size > 42 )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t\t ( (fsntfs_mft_entry_header_t *) data )->unknown1,\n\t\t\t value_16bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unknown1\\t\\t\\t\\t\\t: 0x%04\" PRIu16 \"\\n\",\n\t\t\t function,\n\t\t\t value_16bit );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: index\\t\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t mft_entry_header->index );\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( mft_entry_header->fixup_values_offset < header_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid fix-up values offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry_header->attributes_offset < header_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid attributes offset value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the fix-up values offset\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_fixup_values_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *fixup_values_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_fixup_values_offset\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( fixup_values_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid fix-up values offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*fixup_values_offset = mft_entry_header->fixup_values_offset;\n\n\treturn( 1 );\n}\n\n/* Retrieves the number of fix-up values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_number_of_fixup_values(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *number_of_fixup_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_number_of_fixup_values\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( number_of_fixup_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid number of fix-up values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*number_of_fixup_values = mft_entry_header->number_of_fixup_values;\n\n\treturn( 1 );\n}\n\n/* Retrieves the journal sequence number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_journal_sequence_number(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_journal_sequence_number\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( journal_sequence_number == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid journal sequence number.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*journal_sequence_number = mft_entry_header->journal_sequence_number;\n\n\treturn( 1 );\n}\n\n/* Retrieves the reference count\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_reference_count(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *reference_count,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_reference_count\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reference_count == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reference count.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*reference_count = mft_entry_header->reference_count;\n\n\treturn( 1 );\n}\n\n/* Retrieves the attributes offset\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_attributes_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *attributes_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_attributes_offset\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attributes_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attributes offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*attributes_offset = mft_entry_header->attributes_offset;\n\n\treturn( 1 );\n}\n\n/* Retrieves the used entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_used_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint32_t *used_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_used_entry_size\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( used_entry_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid used entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*used_entry_size = mft_entry_header->used_entry_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the total entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_total_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint32_t *total_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_total_entry_size\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( total_entry_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid total entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*total_entry_size = mft_entry_header->total_entry_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the base record file reference\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_entry_header_get_base_record_file_reference(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint64_t *base_record_file_reference,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_mft_entry_header_get_base_record_file_reference\";\n\n\tif( mft_entry_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( base_record_file_reference == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid base record file reference.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*base_record_file_reference = mft_entry_header->base_record_file_reference;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_entry_header.h",
    "content": "/*\n * Master File Table (MFT) entry header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_ENTRY_HEADER_H )\n#define _LIBFSNTFS_MFT_ENTRY_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_mft_entry_header libfsntfs_mft_entry_header_t;\n\nstruct libfsntfs_mft_entry_header\n{\n\t/* The fix-up values offset\n\t */\n\tuint16_t fixup_values_offset;\n\n\t/* The number of fix-up values\n\t */\n\tuint16_t number_of_fixup_values;\n\n\t/* The journal sequence number\n\t */\n\tuint64_t journal_sequence_number;\n\n\t/* The sequence\n\t */\n\tuint16_t sequence;\n\n\t/* The reference count\n\t */\n\tuint16_t reference_count;\n\n\t/* The attributes offset\n\t */\n\tuint16_t attributes_offset;\n\n\t/* The flags\n\t */\n\tuint16_t flags;\n\n\t/* The used entry size \n\t */\n\tuint32_t used_entry_size;\n\n\t/* The total entry size \n\t */\n\tuint32_t total_entry_size;\n\n\t/* The base record file reference\n\t */\n\tuint64_t base_record_file_reference;\n\n\t/* The index\n\t */\n\tuint32_t index;\n\n\t/* Value to indicate if the MFT entry is bad\n\t * The signature is set to \"BAAD\"\n\t */\n\tuint8_t is_bad;\n};\n\nint libfsntfs_mft_entry_header_initialize(\n     libfsntfs_mft_entry_header_t **mft_entry_header,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_free(\n     libfsntfs_mft_entry_header_t **mft_entry_header,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_read_data(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_fixup_values_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *fixup_values_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_number_of_fixup_values(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *number_of_fixup_values,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_journal_sequence_number(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint64_t *journal_sequence_number,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_reference_count(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *reference_count,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_attributes_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint16_t *attributes_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_used_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint32_t *used_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_total_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint32_t *total_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_mft_entry_header_get_base_record_file_reference(\n     libfsntfs_mft_entry_header_t *mft_entry_header,\n     uint64_t *base_record_file_reference,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_ENTRY_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_metadata_file.c",
    "content": "/*\n * $MFT metadata file functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_entry.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_mft_metadata_file.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_volume_information_attribute.h\"\n#include \"libfsntfs_volume_name_attribute.h\"\n\n/* Creates a MFT metadata file\n * Make sure the value mft_metadata_file is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_initialize(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_initialize\";\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_metadata_file != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT metadata file value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = memory_allocate_structure(\n\t                              libfsntfs_internal_mft_metadata_file_t );\n\n\tif( internal_mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create MFT metadata file.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_mft_metadata_file,\n\t     0,\n\t     sizeof( libfsntfs_internal_mft_metadata_file_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear MFT metadata file.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_mft_metadata_file );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_io_handle_initialize(\n\t     &( internal_mft_metadata_file->io_handle ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_mft_metadata_file->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\t*mft_metadata_file = (libfsntfs_mft_metadata_file_t *) internal_mft_metadata_file;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_mft_metadata_file != NULL )\n\t{\n\t\tif( internal_mft_metadata_file->io_handle != NULL )\n\t\t{\n\t\t\tlibfsntfs_io_handle_free(\n\t\t\t &( internal_mft_metadata_file->io_handle ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t internal_mft_metadata_file );\n\t}\n\treturn( -1 );\n}\n\n/* Frees a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_free(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_free\";\n\tint result                                                         = 1;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *mft_metadata_file != NULL )\n\t{\n\t\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) *mft_metadata_file;\n\n\t\tif( internal_mft_metadata_file->file_io_handle != NULL )\n\t\t{\n\t\t\tif( libfsntfs_mft_metadata_file_close(\n\t\t\t     *mft_metadata_file,\n\t\t\t     error ) != 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t\t \"%s: unable to close MFT metadata file.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\t*mft_metadata_file = NULL;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( internal_mft_metadata_file->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\tif( libfsntfs_io_handle_free(\n\t\t     &( internal_mft_metadata_file->io_handle ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t internal_mft_metadata_file );\n\t}\n\treturn( result );\n}\n\n/* Signals the mft_metadata_file to abort its current activity\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_signal_abort(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_signal_abort\";\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( internal_mft_metadata_file->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT metadata file - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file->io_handle->abort = 1;\n\n\treturn( 1 );\n}\n\n/* Opens a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_open(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const char *filename,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle                                   = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_open\";\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libbfio_handle_set_track_offsets_read(\n\t     file_io_handle,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set track offsets read in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tif( libbfio_file_set_name(\n\t     file_io_handle,\n\t     filename,\n\t     narrow_string_length(\n\t      filename ) + 1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_metadata_file_open_file_io_handle(\n\t     mft_metadata_file,\n\t     file_io_handle,\n\t     access_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open MFT metadata file: %s.\",\n\t\t function,\n\t\t filename );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_mft_metadata_file->file_io_handle_created_in_library = 1;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_mft_metadata_file->file_io_handle_created_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Opens a MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_open_wide(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const wchar_t *filename,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle                                   = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_open_wide\";\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libbfio_handle_set_track_offsets_read(\n\t     file_io_handle,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set track offsets read in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tif( libbfio_file_set_name_wide(\n\t     file_io_handle,\n\t     filename,\n\t     wide_string_length(\n\t      filename ) + 1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_metadata_file_open_file_io_handle(\n\t     mft_metadata_file,\n\t     file_io_handle,\n\t     access_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open MFT metadata file: %ls.\",\n\t\t function,\n\t\t filename );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_mft_metadata_file->file_io_handle_created_in_library = 1;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_mft_metadata_file->file_io_handle_created_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#endif /* #if defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Opens a MFT metadata file using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_volume_open_file_io_handle\";\n\tint bfio_access_flags                                              = 0;\n\tint file_io_handle_is_open                                         = 0;\n\tuint8_t file_io_handle_opened_in_library                           = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( internal_mft_metadata_file->file_io_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT metadata file - file IO handle already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) != 0 )\n\t{\n\t\tbfio_access_flags = LIBBFIO_ACCESS_FLAG_READ;\n\t}\n\tfile_io_handle_is_open = libbfio_handle_is_open(\n\t                          file_io_handle,\n\t                          error );\n\n\tif( file_io_handle_is_open == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_open(\n\t\t     file_io_handle,\n\t\t     bfio_access_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open file IO handle.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfile_io_handle_opened_in_library = 1;\n\t}\n\tif( libfsntfs_internal_mft_metadata_file_open_read(\n\t     internal_mft_metadata_file,\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_mft_metadata_file->file_io_handle                   = file_io_handle;\n\tinternal_mft_metadata_file->file_io_handle_opened_in_library = file_io_handle_opened_in_library;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_mft_metadata_file->file_io_handle                   = NULL;\n\t\tinternal_mft_metadata_file->file_io_handle_opened_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle_opened_in_library != 0 )\n\t{\n\t\tlibbfio_handle_close(\n\t\t file_io_handle,\n\t\t error );\n\t}\n\treturn( -1 );\n}\n\n/* Closes a MFT metadata file\n * Returns 0 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_close(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_close\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( internal_mft_metadata_file->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT metadata file - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( internal_mft_metadata_file->file_io_handle_created_in_library != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_read_offsets(\n\t\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print the read offsets.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t}\n#endif\n\tif( internal_mft_metadata_file->file_io_handle_opened_in_library != 0 )\n\t{\n\t\tif( libbfio_handle_close(\n\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close file IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tinternal_mft_metadata_file->file_io_handle_opened_in_library = 0;\n\t}\n\tif( internal_mft_metadata_file->file_io_handle_created_in_library != 0 )\n\t{\n\t\tif( libbfio_handle_free(\n\t\t     &( internal_mft_metadata_file->file_io_handle ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tinternal_mft_metadata_file->file_io_handle_created_in_library = 0;\n\t}\n\tinternal_mft_metadata_file->file_io_handle = NULL;\n\n\tif( libfsntfs_io_handle_clear(\n\t     internal_mft_metadata_file->io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to clear IO handle.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\tif( internal_mft_metadata_file->file_system != NULL )\n\t{\n\t\tif( libfsntfs_file_system_free(\n\t\t     &( internal_mft_metadata_file->file_system ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file system.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_mft_metadata_file->volume_mft_entry != NULL )\n\t{\n\t\tif( libfsntfs_mft_entry_free(\n\t\t     &( internal_mft_metadata_file->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume MFT entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_mft_metadata_file->volume_information_attribute != NULL )\n\t{\n\t\tif( libfsntfs_internal_attribute_free(\n\t\t     (libfsntfs_internal_attribute_t **) &( internal_mft_metadata_file->volume_information_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_mft_metadata_file->volume_name_attribute != NULL )\n\t{\n\t\tif( libfsntfs_internal_attribute_free(\n\t\t     (libfsntfs_internal_attribute_t **) &( internal_mft_metadata_file->volume_name_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Opens a MFT metadata file for reading\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_mft_metadata_file_open_read(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_mft_metadata_file_open_read\";\n\n\tif( internal_mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_mft_metadata_file->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid MFT metadata file - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_mft_metadata_file->file_system != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid MFT metadata file - file system value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n/* TODO allow to set the values */\n/* TODO scan for signature to determine MFT entry size */\n\tinternal_mft_metadata_file->io_handle->bytes_per_sector   = 512;\n/* TODO if not set FILE signature try scan? */\n\tinternal_mft_metadata_file->io_handle->mft_entry_size     = 1024;\n/* TODO if not set INDX signature try scan? */\n\tinternal_mft_metadata_file->io_handle->index_entry_size   = 4096;\n\tinternal_mft_metadata_file->io_handle->cluster_block_size = 4096;\n\n\tif( libfsntfs_file_system_initialize(\n\t     &( internal_mft_metadata_file->file_system ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"Reading MFT entry: 0:\\n\" );\n\t}\n#endif\n\tif( libfsntfs_file_system_read_mft(\n\t     internal_mft_metadata_file->file_system,\n\t     internal_mft_metadata_file->io_handle,\n\t     file_io_handle,\n\t     0,\n\t     LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT (MFT entry: 0).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_mft_read_list_data_mft_entries(\n\t     internal_mft_metadata_file->file_system->mft,\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read list data MFT entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( internal_mft_metadata_file->file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t\t &( internal_mft_metadata_file->file_system ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the $VOLUME_INFORMATION attribute from MFT entry 3\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_mft_metadata_file_get_volume_information_attribute(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_internal_mft_metadata_file_get_volume_information_attribute\";\n\tint result                               = 0;\n\n\tif( internal_mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_mft_metadata_file->volume_mft_entry == NULL )\n\t{\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n\t\t     internal_mft_metadata_file->file_system,\n\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t     LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME,\n\t\t     &( internal_mft_metadata_file->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( internal_mft_metadata_file->volume_information_attribute == NULL )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_volume_information_attribute(\n\t\t          internal_mft_metadata_file->volume_mft_entry,\n\t\t          &mft_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( libfsntfs_attribute_initialize(\n\t\t     &( internal_mft_metadata_file->volume_information_attribute ),\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_internal_attribute_read_value(\n\t\t     (libfsntfs_internal_attribute_t *) internal_mft_metadata_file->volume_information_attribute,\n\t\t     internal_mft_metadata_file->io_handle,\n\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read value of $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_mft_metadata_file->volume_information_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the $VOLUME_NAME attribute from MFT entry 3\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_internal_mft_metadata_file_get_volume_name_attribute\";\n\tint result                               = 0;\n\n\tif( internal_mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_mft_metadata_file->volume_mft_entry == NULL )\n\t{\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n\t\t     internal_mft_metadata_file->file_system,\n\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t     LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME,\n\t\t     &( internal_mft_metadata_file->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( internal_mft_metadata_file->volume_name_attribute == NULL )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_volume_name_attribute(\n\t\t          internal_mft_metadata_file->volume_mft_entry,\n\t\t          &mft_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( libfsntfs_attribute_initialize(\n\t\t     &( internal_mft_metadata_file->volume_name_attribute ),\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_internal_attribute_read_value(\n\t\t     (libfsntfs_internal_attribute_t *) internal_mft_metadata_file->volume_name_attribute,\n\t\t     internal_mft_metadata_file->io_handle,\n\t\t     internal_mft_metadata_file->file_io_handle,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read value of $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_mft_metadata_file->volume_name_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute                       = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_utf8_volume_name_size\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t\t     volume_name_attribute,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_utf8_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute                       = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_utf8_volume_name\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf8_name(\n\t\t     volume_name_attribute,\n\t\t     utf8_string,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute                       = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_utf16_volume_name_size\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t\t     volume_name_attribute,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-16 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_utf16_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute                       = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_utf16_volume_name\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf16_name(\n\t\t     volume_name_attribute,\n\t\t     utf16_string,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the volume version\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_volume_version(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_information_attribute                = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_volume_version\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_information_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_information_attribute_get_version(\n\t\t     volume_information_attribute,\n\t\t     major_version,\n\t\t     minor_version,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve version from volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the volume flags\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_volume_flags(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_information_attribute                = NULL;\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_volume_flags\";\n\tint result                                                         = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_mft_metadata_file_get_volume_information_attribute(\n\t          internal_mft_metadata_file,\n\t          &volume_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_information_attribute_get_flags(\n\t\t     volume_information_attribute,\n\t\t     flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve flags from volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the number of file entries (MFT entries)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_number_of_file_entries(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t *number_of_file_entries,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_number_of_file_entries\";\n\tint result                                                         = 1;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_file_system_get_number_of_mft_entries(\n\t     internal_mft_metadata_file->file_system,\n\t     number_of_file_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of MFT entries.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file entry of a specific MFT entry index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_mft_metadata_file_get_file_entry_by_index(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file = NULL;\n\tstatic char *function                                              = \"libfsntfs_mft_metadata_file_get_file_entry_by_index\";\n\tint result                                                         = 1;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_mft_metadata_file = (libfsntfs_internal_mft_metadata_file_t *) mft_metadata_file;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_file_entry_initialize(\n\t     file_entry,\n\t     internal_mft_metadata_file->io_handle,\n\t     internal_mft_metadata_file->file_io_handle,\n\t     internal_mft_metadata_file->file_system,\n\t     mft_entry_index,\n\t     NULL,\n\t     LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file entry from MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_mft_metadata_file->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_mft_metadata_file.h",
    "content": "/*\n * $MFT metadata file functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_MFT_METADATA_FILE_H )\n#define _LIBFSNTFS_MFT_METADATA_FILE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_mft_metadata_file libfsntfs_internal_mft_metadata_file_t;\n\nstruct libfsntfs_internal_mft_metadata_file\n{\n\t/* The file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* Value to indicate if the file IO handle was created inside the library\n\t */\n\tuint8_t file_io_handle_created_in_library;\n\n\t/* Value to indicate if the file IO handle was opened inside the library\n\t */\n\tuint8_t file_io_handle_opened_in_library;\n\n\t/* The IO handle\n\t */\n\tlibfsntfs_io_handle_t *io_handle;\n\n\t/* The file system\n\t */\n\tlibfsntfs_file_system_t *file_system;\n\n\t/* The volume MFT entry\n\t */\n\tlibfsntfs_mft_entry_t *volume_mft_entry;\n\n\t/* The volume information ($VOLUME_INFORMATION) attribute\n\t */\n\tlibfsntfs_attribute_t *volume_information_attribute;\n\n\t/* The volume name ($VOLUME_NAME) attribute\n\t */\n\tlibfsntfs_attribute_t *volume_name_attribute;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_initialize(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_free(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_signal_abort(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const char *filename,\n     int access_flags,\n     libcerror_error_t **error );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_wide(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     const wchar_t *filename,\n     int access_flags,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_close(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_mft_metadata_file_open_read(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_mft_metadata_file_get_volume_information_attribute(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_mft_metadata_file_get_volume_name_attribute(\n     libfsntfs_internal_mft_metadata_file_t *internal_mft_metadata_file,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf8_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_utf16_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_volume_version(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_volume_flags(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint16_t *flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_number_of_file_entries(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t *number_of_file_entries,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_get_file_entry_by_index(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_MFT_METADATA_FILE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_name.c",
    "content": "/*\n * Name functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_WCTYPE_H )\n#include <wctype.h>\n#endif\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_name.h\"\n\n/* Compares an (other) UTF-16 encoded name with an UTF-16 encoded name\n * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_name_compare(\n     const uint8_t *name,\n     size_t name_size,\n     const uint8_t *other_name,\n     size_t other_name_size,\n     uint8_t use_case_folding,\n     libcerror_error_t **error )\n{\n\tstatic char *function                           = \"libfsntfs_name_compare\";\n\tlibuna_unicode_character_t name_character       = 0;\n\tlibuna_unicode_character_t other_name_character = 0;\n\tsize_t name_index                               = 0;\n\tsize_t other_name_index                         = 0;\n\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( other_name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded other name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( other_name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded other name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( other_name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded other name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Check if the UTF-16 streams are terminated with zero bytes\n\t */\n\tif( ( name_size >= 2 )\n\t && ( name[ name_size - 2 ] == 0 )\n\t && ( name[ name_size - 1 ] == 0 ) )\n\t{\n\t\tname_size -= 2;\n\t}\n\tif( ( other_name_size >= 2 )\n\t && ( other_name[ other_name_size - 2 ] == 0 )\n\t && ( other_name[ other_name_size - 1 ] == 0 ) )\n\t{\n\t\tother_name_size -= 2;\n\t}\n\twhile( ( name_index < name_size )\n\t    && ( other_name_index < other_name_size ) )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &name_character,\n\t\t     name,\n\t\t     name_size,\n\t\t     &name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &other_name_character,\n\t\t     other_name,\n\t\t     other_name_size,\n\t\t     &other_name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded other name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( use_case_folding != 0 )\n\t\t{\n\t\t\tname_character       = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\t\tother_name_character = (libuna_unicode_character_t) towupper( (wint_t) other_name_character );\n\t\t}\n\t\tif( other_name_character < name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_LESS );\n\t\t}\n\t\telse if( other_name_character > name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t}\n\t}\n\tif( other_name_index < other_name_size )\n\t{\n\t\treturn( LIBUNA_COMPARE_GREATER );\n\t}\n\telse if( name_index < name_size )\n\t{\n\t\treturn( LIBUNA_COMPARE_LESS );\n\t}\n\treturn( LIBUNA_COMPARE_EQUAL );\n}\n\n/* Compares an UTF-16 encoded short name with an UTF-16 encoded (long) name\n * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_name_compare_short(\n     const uint8_t *name,\n     size_t name_size,\n     const uint8_t *short_name,\n     size_t short_name_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function                           = \"libfsntfs_name_compare_short\";\n\tlibuna_unicode_character_t name_character       = 0;\n\tlibuna_unicode_character_t short_name_character = 0;\n\tsize_t last_match_name_index                    = 0;\n\tsize_t last_match_short_name_index              = 0;\n\tsize_t name_index                               = 0;\n\tsize_t short_name_index                         = 0;\n\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( short_name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded short name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( short_name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded short name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( short_name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded short name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Check if the UTF-16 streams are terminated with zero bytes\n\t */\n\tif( ( name_size >= 2 )\n\t && ( name[ name_size - 2 ] == 0 )\n\t && ( name[ name_size - 1 ] == 0 ) )\n\t{\n\t\tname_size -= 2;\n\t}\n\tif( ( short_name_size >= 2 )\n\t && ( short_name[ short_name_size - 2 ] == 0 )\n\t && ( short_name[ short_name_size - 1 ] == 0 ) )\n\t{\n\t\tshort_name_size -= 2;\n\t}\n\twhile( ( name_index < name_size )\n\t    && ( short_name_index < short_name_size ) )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &name_character,\n\t\t     name,\n\t\t     name_size,\n\t\t     &name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t/* Ignore:\n\t\t * control characters and space\n\t\t * '\"' '*' '+' ',' '.' '/' ':' ';' '<' '=' '>' '?' '\\'\n\t\t * non 7-bit ASCII characters\n\t\t */\n\t\tif( ( name_character <= 0x20 )\n\t\t || ( name_character == 0x22 )\n\t\t || ( ( name_character >= 0x2a )\n\t\t  &&  ( name_character <= 0x2c ) )\n\t\t || ( name_character == 0x2e )\n\t\t || ( name_character == 0x2f )\n\t\t || ( ( name_character >= 0x3a )\n\t\t  &&  ( name_character <= 0x3f ) )\n\t\t || ( name_character == 0x5c )\n\t\t || ( name_character >= 0x80 ) )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t/* The [ and ] characters are replaced by an underscore (_)\n\t\t */\n\t\tif( ( name_character == 0x5b )\n\t\t || ( name_character == 0x5d ) )\n\t\t{\n\t\t\tname_character = 0x5f;\n\t\t}\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &short_name_character,\n\t\t     short_name,\n\t\t     short_name_size,\n\t\t     &short_name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded short name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( short_name_character == 0x7e )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tname_character       = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\tshort_name_character = (libuna_unicode_character_t) towupper( (wint_t) short_name_character );\n\n\t\tif( last_match_short_name_index < 4 )\n\t\t{\n\t\t\tif( short_name_character < name_character )\n\t\t\t{\n\t\t\t\treturn( LIBUNA_COMPARE_LESS );\n\t\t\t}\n\t\t\telse if( short_name_character > name_character )\n\t\t\t{\n\t\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t\t}\n\t\t}\n\t\telse if( short_name_character != name_character )\n\t\t{\n/* TODO handle hex notation */\n\t\t\tbreak;\n\t\t}\n\t\tlast_match_name_index       = name_index;\n\t\tlast_match_short_name_index = short_name_index;\n\t}\n\twhile( ( short_name_index < short_name_size )\n\t    && ( short_name_character != 0x7e ) )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &short_name_character,\n\t\t     short_name,\n\t\t     short_name_size,\n\t\t     &short_name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded short name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( short_name_character != 0x7e )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid short name - missing tilde character\\n\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\twhile( short_name_index < short_name_size )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &short_name_character,\n\t\t     short_name,\n\t\t     short_name_size,\n\t\t     &short_name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded short name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( short_name_character == 0x2e )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\t/* The ~ suffix should only consist of the numeric characters 0 - 9\n\t\t */\n\t\tif( ( short_name_character < 0x30 )\n\t\t || ( short_name_character > 0x39 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: invalid short name - non-numeric character in tilde suffix.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( short_name_character == 0x2e )\n\t{\n\t\tname_index = name_size;\n\n\t\twhile( name_index >= 2 )\n\t\t{\n\t\t\tname_index -= 2;\n\n\t\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t\t     &name_character,\n\t\t\t     name,\n\t\t\t     name_size,\n\t\t\t     &name_index,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( name_character == 0x2e )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tname_index -= 2;\n\t\t}\n\t}\n\tif( name_character == 0x2e )\n\t{\n\t\twhile( ( name_index < name_size )\n\t\t    && ( short_name_index < short_name_size ) )\n\t\t{\n\t\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t\t     &name_character,\n\t\t\t     name,\n\t\t\t     name_size,\n\t\t\t     &name_index,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\t/* Ignore:\n\t\t\t * control characters and space\n\t\t\t * '\"' '*' '+' ',' '/' ':' ';' '<' '=' '>' '?' '\\'\n\t\t\t * non 7-bit ASCII characters\n\t\t\t */\n\t\t\tif( ( name_character <= 0x20 )\n\t\t\t || ( name_character == 0x22 )\n\t\t\t || ( ( name_character >= 0x2a )\n\t\t\t  &&  ( name_character <= 0x2c ) )\n\t\t\t || ( name_character == 0x2f )\n\t\t\t || ( ( name_character >= 0x3a )\n\t\t\t  &&  ( name_character <= 0x3f ) )\n\t\t\t || ( name_character == 0x5c )\n\t\t\t || ( name_character >= 0x80 ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t\t     &short_name_character,\n\t\t\t     short_name,\n\t\t\t     short_name_size,\n\t\t\t     &short_name_index,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 encoded short name to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tname_character       = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\t\tshort_name_character = (libuna_unicode_character_t) towupper( (wint_t) short_name_character );\n\n\t\t\tif( short_name_character != name_character )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif( short_name_index < short_name_size )\n\t{\n\t\tname_index       = last_match_name_index;\n\t\tshort_name_index = last_match_short_name_index;\n\n\t\t/* The name was shorter than the short name\n\t\t */\n\t\tif( name_index >= name_size )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t}\n\t\t/* Compare the remainder of the name and short name as a case-insenstive string\n\t\t */\n\t\twhile( ( name_index < name_size )\n\t\t    && ( short_name_index < short_name_size ) )\n\t\t{\n\t\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t\t     &name_character,\n\t\t\t     name,\n\t\t\t     name_size,\n\t\t\t     &name_index,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t\t     &short_name_character,\n\t\t\t     short_name,\n\t\t\t     short_name_size,\n\t\t\t     &short_name_index,\n\t\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 encoded short name to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tname_character       = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\t\tshort_name_character = (libuna_unicode_character_t) towupper( (wint_t) short_name_character );\n\n\t\t\tif( short_name_character < name_character )\n\t\t\t{\n\t\t\t\treturn( LIBUNA_COMPARE_LESS );\n\t\t\t}\n\t\t\telse if( short_name_character > name_character )\n\t\t\t{\n\t\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t\t}\n\t\t}\n\t}\n\treturn( LIBUNA_COMPARE_EQUAL );\n}\n\n/* Compares an UTF-8 string with an UTF-16 encoded name\n * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_name_compare_with_utf8_string(\n     const uint8_t *name,\n     size_t name_size,\n     const libuna_utf8_character_t *utf8_string,\n     size_t utf8_string_length,\n     uint8_t use_case_folding,\n     libcerror_error_t **error )\n{\n\tstatic char *function                       = \"libfsntfs_name_compare_with_utf8_string\";\n\tlibuna_unicode_character_t name_character   = 0;\n\tlibuna_unicode_character_t string_character = 0;\n\tsize_t name_index                           = 0;\n\tsize_t utf8_string_index                    = 0;\n\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string_length > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-8 string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Check if the UTF-16 stream is terminated with zero bytes\n\t */\n\tif( ( name_size >= 2 )\n\t && ( name[ name_size - 2 ] == 0 )\n\t && ( name[ name_size - 1 ] == 0 ) )\n\t{\n\t\tname_size -= 2;\n\t}\n\tif( ( utf8_string_length >= 1 )\n\t && ( utf8_string[ utf8_string_length - 1 ] == 0 ) )\n\t{\n\t\tutf8_string_length -= 1;\n\t}\n\twhile( ( name_index < name_size )\n\t    && ( utf8_string_index < utf8_string_length ) )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &name_character,\n\t\t     name,\n\t\t     name_size,\n\t\t     &name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t\t */\n\t\tif( libuna_unicode_character_copy_from_utf8_rfc2279(\n\t\t     &string_character,\n\t\t     utf8_string,\n\t\t     utf8_string_length,\n\t\t     &utf8_string_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-8 RFC 2279 string to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( use_case_folding != 0 )\n\t\t{\n\t\t\tname_character   = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\t\tstring_character = (libuna_unicode_character_t) towupper( (wint_t) string_character );\n\t\t}\n\t\tif( string_character < name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_LESS );\n\t\t}\n\t\telse if( string_character > name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t}\n\t}\n\tif( utf8_string_index < utf8_string_length )\n\t{\n\t\treturn( LIBUNA_COMPARE_GREATER );\n\t}\n\telse if( name_index < name_size )\n\t{\n\t\treturn( LIBUNA_COMPARE_LESS );\n\t}\n\treturn( LIBUNA_COMPARE_EQUAL );\n}\n\n/* Compares an UTF-16 string with an UTF-16 encoded name\n * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_name_compare_with_utf16_string(\n     const uint8_t *name,\n     size_t name_size,\n     const libuna_utf16_character_t *utf16_string,\n     size_t utf16_string_length,\n     uint8_t use_case_folding,\n     libcerror_error_t **error )\n{\n\tstatic char *function                       = \"libfsntfs_name_compare_with_utf16_string\";\n\tlibuna_unicode_character_t name_character   = 0;\n\tlibuna_unicode_character_t string_character = 0;\n\tsize_t name_index                           = 0;\n\tsize_t utf16_string_index                   = 0;\n\n\tif( name == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 encoded name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 encoded name size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( name_size == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,\n\t\t \"%s: missing UTF-16 encoded name value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_string_length > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Check if the UTF-16 stream is terminated with zero bytes\n\t */\n\tif( ( name_size >= 2 )\n\t && ( name[ name_size - 2 ] == 0 )\n\t && ( name[ name_size - 1 ] == 0 ) )\n\t{\n\t\tname_size -= 2;\n\t}\n\tif( ( utf16_string_length >= 1 )\n\t && ( utf16_string[ utf16_string_length - 1 ] == 0 ) )\n\t{\n\t\tutf16_string_length -= 1;\n\t}\n\twhile( ( name_index < name_size )\n\t    && ( utf16_string_index < utf16_string_length ) )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf16_stream(\n\t\t     &name_character,\n\t\t     name,\n\t\t     name_size,\n\t\t     &name_index,\n\t\t     LIBUNA_ENDIAN_LITTLE | LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UTF-16 encoded name to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t/* Using UCS-2 to support unpaired UTF-16 surrogates\n\t\t */\n\t\tif( libuna_unicode_character_copy_from_ucs2(\n\t\t     &string_character,\n\t\t     utf16_string,\n\t\t     utf16_string_length,\n\t\t     &utf16_string_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy UCS-2 string to Unicode character.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( use_case_folding != 0 )\n\t\t{\n\t\t\tname_character   = (libuna_unicode_character_t) towupper( (wint_t) name_character );\n\t\t\tstring_character = (libuna_unicode_character_t) towupper( (wint_t) string_character );\n\t\t}\n\t\tif( string_character < name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_LESS );\n\t\t}\n\t\telse if( string_character > name_character )\n\t\t{\n\t\t\treturn( LIBUNA_COMPARE_GREATER );\n\t\t}\n\t}\n\tif( utf16_string_index < utf16_string_length )\n\t{\n\t\treturn( LIBUNA_COMPARE_GREATER );\n\t}\n\telse if( name_index < name_size )\n\t{\n\t\treturn( LIBUNA_COMPARE_LESS );\n\t}\n\treturn( LIBUNA_COMPARE_EQUAL );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_name.h",
    "content": "/*\n * Name functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_NAME_H )\n#define _LIBFSNTFS_NAME_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libuna.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint libfsntfs_name_compare(\n     const uint8_t *name,\n     size_t name_size,\n     const uint8_t *other_name,\n     size_t other_name_size,\n     uint8_t use_case_folding,\n     libcerror_error_t **error );\n\nint libfsntfs_name_compare_short(\n     const uint8_t *name,\n     size_t name_size,\n     const uint8_t *short_name,\n     size_t short_name_size,\n     libcerror_error_t **error );\n\nint libfsntfs_name_compare_with_utf8_string(\n     const uint8_t *name,\n     size_t name_size,\n     const libuna_utf8_character_t *utf8_string,\n     size_t utf8_string_length,\n     uint8_t use_case_folding,\n     libcerror_error_t **error );\n\nint libfsntfs_name_compare_with_utf16_string(\n     const uint8_t *name,\n     size_t name_size,\n     const libuna_utf16_character_t *utf16_string,\n     size_t utf16_string_length,\n     uint8_t use_case_folding,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_NAME_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_notify.c",
    "content": "/*\n * Notification functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_notify.h\"\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\n/* Sets the verbose notification\n */\nvoid libfsntfs_notify_set_verbose(\n      int verbose )\n{\n\tlibcnotify_verbose_set(\n\t verbose );\n}\n\n/* Sets the notification stream\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_notify_set_stream(\n     FILE *stream,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_notify_set_stream\";\n\n\tif( libcnotify_stream_set(\n\t     stream,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Opens the notification stream using a filename\n * The stream is opened in append mode\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_notify_stream_open(\n     const char *filename,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_notify_stream_open\";\n\n\tif( libcnotify_stream_open(\n\t     filename,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Closes the notification stream if opened using a filename\n * Returns 0 if successful or -1 on error\n */\nint libfsntfs_notify_stream_close(\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_notify_stream_close\";\n\n\tif( libcnotify_stream_close(\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 0 );\n}\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_notify.h",
    "content": "/*\n * Notification functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_NOTIFY_H )\n#define _LIBFSNTFS_NOTIFY_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\nLIBFSNTFS_EXTERN \\\nvoid libfsntfs_notify_set_verbose(\n      int verbose );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_set_stream(\n     FILE *stream,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_stream_open(\n     const char *filename,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_notify_stream_close(\n     libcerror_error_t **error );\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_NOTIFY_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_object_identifier_attribute.c",
    "content": "/*\n * Object identifier attribute ($OBJECT_ID) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_object_identifier_attribute.h\"\n#include \"libfsntfs_object_identifier_values.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the droid file identifier\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_object_identifier_attribute_get_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute             = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tstatic char *function                                          = \"libfsntfs_object_identifier_attribute_get_droid_file_identifier\";\n\tuint32_t attribute_type                                        = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tobject_identifier_values = (libfsntfs_object_identifier_values_t *) internal_attribute->value;\n\n\tif( guid == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid GUID.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size < 16 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: size is too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( memory_copy(\n\t     guid,\n\t     object_identifier_values->droid_file_identifier,\n\t     16 ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy droid file identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the birth droid volume identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute             = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tstatic char *function                                          = \"libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier\";\n\tuint64_t attribute_data_size                                   = 0;\n\tuint32_t attribute_type                                        = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tobject_identifier_values = (libfsntfs_object_identifier_values_t *) internal_attribute->value;\n\n\tif( guid == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid GUID.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size < 16 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: size is too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 64 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( memory_copy(\n\t     guid,\n\t     object_identifier_values->birth_droid_volume_identifier,\n\t     16 ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy birth droid volume identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the birth droid file identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute             = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tstatic char *function                                          = \"libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier\";\n\tuint64_t attribute_data_size                                   = 0;\n\tuint32_t attribute_type                                        = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tobject_identifier_values = (libfsntfs_object_identifier_values_t *) internal_attribute->value;\n\n\tif( guid == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid GUID.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size < 16 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: size is too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 64 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( memory_copy(\n\t     guid,\n\t     object_identifier_values->birth_droid_file_identifier,\n\t     16 ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy birth droid file identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the birth droid domain identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute             = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tstatic char *function                                          = \"libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier\";\n\tuint64_t attribute_data_size                                   = 0;\n\tuint32_t attribute_type                                        = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tobject_identifier_values = (libfsntfs_object_identifier_values_t *) internal_attribute->value;\n\n\tif( guid == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid GUID.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size < 16 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: size is too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 64 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( memory_copy(\n\t     guid,\n\t     object_identifier_values->birth_droid_domain_identifier,\n\t     16 ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy birth droid domain identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_object_identifier_attribute.h",
    "content": "/*\n * Object identifier attribute ($OBJECT_IDENTIFIER) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H )\n#define _LIBFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *guid,\n     size_t size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_object_identifier_values.c",
    "content": "/*\n * Object identifier attribute ($OBJECT_ID) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <system_string.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfguid.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_object_identifier_values.h\"\n\n#include \"fsntfs_object_identifier.h\"\n\n/* Creates object identifier values\n * Make sure the value object_identifier_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_object_identifier_values_initialize(\n     libfsntfs_object_identifier_values_t **object_identifier_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_object_identifier_values_initialize\";\n\n\tif( object_identifier_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid object identifier values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *object_identifier_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid object identifier values values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*object_identifier_values = memory_allocate_structure(\n\t                             libfsntfs_object_identifier_values_t );\n\n\tif( *object_identifier_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create object identifier values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *object_identifier_values,\n\t     0,\n\t     sizeof( libfsntfs_object_identifier_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear object identifier values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *object_identifier_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *object_identifier_values );\n\n\t\t*object_identifier_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees object identifier values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_object_identifier_values_free(\n     libfsntfs_object_identifier_values_t **object_identifier_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_object_identifier_values_free\";\n\n\tif( object_identifier_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid object identifier values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *object_identifier_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *object_identifier_values );\n\n\t\t*object_identifier_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the object identifier values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_object_identifier_values_read_data(\n     libfsntfs_object_identifier_values_t *object_identifier_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_object_identifier_read_data\";\n\n\tif( object_identifier_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid object identifier values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: object identifier data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( ( data_size != 16 )\n\t && ( data_size != 64 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported object identifier data size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\tif( memory_copy(\n\t     object_identifier_values->droid_file_identifier,\n\t     ( (fsntfs_object_identifier_t *) data )->droid_file_identifier,\n\t     16 ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy droid file identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( libfsntfs_debug_print_guid_value(\n\t\t     function,\n\t\t     \"droid file identifier\\t\\t\\t\",\n\t\t     object_identifier_values->droid_file_identifier,\n\t\t     16,\n\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t     LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print GUID value.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n#endif\n\tif( data_size > 16 )\n\t{\n\t\tif( memory_copy(\n\t\t     object_identifier_values->birth_droid_volume_identifier,\n\t\t     ( (fsntfs_object_identifier_t *) data )->birth_droid_volume_identifier,\n\t\t     16 ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy birth droid volume identifier.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( memory_copy(\n\t\t     object_identifier_values->birth_droid_file_identifier,\n\t\t     ( (fsntfs_object_identifier_t *) data )->birth_droid_file_identifier,\n\t\t     16 ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy birth droid file identifier.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( memory_copy(\n\t\t     object_identifier_values->birth_droid_domain_identifier,\n\t\t     ( (fsntfs_object_identifier_t *) data )->birth_droid_domain_identifier,\n\t\t     16 ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy birth droid domain identifier.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_guid_value(\n\t\t\t     function,\n\t\t\t     \"birth droid volume identifier\\t\\t\",\n\t\t\t     object_identifier_values->birth_droid_volume_identifier,\n\t\t\t     16,\n\t\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t\t     LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print GUID value.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( libfsntfs_debug_print_guid_value(\n\t\t\t     function,\n\t\t\t     \"birth droid file identifier\\t\\t\",\n\t\t\t     object_identifier_values->birth_droid_file_identifier,\n\t\t\t     16,\n\t\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t\t     LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print GUID value.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( libfsntfs_debug_print_guid_value(\n\t\t\t     function,\n\t\t\t     \"birth droid domain identifier\\t\\t\",\n\t\t\t     object_identifier_values->birth_droid_domain_identifier,\n\t\t\t     16,\n\t\t\t     LIBFGUID_ENDIAN_LITTLE,\n\t\t\t     LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print GUID value.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t}\n#endif\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n}\n\n/* Reads the object identifier values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_object_identifier_values_read_from_mft_attribute(\n     libfsntfs_object_identifier_values_t *object_identifier_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_object_identifier_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( object_identifier_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid object identifier values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_object_identifier_values_read_data(\n\t     object_identifier_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read object identifier values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_object_identifier_values.h",
    "content": "/*\n * Object identifier attribute ($OBJECT_ID) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_OBJECT_IDENTIFIER_VALUES_H )\n#define _LIBFSNTFS_OBJECT_IDENTIFIER_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_object_identifier_values libfsntfs_object_identifier_values_t;\n\nstruct libfsntfs_object_identifier_values\n{\n\t/* Droid file identifier\n\t */\n\tuint8_t droid_file_identifier[ 16 ];\n\n\t/* Birth droid volume identifier\n\t */\n\tuint8_t birth_droid_volume_identifier[ 16 ];\n\n\t/* Birth droid file identifier\n\t */\n\tuint8_t birth_droid_file_identifier[ 16 ];\n\n\t/* Birth droid domain identifier\n\t */\n\tuint8_t birth_droid_domain_identifier[ 16 ];\n};\n\nint libfsntfs_object_identifier_values_initialize(\n     libfsntfs_object_identifier_values_t **object_identifier_values,\n     libcerror_error_t **error );\n\nint libfsntfs_object_identifier_values_free(\n     libfsntfs_object_identifier_values_t **object_identifier_values,\n     libcerror_error_t **error );\n\nint libfsntfs_object_identifier_values_read_data(\n     libfsntfs_object_identifier_values_t *object_identifier_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_object_identifier_values_read_from_mft_attribute(\n     libfsntfs_object_identifier_values_t *object_identifier_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_OBJECT_IDENTIFIER_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_path_hint.c",
    "content": "/*\n * Path hint functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_path_hint.h\"\n\n/* Creates a path hint\n * Make sure the value path_hint is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_initialize(\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_initialize\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *path_hint != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid path hint value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*path_hint = memory_allocate_structure(\n\t              libfsntfs_path_hint_t );\n\n\tif( *path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create path hint.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *path_hint,\n\t     0,\n\t     sizeof( libfsntfs_path_hint_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear path hint.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *path_hint != NULL )\n\t{\n\t\tmemory_free(\n\t\t *path_hint );\n\n\t\t*path_hint = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a path hint\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_free(\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_free\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *path_hint != NULL )\n\t{\n\t\tif( ( *path_hint )->path != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *path_hint )->path );\n\t\t}\n\t\tmemory_free(\n\t\t *path_hint );\n\n\t\t*path_hint = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Compares 2 path hints by file reference\n * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_path_hint_compare_by_file_reference(\n     libfsntfs_path_hint_t *first_path_hint,\n     libfsntfs_path_hint_t *second_path_hint,\n     libcerror_error_t **error )\n{\n\tstatic char *function           = \"libfsntfs_path_hint_compare_by_file_reference\";\n\tuint64_t first_mft_entry_index  = 0;\n\tuint64_t second_mft_entry_index = 0;\n\tuint16_t first_sequence_number  = 0;\n\tuint16_t second_sequence_number = 0;\n\n\tif( first_path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( second_path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid second path hint.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfirst_mft_entry_index  = first_path_hint->file_reference & 0xffffffffffffUL;\n\tsecond_mft_entry_index = second_path_hint->file_reference & 0xffffffffffffUL;\n\n\tif( first_mft_entry_index < second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_mft_entry_index > second_mft_entry_index )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\tfirst_sequence_number  = (uint16_t) ( first_path_hint->file_reference >> 48 );\n\tsecond_sequence_number = (uint16_t) ( second_path_hint->file_reference >> 48 );\n\n\tif( first_sequence_number < second_sequence_number )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_sequence_number > second_sequence_number )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\treturn( LIBCDATA_COMPARE_EQUAL );\n}\n\n/* Retrieves the size of the UTF-8 encoded path\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_get_utf8_path_size(\n     libfsntfs_path_hint_t *path_hint,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_get_utf8_path_size\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file path values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_size_from_utf8_stream(\n\t     path_hint->path,\n\t     path_hint->path_size,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded path\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_get_utf8_path(\n     libfsntfs_path_hint_t *path_hint,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_get_utf8_path\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file path values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf8_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     path_hint->path,\n\t     path_hint->path_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded path\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_get_utf16_path_size(\n     libfsntfs_path_hint_t *path_hint,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_get_utf16_path_size\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file path values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_size_from_utf8_stream(\n\t     path_hint->path,\n\t     path_hint->path_size,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded path\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_path_hint_get_utf16_path(\n     libfsntfs_path_hint_t *path_hint,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_path_hint_get_utf16_path\";\n\n\tif( path_hint == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file path values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf8_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     path_hint->path,\n\t     path_hint->path_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_path_hint.h",
    "content": "/*\n * Path hint functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_PATH_HINT_H )\n#define _LIBFSNTFS_PATH_HINT_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_path_hint libfsntfs_path_hint_t;\n\nstruct libfsntfs_path_hint\n{\n\t/* The file reference\n\t */\n\tuint64_t file_reference;\n\n\t/* The path\n\t */\n\tuint8_t *path;\n\n\t/* The path size\n\t */\n\tsize_t path_size;\n};\n\nint libfsntfs_path_hint_initialize(\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_free(\n     libfsntfs_path_hint_t **path_hint,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_compare_by_file_reference(\n     libfsntfs_path_hint_t *first_path_hint,\n     libfsntfs_path_hint_t *second_path_hint,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_get_utf8_path_size(\n     libfsntfs_path_hint_t *path_hint,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_get_utf8_path(\n     libfsntfs_path_hint_t *path_hint,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_get_utf16_path_size(\n     libfsntfs_path_hint_t *path_hint,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_path_hint_get_utf16_path(\n     libfsntfs_path_hint_t *path_hint,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_PATH_HINT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_profiler.c",
    "content": "/*\n * The profiler functions\n *\n * Copyright (C) 2018-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_SYS_TIME_H )\n#include <sys/time.h>\n#endif\n\n#include <time.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_profiler.h\"\n\n#if defined( HAVE_PROFILER )\n\n/* Creates a profiler\n * Make sure the value profiler is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_profiler_initialize(\n     libfsntfs_profiler_t **profiler,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_profiler_initialize\";\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *profiler != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid profiler value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*profiler = memory_allocate_structure(\n\t             libfsntfs_profiler_t );\n\n\tif( *profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create profiler.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *profiler,\n\t     0,\n\t     sizeof( libfsntfs_profiler_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear profiler.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *profiler );\n\n\t\t*profiler = NULL;\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *profiler != NULL )\n\t{\n\t\tmemory_free(\n\t\t *profiler );\n\n\t\t*profiler = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a profiler\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_profiler_free(\n     libfsntfs_profiler_t **profiler,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_profiler_free\";\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *profiler != NULL )\n\t{\n\t\tmemory_free(\n\t\t *profiler );\n\n\t\t*profiler = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Opens the profiler\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_profiler_open(\n     libfsntfs_profiler_t *profiler,\n     const char *filename,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_profiler_open\";\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( profiler->output_stream != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid profiler - output stream value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tprofiler->output_stream = file_stream_open(\n\t                           filename,\n\t                           \"w\" );\n\n\tif( profiler->output_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open profiler.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( fprintf(\n\t     profiler->output_stream,\n\t     \"timestamp,name,offset,size,duration\\n\" ) <= -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_WRITE_FAILED,\n\t\t \"%s: unable to write header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( profiler->output_stream != NULL )\n\t{\n\t\tfile_stream_close(\n\t\t profiler->output_stream );\n\n\t\tprofiler->output_stream = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Closes the profiler\n * Returns 0 if successful or -1 on error\n */\nint libfsntfs_profiler_close(\n     libfsntfs_profiler_t *profiler,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_profiler_close\";\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( profiler->output_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid profiler - missing output stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_stream_close(\n\t     profiler->output_stream ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t \"%s: unable to close profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tprofiler->output_stream = NULL;\n\n\treturn( 0 );\n}\n\n/* Starts timing\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_profiler_start_timing(\n     libfsntfs_profiler_t *profiler,\n     int64_t *start_timestamp,\n     libcerror_error_t **error )\n{\n\tstruct timespec start_time;\n\n\tstatic char *function = \"libfsntfs_profiler_start_timing\";\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( start_timestamp == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid start timestamp.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( clock_gettime(\n\t     CLOCK_REALTIME,\n\t     &start_time ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve start time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*start_timestamp = ( (int64_t) start_time.tv_sec * 1000000000 ) + start_time.tv_nsec;\n\n\treturn( 1 );\n}\n\n/* Stops timing\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_profiler_stop_timing(\n     libfsntfs_profiler_t *profiler,\n     int64_t start_timestamp,\n     const char *name,\n     off64_t offset,\n     size64_t size,\n     libcerror_error_t **error )\n{\n\tstruct timespec stop_time;\n\n\tstatic char *function = \"libfsntfs_profiler_start_timing\";\n\tint64_t sample_time   = 0;\n\n\tif( profiler == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid profiler.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( profiler->output_stream == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid profiler - missing output stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( clock_gettime(\n\t     CLOCK_REALTIME,\n\t     &stop_time ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve stop time.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsample_time  = ( (int64_t) stop_time.tv_sec * 1000000000 ) + stop_time.tv_nsec;\n\tsample_time -= start_timestamp;\n\n\tif( fprintf(\n\t     profiler->output_stream,\n\t     \"%\" PRIi64 \",%s,%\" PRIi64 \",%\" PRIu64 \",%\" PRIi64 \"\\n\",\n\t     start_timestamp,\n\t     name,\n\t     offset,\n\t     size,\n\t     sample_time ) <= -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_WRITE_FAILED,\n\t\t \"%s: unable to write sample.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n#endif /* defined( HAVE_PROFILER ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_profiler.h",
    "content": "/*\n * The profiler functions\n *\n * Copyright (C) 2018-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_PROFILER_H )\n#define _LIBFSNTFS_PROFILER_H\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_PROFILER )\n\ntypedef struct libfsntfs_profiler libfsntfs_profiler_t;\n\nstruct libfsntfs_profiler\n{\n\t/* The output stream\n\t */\n\tFILE *output_stream;\n};\n\nint libfsntfs_profiler_initialize(\n     libfsntfs_profiler_t **profiler,\n     libcerror_error_t **error );\n\nint libfsntfs_profiler_free(\n     libfsntfs_profiler_t **profiler,\n     libcerror_error_t **error );\n\nint libfsntfs_profiler_open(\n     libfsntfs_profiler_t *profiler,\n     const char *filename,\n     libcerror_error_t **error );\n\nint libfsntfs_profiler_close(\n     libfsntfs_profiler_t *profiler,\n     libcerror_error_t **error );\n\nint libfsntfs_profiler_start_timing(\n     libfsntfs_profiler_t *profiler,\n     int64_t *start_timestamp,\n     libcerror_error_t **error );\n\nint libfsntfs_profiler_stop_timing(\n     libfsntfs_profiler_t *profiler,\n     int64_t start_timestamp,\n     const char *name,\n     off64_t offset,\n     size64_t size,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_PROFILER ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_PROFILER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_reparse_point_attribute.c",
    "content": "/*\n * Reparse point attribute ($REPARSE_POINT) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_reparse_point_attribute.h\"\n#include \"libfsntfs_reparse_point_values.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the tag\n * The tag is a combination of the type and flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_tag(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *tag,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_tag\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_reparse_point_values_get_tag(\n\t     (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t     tag,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compression method.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the Windows Overlay Filter (WOF) compression_method\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_compression_method(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *compression_method,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_compression_method\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_compression_method(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          compression_method,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve compression method.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf8_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 substitute name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf8_substitute_name\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf8_string,\n\t          utf8_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 substitute name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf16_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 substitute name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf16_substitute_name\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf16_string,\n\t          utf16_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 substitute name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf8_print_name_size\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name_size(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf8_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 print name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf8_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf8_print_name\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf8_string,\n\t          utf8_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 print name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf16_print_name_size\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name_size(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf16_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 print name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_attribute_get_utf16_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_reparse_point_attribute_get_utf16_print_name\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t          (libfsntfs_reparse_point_values_t *) internal_attribute->value,\n\t          utf16_string,\n\t          utf16_string_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 print name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_reparse_point_attribute.h",
    "content": "/*\n * Reparse point attribute ($REPARSE_POINT) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_REPARSE_POINT_ATTRIBUTE_H )\n#define _LIBFSNTFS_REPARSE_POINT_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_tag(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *tag,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_compression_method(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *compression_method,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf8_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_reparse_point_attribute_get_utf16_print_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_REPARSE_POINT_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_reparse_point_values.c",
    "content": "/*\n * Reparse point attribute ($REPARSE_POINT) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_reparse_point_values.h\"\n\n#include \"fsntfs_reparse_point.h\"\n\n/* Creates reparse point values\n * Make sure the value reparse_point_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_values_initialize(\n     libfsntfs_reparse_point_values_t **reparse_point_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_initialize\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *reparse_point_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid reparse point values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*reparse_point_values = memory_allocate_structure(\n\t                         libfsntfs_reparse_point_values_t );\n\n\tif( *reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create reparse point values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *reparse_point_values,\n\t     0,\n\t     sizeof( libfsntfs_reparse_point_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear reparse point values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *reparse_point_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *reparse_point_values );\n\n\t\t*reparse_point_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees reparse point values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_values_free(\n     libfsntfs_reparse_point_values_t **reparse_point_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_free\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *reparse_point_values != NULL )\n\t{\n\t\tif( ( *reparse_point_values )->reparse_data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *reparse_point_values )->reparse_data );\n\t\t}\n\t\tmemory_free(\n\t\t *reparse_point_values );\n\n\t\t*reparse_point_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the reparse point values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_values_read_data(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function            = \"libfsntfs_reparse_point_values_read_data\";\n\tuint32_t flags                   = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tsystem_character_t *value_string = NULL;\n\tsize_t value_string_size         = 0;\n\tuint32_t value_32bit             = 0;\n\tint result                       = 0;\n#endif\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reparse point data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_reparse_point_t *) data )->tag,\n\t reparse_point_values->tag );\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_reparse_point_t *) data )->reparse_data_size,\n\t reparse_point_values->reparse_data_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: tag\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t reparse_point_values->tag );\n\t\tlibfsntfs_debug_print_reparse_point_tag(\n\t\t reparse_point_values->tag );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: reparse data size\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t reparse_point_values->reparse_data_size );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\tif( reparse_point_values->reparse_data_size > 0 )\n\t{\n\t\tif( ( sizeof( fsntfs_reparse_point_t ) > data_size )\n\t\t || ( (size_t) reparse_point_values->reparse_data_size > ( data_size - sizeof( fsntfs_reparse_point_t ) ) )\n\t\t || ( (size_t) reparse_point_values->reparse_data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid reparse data size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\treparse_point_values->reparse_data = (uint8_t *) memory_allocate(\n\t\t                                                  sizeof( uint8_t ) * reparse_point_values->reparse_data_size );\n\n\t\tif( reparse_point_values->reparse_data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create reparse data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( memory_copy(\n\t\t     reparse_point_values->reparse_data,\n\t\t     &( data[ sizeof( fsntfs_reparse_point_t ) ] ),\n\t\t     (size_t) reparse_point_values->reparse_data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy reparse data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( reparse_point_values->tag == 0x80000017 )\n\t{\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t &( reparse_point_values->reparse_data[ 12 ] ),\n\t\t reparse_point_values->compression_method );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( reparse_point_values->reparse_data[ 0 ] ),\n\t\t\t value_32bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: external version\\t\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t value_32bit );\n\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( reparse_point_values->reparse_data[ 4 ] ),\n\t\t\t value_32bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: external provider\\t\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t value_32bit );\n\n\t\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t\t &( reparse_point_values->reparse_data[ 8 ] ),\n\t\t\t value_32bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: internal version\\t\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t value_32bit );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: compression method\\t\\t: %\" PRIu32 \" (%s)\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->compression_method,\n\t\t\t libfsntfs_debug_print_compression_method(\n\t\t\t  reparse_point_values->compression_method ) );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n\telse if( ( reparse_point_values->tag == 0xa0000003 )\n\t      || ( reparse_point_values->tag == 0xa000000c ) )\n\t{\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mount_point_reparse_data_t *) reparse_point_values->reparse_data )->substitute_name_offset,\n\t\t reparse_point_values->substitute_name_offset );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mount_point_reparse_data_t *) reparse_point_values->reparse_data )->substitute_name_size,\n\t\t reparse_point_values->substitute_name_size );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mount_point_reparse_data_t *) reparse_point_values->reparse_data )->print_name_offset,\n\t\t reparse_point_values->print_name_offset );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_mount_point_reparse_data_t *) reparse_point_values->reparse_data )->print_name_size,\n\t\t reparse_point_values->print_name_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: substitute name offset\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->substitute_name_offset );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: substitute name size\\t\\t: %\" PRIu16 \"\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->substitute_name_size );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: print name offset\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->print_name_offset );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: print name size\\t\\t: %\" PRIu16 \"\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->print_name_size );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n\tif( reparse_point_values->tag == 0xa0000003 )\n\t{\n\t\treparse_point_values->substitute_name_offset += sizeof( fsntfs_mount_point_reparse_data_t );\n\t\treparse_point_values->print_name_offset      += sizeof( fsntfs_mount_point_reparse_data_t );\n\t}\n\telse if( reparse_point_values->tag == 0xa000000c )\n\t{\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_symbolic_link_reparse_data_t *) reparse_point_values->reparse_data )->flags,\n\t\t flags );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: flags\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t\t function,\n\t\t\t flags );\n\t\t}\n#endif\n\t\treparse_point_values->substitute_name_offset += sizeof( fsntfs_symbolic_link_reparse_data_t );\n\t\treparse_point_values->print_name_offset      += sizeof( fsntfs_symbolic_link_reparse_data_t );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( ( reparse_point_values->tag != 0x80000017 )\n\t\t && ( reparse_point_values->tag != 0xa0000003 )\n\t\t && ( reparse_point_values->tag != 0xa000000c ) )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: unusupported reparse point tag: 0x%08\" PRIx32 \"\\n\",\n\t\t\t function,\n\t\t\t reparse_point_values->tag );\n\t\t}\n\t}\n#endif\n\tif( reparse_point_values->substitute_name_size > 0 )\n\t{\n\t\tif( reparse_point_values->substitute_name_offset >= reparse_point_values->reparse_data_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid substitute name offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( reparse_point_values->substitute_name_size > ( reparse_point_values->reparse_data_size - reparse_point_values->substitute_name_offset ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid substitute name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_utf16_string_size_from_utf16_stream(\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->substitute_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          &value_string_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_utf8_string_size_from_utf16_stream(\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->substitute_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          &value_string_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine size of substitute name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t                value_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create substitute name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_utf16_string_copy_from_utf16_stream(\n\t\t\t          (libuna_utf16_character_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->substitute_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_utf8_string_copy_from_utf16_stream(\n\t\t\t          (libuna_utf8_character_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->substitute_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to set substitute name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: substitute name\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t function,\n\t\t\t value_string );\n\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n\tif( reparse_point_values->print_name_size > 0 )\n\t{\n\t\tif( reparse_point_values->print_name_offset >= reparse_point_values->reparse_data_size )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid print name offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( reparse_point_values->print_name_size > ( reparse_point_values->reparse_data_size - reparse_point_values->print_name_offset ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid print name size value out of bounds.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_utf16_string_size_from_utf16_stream(\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->print_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          &value_string_size,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_utf8_string_size_from_utf16_stream(\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->print_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          &value_string_size,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine size of print name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tvalue_string = system_string_allocate(\n\t\t\t                value_string_size );\n\n\t\t\tif( value_string == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t\t \"%s: unable to create print name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\t\tresult = libuna_utf16_string_copy_from_utf16_stream(\n\t\t\t          (libuna_utf16_character_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->print_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          error );\n#else\n\t\t\tresult = libuna_utf8_string_copy_from_utf16_stream(\n\t\t\t          (libuna_utf8_character_t *) value_string,\n\t\t\t          value_string_size,\n\t\t\t          &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t\t\t          (size_t) reparse_point_values->print_name_size,\n\t\t\t          LIBUNA_ENDIAN_LITTLE,\n\t\t\t          error );\n#endif\n\t\t\tif( result != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to set print name string.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: print name\\t\\t\\t: %\" PRIs_SYSTEM \"\\n\",\n\t\t\t function,\n\t\t\t value_string );\n\n\t\t\tmemory_free(\n\t\t\t value_string );\n\n\t\t\tvalue_string = NULL;\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( value_string != NULL )\n\t{\n\t\tmemory_free(\n\t\t value_string );\n\t}\n#endif\n\tif( reparse_point_values->reparse_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t reparse_point_values->reparse_data );\n\n\t\treparse_point_values->reparse_data = NULL;\n\t}\n\treparse_point_values->reparse_data_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the reparse point values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_values_read_from_mft_attribute(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_reparse_point_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_reparse_point_values_read_data(\n\t     reparse_point_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the tag\n * The tag is a combination of the type and flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_reparse_point_values_get_tag(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint32_t *tag,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_tag\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( tag == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid tag.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*tag = reparse_point_values->tag;\n\n\treturn( 1 );\n}\n\n/* Retrieves the Windows Overlay Filter (WOF) compression method\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_compression_method(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint32_t *compression_method,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_compression_method\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( compression_method == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid compression method.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->tag == 0x80000017 )\n\t{\n\t\t*compression_method = reparse_point_values->compression_method;\n\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n}\n\n/* Retrieves the size of the UTF-8 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf8_substitute_name_size\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->substitute_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf8_string_size_from_utf16_stream(\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t     (size_t) reparse_point_values->substitute_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf8_substitute_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf8_substitute_name\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->substitute_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t     (size_t) reparse_point_values->substitute_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded substitute name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf16_substitute_name_size\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->substitute_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf16_string_size_from_utf16_stream(\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t     (size_t) reparse_point_values->substitute_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded substitute name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf16_substitute_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf16_substitute_name\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->substitute_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->substitute_name_offset ] ),\n\t     (size_t) reparse_point_values->substitute_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf8_print_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf8_print_name_size\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->print_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf8_string_size_from_utf16_stream(\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t     (size_t) reparse_point_values->print_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf8_print_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf8_print_name\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->print_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t     utf8_string,\n\t     utf8_string_size,\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t     (size_t) reparse_point_values->print_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded print name\n * The returned size includes the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf16_print_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf16_print_name_size\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->print_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf16_string_size_from_utf16_stream(\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t     (size_t) reparse_point_values->print_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded print name\n * The size should include the end of string character\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_reparse_point_values_get_utf16_print_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_reparse_point_values_get_utf16_print_name\";\n\n\tif( reparse_point_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid reparse point values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( reparse_point_values->print_name_size == 0 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t     utf16_string,\n\t     utf16_string_size,\n\t     &( reparse_point_values->reparse_data[ reparse_point_values->print_name_offset ] ),\n\t     (size_t) reparse_point_values->print_name_size,\n\t     LIBUNA_ENDIAN_LITTLE,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_reparse_point_values.h",
    "content": "/*\n * Reparse point attribute ($REPARSE_POINT) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_REPARSE_POINT_VALUES_H )\n#define _LIBFSNTFS_REPARSE_POINT_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_reparse_point_values libfsntfs_reparse_point_values_t;\n\nstruct libfsntfs_reparse_point_values\n{\n\t/* The tag\n\t */\n\tuint32_t tag;\n\n\t/* The compression method\n\t */\n\tuint32_t compression_method;\n\n\t/* The substitute name offset\n\t */\n\tuint16_t substitute_name_offset;\n\n\t/* The substitute name size\n\t */\n\tuint16_t substitute_name_size;\n\n\t/* The print name offset\n\t */\n\tuint16_t print_name_offset;\n\n\t/* The print name size\n\t */\n\tuint16_t print_name_size;\n\n\t/* The reparse data\n\t */\n\tuint8_t *reparse_data;\n\n\t/* The reparse data size\n\t */\n\tsize_t reparse_data_size;\n};\n\nint libfsntfs_reparse_point_values_initialize(\n     libfsntfs_reparse_point_values_t **reparse_point_values,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_free(\n     libfsntfs_reparse_point_values_t **reparse_point_values,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_read_data(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_read_from_mft_attribute(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_tag(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint32_t *tag,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_compression_method(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint32_t *compression_method,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf8_substitute_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf16_substitute_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf8_print_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf8_print_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf16_print_name_size(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_reparse_point_values_get_utf16_print_name(\n     libfsntfs_reparse_point_values_t *reparse_point_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_REPARSE_POINT_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_sds_index_value.c",
    "content": "/*\n * $SDS index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_sds_index_value.h\"\n\n#include \"fsntfs_secure.h\"\n\n/* Creates $SDS index value\n * Make sure the value sds_index_value is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_sds_index_value_initialize(\n     libfsntfs_sds_index_value_t **sds_index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_sds_index_value_initialize\";\n\n\tif( sds_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid $SDS index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sds_index_value != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid $SDS index value value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*sds_index_value = memory_allocate_structure(\n\t                     libfsntfs_sds_index_value_t );\n\n\tif( *sds_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create $SDS index value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *sds_index_value,\n\t     0,\n\t     sizeof( libfsntfs_sds_index_value_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear $SDS index value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *sds_index_value != NULL )\n\t{\n\t\tmemory_free(\n\t\t *sds_index_value );\n\n\t\t*sds_index_value = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees $SDS index value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_sds_index_value_free(\n     libfsntfs_sds_index_value_t **sds_index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_sds_index_value_free\";\n\n\tif( sds_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid $SDS index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *sds_index_value != NULL )\n\t{\n\t\tmemory_free(\n\t\t *sds_index_value );\n\n\t\t*sds_index_value = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the $SDS index value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_sds_index_value_read_data(\n     libfsntfs_sds_index_value_t *sds_index_value,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_sds_index_value_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit  = 0;\n\tuint32_t value_32bit  = 0;\n#endif\n\n\tif( sds_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid $SDS index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: $SDS index value:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( data_size != sizeof( fsntfs_secure_index_value_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported $SDS index value size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_secure_index_value_t *) data )->hash,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: hash\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_secure_index_value_t *) data )->identifier,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: identifier\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_secure_index_value_t *) data )->data_offset,\n\t\t value_64bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: data offset\\t\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t value_64bit );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_secure_index_value_t *) data )->data_size,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: data size\\t\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_sds_index_value.h",
    "content": "/*\n * $SDS index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SDS_INDEX_VALUE_H )\n#define _LIBFSNTFS_SDS_INDEX_VALUE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_sds_index_value libfsntfs_sds_index_value_t;\n\nstruct libfsntfs_sds_index_value\n{\n\t/* Dummy\n\t */\n\tint dummy;\n};\n\nint libfsntfs_sds_index_value_initialize(\n     libfsntfs_sds_index_value_t **sds_index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_sds_index_value_free(\n     libfsntfs_sds_index_value_t **sds_index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_sds_index_value_read_data(\n     libfsntfs_sds_index_value_t *sds_index_value,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SDS_INDEX_VALUE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_attribute.c",
    "content": "/*\n * Security descriptor attribute ($SECURITY_DESCRIPTOR) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_security_descriptor_attribute.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the security descriptor (data) size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_security_descriptor_attribute_get_security_descriptor_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_security_descriptor_attribute_get_security_descriptor_size\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_security_descriptor_values_get_data_size(\n\t          (libfsntfs_security_descriptor_values_t *) internal_attribute->value,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data size from security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the security descriptor (data)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_security_descriptor_attribute_get_security_descriptor(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_security_descriptor_attribute_get_security_descriptor\";\n\tuint32_t attribute_type                            = 0;\n\tint result                                         = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          (libfsntfs_security_descriptor_values_t *) internal_attribute->value,\n\t          data,\n\t          data_size,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_attribute.h",
    "content": "/*\n * Security descriptor attribute ($SECURITY_DESCRIPTOR) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H )\n#define _LIBFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_security_descriptor_attribute_get_security_descriptor_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *data_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_security_descriptor_attribute_get_security_descriptor(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_index.c",
    "content": "/*\n * Security descriptor index functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_data_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_index.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_index_value.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_security_descriptor_index.h\"\n#include \"libfsntfs_security_descriptor_index_value.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n#include \"libfsntfs_sds_index_value.h\"\n#include \"libfsntfs_types.h\"\n\n#include \"fsntfs_secure.h\"\n\n/* Creates a security descriptor index\n * Make sure the value security_descriptor_index is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_initialize(\n     libfsntfs_security_descriptor_index_t **security_descriptor_index,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_initialize\";\n\n\tif( security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_index != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid $SDS data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*security_descriptor_index = memory_allocate_structure(\n\t                              libfsntfs_security_descriptor_index_t );\n\n\tif( *security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create security descriptor index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *security_descriptor_index,\n\t     0,\n\t     sizeof( libfsntfs_security_descriptor_index_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear security descriptor index.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t *security_descriptor_index );\n\n\t\t*security_descriptor_index = NULL;\n\n\t\treturn( -1 );\n\t}\n/* TODO move out of index ? */\n\tif( libfsntfs_data_stream_initialize(\n\t     &( ( *security_descriptor_index )->data_stream ),\n\t     io_handle,\n\t     file_io_handle,\n\t     data_attribute,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create $SDS data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *security_descriptor_index != NULL )\n\t{\n\t\tmemory_free(\n\t\t *security_descriptor_index );\n\n\t\t*security_descriptor_index = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a security descriptor index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_free(\n     libfsntfs_security_descriptor_index_t **security_descriptor_index,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_free\";\n\tint result            = 1;\n\n\tif( security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_index != NULL )\n\t{\n\t\tif( ( *security_descriptor_index )->sii_index != NULL )\n\t\t{\n\t\t\tif( libfsntfs_index_free(\n\t\t\t     &( ( *security_descriptor_index )->sii_index ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free $SII index.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\tif( libfsntfs_data_stream_free(\n\t\t     &( ( *security_descriptor_index )->data_stream ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free $SDS data stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t *security_descriptor_index );\n\n\t\t*security_descriptor_index = NULL;\n\t}\n\treturn( result );\n}\n\n/* Reads the security descriptor identifier ($SII) index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_read_sii_index(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"libfsntfs_security_descriptor_index_read_sii_index\";\n\tuint32_t attribute_type = 0;\n\tuint32_t collation_type = 0;\n\tint result              = 0;\n\n\tif( security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_index->sii_index != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor index - $SII index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_initialize(\n\t     &( security_descriptor_index->sii_index ),\n\t     io_handle,\n\t     (uint8_t *) \"$SII\",\n\t     5,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create $SII index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_index_read(\n\t          security_descriptor_index->sii_index,\n\t          file_io_handle,\n\t          mft_entry,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read $SII index.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_index_get_attribute_type(\n\t\t     security_descriptor_index->sii_index,\n\t\t     &attribute_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve attribute type from index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( attribute_type != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported index attribute type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_index_get_collation_type(\n\t\t     security_descriptor_index->sii_index,\n\t\t     &collation_type,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve collation type from index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( collation_type != 16 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported index collation type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( security_descriptor_index->sii_index != NULL )\n\t{\n\t\tlibfsntfs_index_free(\n\t\t &( security_descriptor_index->sii_index ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the security descriptor from an index node for a specific identifier\n * This function creates new security descriptor values\n * Returns 1 if successful, 0 if no such security descriptor or -1 on error\n */\nint libfsntfs_security_descriptor_index_get_entry_from_index_node_by_identifier(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     int recursion_depth,\n     libcerror_error_t **error )\n{\n\tuint8_t secure_index_value_data[ sizeof( fsntfs_secure_index_value_t ) ];\n\n\tlibfsntfs_index_node_t *sub_node                                             = NULL;\n\tlibfsntfs_index_value_t *index_value                                         = NULL;\n\tlibfsntfs_sds_index_value_t *sds_index_value                                 = NULL;\n\tlibfsntfs_security_descriptor_index_value_t *security_descriptor_index_value = NULL;\n\tlibfsntfs_security_descriptor_values_t *safe_security_descriptor_values      = NULL;\n\tstatic char *function                                                        = \"libfsntfs_security_descriptor_index_get_entry_from_index_node_by_identifier\";\n\tsize_t security_descriptor_data_size                                         = 0;\n\tssize_t read_count                                                           = 0;\n\toff64_t index_entry_offset                                                   = 0;\n\tint compare_result                                                           = 0;\n\tint index_value_entry                                                        = 0;\n\tint is_allocated                                                             = 0;\n\tint number_of_index_values                                                   = 0;\n\tint result                                                                   = 0;\n\n\tif( security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_index->sii_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index - missing $SII index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_index->sii_index->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index - invalid $SII index - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( recursion_depth < 0 )\n\t || ( recursion_depth > LIBFSNTFS_MAXIMUM_RECURSION_DEPTH ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid recursion depth value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_index_node_get_number_of_values(\n\t     index_node,\n\t     &number_of_index_values,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of values from index node.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( index_value_entry = 0;\n\t     index_value_entry < number_of_index_values;\n\t     index_value_entry++ )\n\t{\n\t\tif( libfsntfs_index_node_get_value_by_index(\n\t\t     index_node,\n\t\t     index_value_entry,\n\t\t     &index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve value: %d from index node.\",\n\t\t\t function,\n\t\t\t index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t{\n\t\t\tif( index_value->sub_node_vcn > (uint64_t) INT_MAX )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: node index value: %d sub node VCN value out of bounds.\",\n\t\t\t\t function,\n\t\t\t\t index_value_entry );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tis_allocated = libfsntfs_index_sub_node_is_allocated(\n\t\t\t                security_descriptor_index->sii_index,\n\t\t\t                (int) index_value->sub_node_vcn,\n\t\t\t                error );\n\n\t\t\tif( is_allocated == -1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to determine if sub node with VCN: %d is allocated.\",\n\t\t\t\t function,\n\t\t\t\t (int) index_value->sub_node_vcn );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\telse if( is_allocated == 0 )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_index_value_initialize(\n\t\t     &security_descriptor_index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create security descriptor index value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_index_value_read_data(\n\t\t     security_descriptor_index_value,\n\t\t     index_value->value_data,\n\t\t     (size_t) index_value->value_data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor index value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( security_descriptor_identifier < security_descriptor_index_value->identifier )\n\t\t{\n\t\t\tcompare_result = LIBCDATA_COMPARE_LESS;\n\t\t}\n\t\telse if( security_descriptor_identifier > security_descriptor_index_value->identifier )\n\t\t{\n\t\t\tcompare_result = LIBCDATA_COMPARE_GREATER;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcompare_result = LIBCDATA_COMPARE_EQUAL;\n\t\t}\n\t\tif( compare_result != LIBCDATA_COMPARE_EQUAL )\n\t\t{\n\t\t\tif( libfsntfs_security_descriptor_index_value_free(\n\t\t\t     &security_descriptor_index_value,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free security descriptor index value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( compare_result == LIBCDATA_COMPARE_LESS )\n\t\t{\n\t\t\tif( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if( compare_result == LIBCDATA_COMPARE_EQUAL )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\tif( compare_result == LIBCDATA_COMPARE_EQUAL )\n\t{\n\t\tif( security_descriptor_index_value->data_size < (size64_t) ( sizeof( fsntfs_secure_index_value_t ) + 20 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported security descriptor stream ($SDS) data size: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t security_descriptor_index_value->data_size );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t\t              security_descriptor_index->data_stream,\n\t\t              secure_index_value_data,\n\t\t              sizeof( fsntfs_secure_index_value_t ),\n\t\t              (off64_t) security_descriptor_index_value->data_offset,\n\t\t              error );\n\n\t\tif( read_count < 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor stream ($SDS) data at offset: 0x%08\" PRIx64 \".\",\n\t\t\t function,\n\t\t\t security_descriptor_index_value->data_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_sds_index_value_initialize(\n\t\t     &sds_index_value,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create $SDS index value.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_sds_index_value_read_data(\n\t\t     sds_index_value,\n\t\t     secure_index_value_data,\n\t\t     sizeof( fsntfs_secure_index_value_t ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read $SDS index value data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n/* TODO check index values against secure_index_value */\n\n\t\tif( libfsntfs_security_descriptor_values_initialize(\n\t\t     &safe_security_descriptor_values,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create security descriptor values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsecurity_descriptor_data_size = (size_t) ( security_descriptor_index_value->data_size - sizeof( fsntfs_secure_index_value_t ) );\n\n\t\tif( ( security_descriptor_data_size == 0 )\n\t\t || ( security_descriptor_data_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid security descriptor values data value out of bounds.\",\n\t\t\t function,\n\t\t\t index_value_entry );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_security_descriptor_values->data = memory_allocate(\n\t\t                                         sizeof( uint8_t ) * security_descriptor_data_size );\n\n\t\tif( safe_security_descriptor_values->data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create security descriptor values data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_security_descriptor_values->data_size = security_descriptor_data_size;\n\n\t\tif( memory_set(\n\t\t     safe_security_descriptor_values->data,\n\t\t     0,\n\t\t     sizeof( uint8_t ) * safe_security_descriptor_values->data_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t \"%s: unable to clear security descriptor data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tread_count = libfsntfs_data_stream_read_buffer(\n\t\t              security_descriptor_index->data_stream,\n\t\t              safe_security_descriptor_values->data,\n\t\t              safe_security_descriptor_values->data_size,\n\t\t              error );\n\n\t\tif( read_count < 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor data at offset: 0x%08\" PRIx64 \".\",\n\t\t\t function,\n\t\t\t security_descriptor_index_value->data_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_values_read_data(\n\t\t     safe_security_descriptor_values,\n\t\t     safe_security_descriptor_values->data,\n\t\t     safe_security_descriptor_values->data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\t*security_descriptor_values = safe_security_descriptor_values;\n\n\t\tresult = 1;\n\t}\n\telse if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 )\n\t{\n\t\tindex_entry_offset = (off64_t) ( index_value->sub_node_vcn * security_descriptor_index->sii_index->io_handle->cluster_block_size );\n\n\t\tif( libfsntfs_index_get_sub_node(\n\t\t     security_descriptor_index->sii_index,\n\t\t     file_io_handle,\n\t\t     security_descriptor_index->sii_index->index_node_cache,\n\t\t     index_entry_offset,\n\t\t     (int) index_value->sub_node_vcn,\n\t\t     &sub_node,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve sub node with VCN: %d at offset: 0x%08\" PRIx64 \".\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tresult = libfsntfs_security_descriptor_index_get_entry_from_index_node_by_identifier(\n\t\t          security_descriptor_index,\n\t\t          file_io_handle,\n\t\t          security_descriptor_index->sii_index->root_node,\n\t\t          security_descriptor_identifier,\n\t\t          security_descriptor_values,\n\t\t          recursion_depth + 1,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to retrieve security descriptor by identifier from index entry with VCN: %d at offset: 0x%08\" PRIx64 \".\",\n\t\t\t function,\n\t\t\t (int) index_value->sub_node_vcn,\n\t\t\t index_entry_offset );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &safe_security_descriptor_values,\n\t\t NULL );\n\t}\n\tif( security_descriptor_index_value != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t &security_descriptor_index_value,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the security descriptor for a specific identifier\n * This function creates new security descriptor values\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_security_descriptor_index_get_entry_by_identifier(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libbfio_handle_t *file_io_handle,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_get_entry_by_identifier\";\n\tint result            = 0;\n\n\tif( security_descriptor_index == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_security_descriptor_index_get_entry_from_index_node_by_identifier(\n\t          security_descriptor_index,\n\t          file_io_handle,\n\t          security_descriptor_index->sii_index->root_node,\n\t          security_descriptor_identifier,\n\t          security_descriptor_values,\n\t          0,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve security descriptor by identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_index.h",
    "content": "/*\n * Security descriptor index functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_H )\n#define _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_data_stream.h\"\n#include \"libfsntfs_index.h\"\n#include \"libfsntfs_index_node.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_security_descriptor_index libfsntfs_security_descriptor_index_t;\n\nstruct libfsntfs_security_descriptor_index\n{\n\t/* The $SII index\n\t */\n\tlibfsntfs_index_t *sii_index;\n\n\t/* The $SDS data stream\n\t */\n\tlibfsntfs_data_stream_t *data_stream;\n};\n\nint libfsntfs_security_descriptor_index_initialize(\n     libfsntfs_security_descriptor_index_t **security_descriptor_index,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_free(\n     libfsntfs_security_descriptor_index_t **security_descriptor_index,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_read_sii_index(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_mft_entry_t *mft_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_get_entry_from_index_node_by_identifier(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_index_node_t *index_node,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     int recursion_depth,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_get_entry_by_identifier(\n     libfsntfs_security_descriptor_index_t *security_descriptor_index,\n     libbfio_handle_t *file_io_handle,\n     uint32_t security_descriptor_identifier,\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_index_value.c",
    "content": "/*\n * Security descriptor index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_libcdata.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_security_descriptor_index_value.h\"\n\n#include \"fsntfs_secure.h\"\n\n/* Creates security descriptor index value\n * Make sure the value security_descriptor_index_value is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_value_initialize(\n     libfsntfs_security_descriptor_index_value_t **security_descriptor_index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_value_initialize\";\n\n\tif( security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_index_value != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor index value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*security_descriptor_index_value = memory_allocate_structure(\n\t                                    libfsntfs_security_descriptor_index_value_t );\n\n\tif( *security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create security descriptor index value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *security_descriptor_index_value,\n\t     0,\n\t     sizeof( libfsntfs_security_descriptor_index_value_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear security descriptor index value.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *security_descriptor_index_value != NULL )\n\t{\n\t\tmemory_free(\n\t\t *security_descriptor_index_value );\n\n\t\t*security_descriptor_index_value = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees security descriptor index value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_value_free(\n     libfsntfs_security_descriptor_index_value_t **security_descriptor_index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_value_free\";\n\n\tif( security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_index_value != NULL )\n\t{\n\t\tmemory_free(\n\t\t *security_descriptor_index_value );\n\n\t\t*security_descriptor_index_value = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Compares 2 security descriptor index value by the identifier\n * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_value_compare(\n     libfsntfs_security_descriptor_index_value_t *first_security_descriptor_index_value,\n     libfsntfs_security_descriptor_index_value_t *second_security_descriptor_index_value,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_value_compare\";\n\n\tif( first_security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid first security descriptor index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( second_security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid second security descriptor index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( first_security_descriptor_index_value->identifier < second_security_descriptor_index_value->identifier )\n\t{\n\t\treturn( LIBCDATA_COMPARE_LESS );\n\t}\n\telse if( first_security_descriptor_index_value->identifier > second_security_descriptor_index_value->identifier )\n\t{\n\t\treturn( LIBCDATA_COMPARE_GREATER );\n\t}\n\treturn( LIBCDATA_COMPARE_EQUAL );\n}\n\n/* Reads the security descriptor index value\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_index_value_read_data(\n     libfsntfs_security_descriptor_index_value_t *security_descriptor_index_value,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_index_value_read_data\";\n\n\tif( security_descriptor_index_value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor index value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: security descriptor index value data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t}\n#endif\n\tif( data_size != sizeof( fsntfs_secure_index_value_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported security descriptor index value data size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_secure_index_value_t *) data )->hash,\n\t security_descriptor_index_value->hash );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_secure_index_value_t *) data )->identifier,\n\t security_descriptor_index_value->identifier );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_secure_index_value_t *) data )->data_offset,\n\t security_descriptor_index_value->data_offset );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_secure_index_value_t *) data )->data_size,\n\t security_descriptor_index_value->data_size );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: hash\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t security_descriptor_index_value->hash );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: identifier\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t security_descriptor_index_value->identifier );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data offset\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t security_descriptor_index_value->data_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data size\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t security_descriptor_index_value->data_size );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_index_value.h",
    "content": "/*\n * Security descriptor index value functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_VALUE_H )\n#define _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_VALUE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_security_descriptor_index_value libfsntfs_security_descriptor_index_value_t;\n\nstruct libfsntfs_security_descriptor_index_value\n{\n\t/* The hash\n\t */\n\tuint32_t hash;\n\n\t/* The identifier\n\t */\n\tuint32_t identifier;\n\n\t/* The data offset\n\t */\n\tuint64_t data_offset;\n\n\t/* The data size\n\t */\n\tuint32_t data_size;\n};\n\nint libfsntfs_security_descriptor_index_value_initialize(\n     libfsntfs_security_descriptor_index_value_t **security_descriptor_index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_value_free(\n     libfsntfs_security_descriptor_index_value_t **security_descriptor_index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_value_compare(\n     libfsntfs_security_descriptor_index_value_t *first_security_descriptor_index_value,\n     libfsntfs_security_descriptor_index_value_t *second_security_descriptor_index_value,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_index_value_read_data(\n     libfsntfs_security_descriptor_index_value_t *security_descriptor_index_value,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_INDEX_VALUE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_values.c",
    "content": "/*\n * Security descriptor attribute ($SECURITY_DESCRIPTOR) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_libfwnt.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_security_descriptor_values.h\"\n\n/* Creates security descriptor values\n * Make sure the value security_descriptor_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_initialize(\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_initialize\";\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*security_descriptor_values = memory_allocate_structure(\n\t                               libfsntfs_security_descriptor_values_t );\n\n\tif( *security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create security descriptor values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *security_descriptor_values,\n\t     0,\n\t     sizeof( libfsntfs_security_descriptor_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear security descriptor values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *security_descriptor_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *security_descriptor_values );\n\n\t\t*security_descriptor_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees security descriptor values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_free(\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_free\";\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *security_descriptor_values != NULL )\n\t{\n\t\tif( ( *security_descriptor_values )->data != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *security_descriptor_values )->data );\n\t\t}\n\t\tmemory_free(\n\t\t *security_descriptor_values );\n\n\t\t*security_descriptor_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the security descriptor values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_read_data(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function                              = \"libfsntfs_security_descriptor_values_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tlibfwnt_security_descriptor_t *security_descriptor = NULL;\n#endif\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: security descriptor data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t}\n#endif\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( libfwnt_security_descriptor_initialize(\n\t\t     &security_descriptor,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfwnt_security_descriptor_copy_from_byte_stream(\n\t\t     security_descriptor,\n\t\t     data,\n\t\t     data_size,\n\t\t     LIBFWNT_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy security descriptor from byte stream.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfwnt_security_descriptor_free(\n\t\t     &security_descriptor,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free security descriptor.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n\n#if defined( HAVE_DEBUG_OUTPUT )\non_error:\n\tif( security_descriptor != NULL )\n\t{\n\t\tlibfwnt_security_descriptor_free(\n\t\t &security_descriptor,\n\t\t NULL );\n\t}\n\treturn( -1 );\n#endif\n}\n\n/* Reads the security descriptor values from the buffer\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_read_buffer(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_read_buffer\";\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_values->data != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor values - data already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < 20 )\n\t || ( data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid security descriptor data size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsecurity_descriptor_values->data = (uint8_t *) memory_allocate(\n\t                                                sizeof( uint8_t ) * data_size );\n\n\tif( security_descriptor_values->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsecurity_descriptor_values->data_size = data_size;\n\n\tif( memory_copy(\n\t     security_descriptor_values->data,\n\t     data,\n\t     data_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to copy data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_security_descriptor_values_read_data(\n\t     security_descriptor_values,\n\t     security_descriptor_values->data,\n\t     security_descriptor_values->data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read security descriptor values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( security_descriptor_values->data != NULL )\n\t{\n\t\tmemory_free(\n\t\t security_descriptor_values->data );\n\n\t\tsecurity_descriptor_values->data = NULL;\n\t}\n\tsecurity_descriptor_values->data_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the security descriptor values from the data stream\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_read_stream(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     libbfio_handle_t *file_io_handle,\n     libfdata_stream_t *data_stream,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_read_stream\";\n\tsize64_t data_size    = 0;\n\tssize_t read_count    = 0;\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_values->data != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid security descriptor values - data already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfdata_stream_get_size(\n\t     data_stream,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data stream size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( data_size < 20 )\n\t || ( data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid security descriptor data size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsecurity_descriptor_values->data = (uint8_t *) memory_allocate(\n\t                                                sizeof( uint8_t ) * (size_t) data_size );\n\n\tif( security_descriptor_values->data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsecurity_descriptor_values->data_size = (size_t) data_size;\n\n\tread_count = libfdata_stream_read_buffer(\n\t              data_stream,\n\t              (intptr_t *) file_io_handle,\n\t              security_descriptor_values->data,\n\t              security_descriptor_values->data_size,\n\t              0,\n\t              error );\n\n\tif( read_count < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read security descriptor data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_security_descriptor_values_read_data(\n\t     security_descriptor_values,\n\t     security_descriptor_values->data,\n\t     security_descriptor_values->data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read security descriptor values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( security_descriptor_values->data != NULL )\n\t{\n\t\tmemory_free(\n\t\t security_descriptor_values->data );\n\n\t\tsecurity_descriptor_values->data = NULL;\n\t}\n\tsecurity_descriptor_values->data_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the security descriptor values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_security_descriptor_values_read_from_mft_attribute(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     uint8_t flags,\n     libcerror_error_t **error )\n{\n\tlibfdata_stream_t *cluster_block_stream = NULL;\n\tuint8_t *data                           = NULL;\n\tstatic char *function                   = \"libfsntfs_security_descriptor_values_read_from_mft_attribute\";\n\tsize_t data_size                        = 0;\n\tuint32_t attribute_type                 = 0;\n\tuint16_t attribute_data_flags           = 0;\n\tint result                              = 0;\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_resident_data(\n\t\t     mft_attribute,\n\t\t     &data,\n\t\t     &data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_values_read_buffer(\n\t\t     security_descriptor_values,\n\t\t     data,\n\t\t     data_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor values.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse if( ( flags & LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY ) == 0 )\n\t{\n\t\tif( libfsntfs_mft_attribute_get_data_flags(\n\t\t     mft_attribute,\n\t\t     &attribute_data_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve data flags.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( ( attribute_data_flags & LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported compressed attribute data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_cluster_block_stream_initialize(\n\t\t     &cluster_block_stream,\n\t\t     io_handle,\n\t\t     mft_attribute,\n\t\t     NULL,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create cluster block stream.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_security_descriptor_values_read_stream(\n\t\t     security_descriptor_values,\n\t\t     file_io_handle,\n\t\t     cluster_block_stream,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read security descriptor values from stream.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfdata_stream_free(\n\t\t     &cluster_block_stream,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free cluster block stream.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( 1 );\n\non_error:\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the security descriptor data size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_security_descriptor_values_get_data_size(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     size_t *data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_get_data_size\";\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_values->data == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\t*data_size = security_descriptor_values->data_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the security descriptor data size\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_security_descriptor_values_get_data(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_security_descriptor_values_get_data\";\n\n\tif( security_descriptor_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid data size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size < security_descriptor_values->data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_values->data == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( memory_copy(\n\t     data,\n\t     security_descriptor_values->data,\n\t     security_descriptor_values->data_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to copy security descriptor data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_security_descriptor_values.h",
    "content": "/*\n * Security descriptor attribute ($SECURITY_DESCRIPTOR) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_VALUES_H )\n#define _LIBFSNTFS_SECURITY_DESCRIPTOR_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_security_descriptor_values libfsntfs_security_descriptor_values_t;\n\nstruct libfsntfs_security_descriptor_values\n{\n\t/* The data\n\t */\n\tuint8_t *data;\n\n\t/* The data size\n\t */\n\tsize_t data_size;\n};\n\nint libfsntfs_security_descriptor_values_initialize(\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_free(\n     libfsntfs_security_descriptor_values_t **security_descriptor_values,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_read_data(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_read_buffer(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_read_stream(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     libbfio_handle_t *file_io_handle,\n     libfdata_stream_t *data_stream,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_read_from_mft_attribute(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     uint8_t flags,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_get_data_size(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     size_t *data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_security_descriptor_values_get_data(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SECURITY_DESCRIPTOR_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_standard_information_attribute.c",
    "content": "/*\n * Standard information attribute ($STANDARD_INFORMATION) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_standard_information_attribute.h\"\n#include \"libfsntfs_standard_information_values.h\"\n#include \"libfsntfs_types.h\"\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_creation_time\";\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->creation_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file) modification (last written) date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_modification_time\";\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_access_time\";\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->access_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file system entry) modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_entry_modification_time\";\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->entry_modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_file_attribute_flags\";\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( file_attribute_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_attribute_flags = standard_information_values->file_attribute_flags;\n\n\treturn( 1 );\n}\n\n/* Retrieves the owner identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_owner_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *owner_identifier,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_owner_identifier\";\n\tuint64_t attribute_data_size                                         = 0;\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( owner_identifier == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid owner identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 72 )\n\t{\n\t\treturn( 0 );\n\t}\n\t*owner_identifier = standard_information_values->owner_identifier;\n\n\treturn( 1 );\n}\n\n/* Retrieves the security descriptor identifier\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *security_descriptor_identifier,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_security_descriptor_identifier\";\n\tuint64_t attribute_data_size                                         = 0;\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( security_descriptor_identifier == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 72 )\n\t{\n\t\treturn( 0 );\n\t}\n\t*security_descriptor_identifier = standard_information_values->security_descriptor_identifier;\n\n\treturn( 1 );\n}\n\n/* Retrieves the update sequence number (USN)\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_standard_information_attribute_get_update_sequence_number(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *update_sequence_number,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute                   = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tstatic char *function                                                = \"libfsntfs_standard_information_attribute_get_update_sequence_number\";\n\tuint64_t attribute_data_size                                         = 0;\n\tuint32_t attribute_type                                              = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) internal_attribute->value;\n\n\tif( update_sequence_number == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid update sequence number (USN).\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_data_size(\n\t     internal_attribute,\n\t     &attribute_data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_data_size < 72 )\n\t{\n\t\treturn( 0 );\n\t}\n\t*update_sequence_number = standard_information_values->update_sequence_number;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_standard_information_attribute.h",
    "content": "/*\n * Standard information attribute ($STANDARD_INFORMATION) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H )\n#define _LIBFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_owner_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *owner_identifier,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n     libfsntfs_attribute_t *attribute,\n     uint32_t *security_descriptor_identifier,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_standard_information_attribute_get_update_sequence_number(\n     libfsntfs_attribute_t *attribute,\n     uint64_t *update_sequence_number,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_standard_information_values.c",
    "content": "/*\n * Standard information attribute ($STANDARAD_INFORMATION) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <system_string.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libfdatetime.h\"\n#include \"libfsntfs_standard_information_values.h\"\n\n#include \"fsntfs_standard_information.h\"\n\n/* Creates standard information values\n * Make sure the value standard_information_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_initialize(\n     libfsntfs_standard_information_values_t **standard_information_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_initialize\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *standard_information_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid standard information values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*standard_information_values = memory_allocate_structure(\n\t                                libfsntfs_standard_information_values_t );\n\n\tif( *standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create standard information values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *standard_information_values,\n\t     0,\n\t     sizeof( libfsntfs_standard_information_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear standard information values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *standard_information_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *standard_information_values );\n\n\t\t*standard_information_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees standard information values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_free(\n     libfsntfs_standard_information_values_t **standard_information_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_free\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *standard_information_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *standard_information_values );\n\n\t\t*standard_information_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the standard information values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_read_data(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function               = \"libfsntfs_standard_information_values_read_data\";\n\tuint32_t maximum_number_of_versions = 0;\n\tuint32_t version_number             = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit                = 0;\n\tuint32_t value_32bit                = 0;\n#endif\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: standard information data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( ( data_size != 48 )\n\t && ( data_size != 72 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported standard information data size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->creation_time,\n\t standard_information_values->creation_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->modification_time,\n\t standard_information_values->modification_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->access_time,\n\t standard_information_values->access_time );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->entry_modification_time,\n\t standard_information_values->entry_modification_time );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->file_attribute_flags,\n\t standard_information_values->file_attribute_flags );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->maximum_number_of_versions,\n\t maximum_number_of_versions );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_standard_information_t *) data )->version_number,\n\t version_number );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"creation time\\t\\t\\t\",\n\t\t     ( (fsntfs_standard_information_t *) data )->creation_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print filetime value.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"modification time\\t\\t\",\n\t\t     ( (fsntfs_standard_information_t *) data )->modification_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print filetime value.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"entry modification time\\t\",\n\t\t     ( (fsntfs_standard_information_t *) data )->entry_modification_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print filetime value.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_debug_print_filetime_value(\n\t\t     function,\n\t\t     \"access time\\t\\t\\t\",\n\t\t     ( (fsntfs_standard_information_t *) data )->access_time,\n\t\t     8,\n\t\t     LIBFDATETIME_ENDIAN_LITTLE,\n\t\t     LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t \"%s: unable to print filetime value.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tlibcnotify_printf(\n\t\t \"%s: file attribute flags\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t standard_information_values->file_attribute_flags );\n\t\tlibfsntfs_debug_print_file_attribute_flags(\n\t\t standard_information_values->file_attribute_flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: maximum number of versions\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t maximum_number_of_versions );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: version number\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t version_number );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_standard_information_t *) data )->class_identifier,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: class identifier\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( ( maximum_number_of_versions == 0 )\n\t && ( version_number == 1 ) )\n\t{\n\t\tstandard_information_values->is_case_sensitive = 1;\n\t}\n\tif( data_size > 48 )\n\t{\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_standard_information_t *) data )->owner_identifier,\n\t\t standard_information_values->owner_identifier );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_standard_information_t *) data )->security_descriptor_identifier,\n\t\t standard_information_values->security_descriptor_identifier );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_standard_information_t *) data )->update_sequence_number,\n\t\t standard_information_values->update_sequence_number );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: owner identifier\\t\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t standard_information_values->owner_identifier );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: security descriptor identifier\\t: %\" PRIu32 \"\\n\",\n\t\t\t function,\n\t\t\t standard_information_values->security_descriptor_identifier );\n\n\t\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t\t ( (fsntfs_standard_information_t *) data )->quota_charged,\n\t\t\t value_64bit );\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: quota charged\\t\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t value_64bit );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: update sequence number\\t\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t standard_information_values->update_sequence_number );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif\n\treturn( 1 );\n}\n\n/* Reads the standard information values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_read_from_mft_attribute(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_standard_information_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_standard_information_values_read_data(\n\t     standard_information_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the creation date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_creation_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_creation_time\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->creation_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file) modification (last written) date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_modification_time\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the access date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_access_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_access_time\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->access_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the (file system entry) modification date and time\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_entry_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_entry_modification_time\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( filetime == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid FILETIME.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*filetime = standard_information_values->entry_modification_time;\n\n\treturn( 1 );\n}\n\n/* Retrieves the file attribute flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_file_attribute_flags(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_file_attribute_flags\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_attribute_flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file attribute flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_attribute_flags = standard_information_values->file_attribute_flags;\n\n\treturn( 1 );\n}\n\n/* Retrieves the security descriptor identifier\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_security_descriptor_identifier(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint32_t *security_descriptor_identifier,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_security_descriptor_identifier\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( security_descriptor_identifier == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid security descriptor identifier.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*security_descriptor_identifier = standard_information_values->security_descriptor_identifier;\n\n\treturn( 1 );\n}\n\n/* Retrieves the update sequence number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_standard_information_values_get_update_sequence_number(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *update_sequence_number,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_standard_information_values_get_update_sequence_number\";\n\n\tif( standard_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid standard information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( update_sequence_number == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid update sequence number.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*update_sequence_number = standard_information_values->update_sequence_number;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_standard_information_values.h",
    "content": "/*\n * Standard information attribute ($STANDARD_INFORMATION) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_STANDARD_INFORMATION_VALUES_H )\n#define _LIBFSNTFS_STANDARD_INFORMATION_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_standard_information_values libfsntfs_standard_information_values_t;\n\nstruct libfsntfs_standard_information_values\n{\n\t/* The creation time\n\t */\n\tuint64_t creation_time;\n\n\t/* The modification time\n\t */\n\tuint64_t modification_time;\n\n\t/* The access time\n\t */\n\tuint64_t access_time;\n\n\t/* The entry modification time\n\t */\n\tuint64_t entry_modification_time;\n\n\t/* The file attribute flags\n\t */\n\tuint32_t file_attribute_flags;\n\n\t/* The owner identifier\n\t */\n\tuint32_t owner_identifier;\n\n\t/* The security descriptor identifier\n\t */\n\tuint32_t security_descriptor_identifier;\n\n\t/* The update sequence number (USN)\n\t */\n\tuint64_t update_sequence_number;\n\n\t/* Value to indicate the is case sensitive flag is set\n\t */\n\tuint8_t is_case_sensitive;\n};\n\nint libfsntfs_standard_information_values_initialize(\n     libfsntfs_standard_information_values_t **standard_information_values,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_free(\n     libfsntfs_standard_information_values_t **standard_information_values,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_read_data(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_read_from_mft_attribute(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_creation_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_access_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_entry_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *filetime,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_file_attribute_flags(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint32_t *file_attribute_flags,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_security_descriptor_identifier(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint32_t *security_descriptor_identifier,\n     libcerror_error_t **error );\n\nint libfsntfs_standard_information_values_get_update_sequence_number(\n     libfsntfs_standard_information_values_t *standard_information_values,\n     uint64_t *update_sequence_number,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_STANDARD_INFORMATION_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_support.c",
    "content": "/*\n * Support functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libclocale.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_support.h\"\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\n/* Returns the library version\n */\nconst char *libfsntfs_get_version(\n             void )\n{\n\treturn( (const char *) LIBFSNTFS_VERSION_STRING );\n}\n\n/* Returns the access flags for reading\n */\nint libfsntfs_get_access_flags_read(\n     void )\n{\n\treturn( (int) LIBFSNTFS_ACCESS_FLAG_READ );\n}\n\n/* Retrieves the narrow system string codepage\n * A value of 0 represents no codepage, UTF-8 encoding is used instead\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_get_codepage(\n     int *codepage,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_get_codepage\";\n\n\tif( libclocale_codepage_get(\n\t     codepage,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve codepage.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Sets the narrow system string codepage\n * A value of 0 represents no codepage, UTF-8 encoding is used instead\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_set_codepage(\n     int codepage,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_set_codepage\";\n\n\tif( libclocale_codepage_set(\n\t     codepage,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set codepage.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n/* Determines if a file contains a NTFS volume signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_volume_signature(\n     const char *filename,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tstatic char *function            = \"libfsntfs_check_volume_signature\";\n\tsize_t filename_length           = 0;\n\tint result                       = 0;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = narrow_string_length(\n\t                   filename );\n\n\tif( filename_length == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_set_name(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          file_io_handle,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to check file signature using a file handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Determines if a file contains a NTFS volume signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_volume_signature_wide(\n     const wchar_t *filename,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tstatic char *function            = \"libfsntfs_check_volume_signature_wide\";\n\tsize_t filename_length           = 0;\n\tint result                       = 0;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = wide_string_length(\n\t                   filename );\n\n\tif( filename_length == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_set_name_wide(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          file_io_handle,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to check file signature using a file handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Determines if a file contains a NTFS volume signature using a Basic File IO (bfio) handle\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tuint8_t signature[ 12 ];\n\n\tstatic char *function      = \"libfsntfs_check_volume_signature_file_io_handle\";\n\tssize_t read_count         = 0;\n\tint file_io_handle_is_open = 0;\n\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfile_io_handle_is_open = libbfio_handle_is_open(\n\t                          file_io_handle,\n\t                          error );\n\n\tif( file_io_handle_is_open == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open file.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_open(\n\t\t     file_io_handle,\n\t\t     LIBBFIO_OPEN_READ,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              signature,\n\t              12,\n\t              0,\n\t              error );\n\n\tif( read_count != 12 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read signature at offset: 0 (0x00000000).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_close(\n\t\t     file_io_handle,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( memory_compare(\n\t     fsntfs_volume_file_system_signature,\n\t     &( signature[ 3 ] ),\n\t     8 ) == 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\t/* TODO also check sector signature ? */\n\n\treturn( 0 );\n\non_error:\n\tif( file_io_handle_is_open == 0 )\n\t{\n\t\tlibbfio_handle_close(\n\t\t file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Determines if a file contains a NTFS MFT metadata file signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_mft_metadata_file_signature(\n     const char *filename,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tstatic char *function            = \"libfsntfs_check_mft_metadata_file_signature\";\n\tsize_t filename_length           = 0;\n\tint result                       = 0;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = narrow_string_length(\n\t                   filename );\n\n\tif( filename_length == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_set_name(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n\t          file_io_handle,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to check file signature using a file handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Determines if a file contains a NTFS MFT metadata file signature\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_mft_metadata_file_signature_wide(\n     const wchar_t *filename,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tstatic char *function            = \"libfsntfs_check_mft_metadata_file_signature_wide\";\n\tsize_t filename_length           = 0;\n\tint result                       = 0;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfilename_length = wide_string_length(\n\t                   filename );\n\n\tif( filename_length == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_file_set_name_wide(\n\t     file_io_handle,\n\t     filename,\n\t     filename_length,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n\t          file_io_handle,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to check file signature using a file handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( result );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Determines if a file contains a NTFS MFT metadata file signature using a Basic File IO (bfio) handle\n * Returns 1 if true, 0 if not or -1 on error\n */\nint libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tuint8_t signature[ 4 ];\n\n\tstatic char *function      = \"libfsntfs_check_mft_metadata_file_signature_file_io_handle\";\n\tssize_t read_count         = 0;\n\tint file_io_handle_is_open = 0;\n\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tfile_io_handle_is_open = libbfio_handle_is_open(\n\t                          file_io_handle,\n\t                          error );\n\n\tif( file_io_handle_is_open == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open file.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_open(\n\t\t     file_io_handle,\n\t\t     LIBBFIO_OPEN_READ,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              signature,\n\t              4,\n\t              0,\n\t              error );\n\n\tif( read_count != 4 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read signature at offset: 0 (0x00000000).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_close(\n\t\t     file_io_handle,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close file.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( memory_compare(\n\t     \"FILE\",\n\t     signature,\n\t     4 ) == 0 )\n\t{\n\t\treturn( 1 );\n\t}\n\treturn( 0 );\n\non_error:\n\tif( file_io_handle_is_open == 0 )\n\t{\n\t\tlibbfio_handle_close(\n\t\t file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_support.h",
    "content": "/*\n * Support functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_SUPPORT_H )\n#define _LIBFSNTFS_SUPPORT_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if !defined( HAVE_LOCAL_LIBFSNTFS )\n\nLIBFSNTFS_EXTERN \\\nconst char *libfsntfs_get_version(\n             void );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_get_access_flags_read(\n     void );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_get_codepage(\n     int *codepage,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_set_codepage(\n     int codepage,\n     libcerror_error_t **error );\n\n#endif /* !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature(\n     const char *filename,\n     libcerror_error_t **error );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_wide(\n     const wchar_t *filename,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature(\n     const char *filename,\n     libcerror_error_t **error );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature_wide(\n     const wchar_t *filename,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_SUPPORT_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_txf_data_values.c",
    "content": "/*\n * The Transactional NTFS (TxF) data ($TXF_DATA) logged utility stream\n * attribute ($LOGGED_UTILITY_STREAM) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_txf_data_values.h\"\n\n#include \"fsntfs_txf_data.h\"\n\n/* Creates TxF data values\n * Make sure the value txf_data_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_txf_data_values_initialize(\n     libfsntfs_txf_data_values_t **txf_data_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_txf_data_values_initialize\";\n\n\tif( txf_data_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid TxF data values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *txf_data_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid TxF data values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*txf_data_values = memory_allocate_structure(\n\t                    libfsntfs_txf_data_values_t );\n\n\tif( *txf_data_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create TxF data values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *txf_data_values,\n\t     0,\n\t     sizeof( libfsntfs_txf_data_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear TxF data values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *txf_data_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *txf_data_values );\n\n\t\t*txf_data_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees TxF data values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_txf_data_values_free(\n     libfsntfs_txf_data_values_t **txf_data_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_txf_data_values_free\";\n\n\tif( txf_data_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid TxF data values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *txf_data_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *txf_data_values );\n\n\t\t*txf_data_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the TxF data values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_txf_data_values_read_data(\n     libfsntfs_txf_data_values_t *txf_data_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_txf_data_values_read_data\";\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint64_t value_64bit  = 0;\n\tuint16_t value_16bit  = 0;\n#endif\n\n\tif( txf_data_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid TxF data values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: TxF data values:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( data_size != sizeof( fsntfs_txf_data_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported TxF data values size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_txf_data_t *) data )->rm_root_file_reference,\n\t txf_data_values->rm_root_file_reference );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_txf_data_t *) data )->file_identifier,\n\t txf_data_values->file_identifier );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_txf_data_t *) data )->data_lsn,\n\t txf_data_values->data_lsn );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_txf_data_t *) data )->metadata_lsn,\n\t txf_data_values->metadata_lsn );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_txf_data_t *) data )->directory_index_lsn,\n\t txf_data_values->directory_index_lsn );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown1:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t ( (fsntfs_txf_data_t *) data )->unknown1,\n\t\t 6,\n\t\t 0 );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: resource manager root file reference\\t: %\" PRIu64 \"- %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t txf_data_values->rm_root_file_reference & 0xffffffffffffUL,\n\t\t txf_data_values->rm_root_file_reference >> 48 );\n\n\t\tbyte_stream_copy_to_uint64_little_endian(\n\t\t ( (fsntfs_txf_data_t *) data )->usn_index,\n\t\t value_64bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: update sequence number index\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t value_64bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: file identifier\\t\\t\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t txf_data_values->file_identifier );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: data log sequence number\\t\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t txf_data_values->data_lsn );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: metadata log sequence number\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t txf_data_values->metadata_lsn );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: directory index log sequence number\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t txf_data_values->directory_index_lsn );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_txf_data_t *) data )->flags,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: flags\\t\\t\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n}\n\n/* Reads the TxF data values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_txf_data_values_read_from_mft_attribute(\n     libfsntfs_txf_data_values_t *txf_data_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_txf_data_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( txf_data_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid TxF data values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_txf_data_values_read_data(\n\t     txf_data_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read TxF data values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_txf_data_values.h",
    "content": "/*\n * The Transactional NTFS (TxF) data ($TXF_DATA) logged utility stream\n * attribute ($LOGGED_UTILITY_STREAM) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_TXF_DATA_VALUES_H )\n#define _LIBFSNTFS_TXF_DATA_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_txf_data_values libfsntfs_txf_data_values_t;\n\nstruct libfsntfs_txf_data_values\n{\n\t/* The resource manager root file reference\n\t */\n\tuint64_t rm_root_file_reference;\n\n\t/* The file identifier\n\t */\n\tuint64_t file_identifier;\n\n\t/* The file data lsn\n\t */\n\tuint64_t data_lsn;\n\n\t/* The file system metadata lsn\n\t */\n\tuint64_t metadata_lsn;\n\n\t/* The directory index lsn\n\t */\n\tuint64_t directory_index_lsn;\n};\n\nint libfsntfs_txf_data_values_initialize(\n     libfsntfs_txf_data_values_t **txf_data_values,\n     libcerror_error_t **error );\n\nint libfsntfs_txf_data_values_free(\n     libfsntfs_txf_data_values_t **txf_data_values,\n     libcerror_error_t **error );\n\nint libfsntfs_txf_data_values_read_data(\n     libfsntfs_txf_data_values_t *txf_data_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_txf_data_values_read_from_mft_attribute(\n     libfsntfs_txf_data_values_t *txf_data_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_TXF_DATA_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_types.h",
    "content": "/*\n * The internal type definitions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INTERNAL_TYPES_H )\n#define _LIBFSNTFS_INTERNAL_TYPES_H\n\n#include <common.h>\n#include <types.h>\n\n/* Define HAVE_LOCAL_LIBFSNTFS for local use of libfsntfs\n * The definitions in <libfsntfs/types.h> are copied here\n * for local use of libfsntfs\n */\n#if defined( HAVE_LOCAL_LIBFSNTFS )\n\n/* The following type definitions hide internal data structures\n */\n#if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI )\ntypedef struct libfsntfs_attribute {}\t\t\tlibfsntfs_attribute_t;\ntypedef struct libfsntfs_attribute_list_entry {}\tlibfsntfs_attribute_list_entry_t;\ntypedef struct libfsntfs_data_stream {}\t\t\tlibfsntfs_data_stream_t;\ntypedef struct libfsntfs_file_entry {}\t\t\tlibfsntfs_file_entry_t;\ntypedef struct libfsntfs_mft_metadata_file {}\t\tlibfsntfs_mft_metadata_file_t;\ntypedef struct libfsntfs_usn_change_journal {}\t\tlibfsntfs_usn_change_journal_t;\ntypedef struct libfsntfs_volume {}\t\t\tlibfsntfs_volume_t;\n\n#else\ntypedef intptr_t libfsntfs_attribute_t;\ntypedef intptr_t libfsntfs_attribute_list_entry_t;\ntypedef intptr_t libfsntfs_data_stream_t;\ntypedef intptr_t libfsntfs_file_entry_t;\ntypedef intptr_t libfsntfs_mft_metadata_file_t;\ntypedef intptr_t libfsntfs_usn_change_journal_t;\ntypedef intptr_t libfsntfs_volume_t;\n\n#endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */\n\n#endif /* defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n/* The largest primary (or scalar) available\n * supported by a single load and store instruction\n */\ntypedef unsigned long int libfsntfs_aligned_t;\n\n#endif /* !defined( _LIBFSNTFS_INTERNAL_TYPES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_unused.h",
    "content": "/*\n * Definitions to silence compiler warnings about unused function attributes/parameters.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_UNUSED_H )\n#define _LIBFSNTFS_UNUSED_H\n\n#include <common.h>\n\n#if !defined( LIBFSNTFS_ATTRIBUTE_UNUSED )\n#if defined( __GNUC__ ) && __GNUC__ >= 3\n#define LIBFSNTFS_ATTRIBUTE_UNUSED\t__attribute__ ((__unused__))\n#else\n#define LIBFSNTFS_ATTRIBUTE_UNUSED\n#endif\n#endif\n\n#if defined( _MSC_VER )\n#define LIBFSNTFS_UNREFERENCED_PARAMETER( parameter ) \\\n\tUNREFERENCED_PARAMETER( parameter );\n#else\n#define LIBFSNTFS_UNREFERENCED_PARAMETER( parameter ) \\\n\t/* parameter */\n#endif\n\n#endif /* !defined( _LIBFSNTFS_UNUSED_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_usn_change_journal.c",
    "content": "/*\n * USN change journal functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_cluster_block_stream.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_file_entry.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_usn_change_journal.h\"\n\n/* Creates an USN change journal\n * Make sure the value usn_change_journal is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_usn_change_journal_initialize(\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_directory_entry_t *directory_entry,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_usn_change_journal_t *internal_usn_change_journal = NULL;\n\tstatic char *function                                                = \"libfsntfs_usn_change_journal_initialize\";\n\toff64_t segment_offset                                               = 0;\n\tint segment_file_index                                               = 0;\n\n\tif( usn_change_journal == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *usn_change_journal != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid USN change journal value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid $J data attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_usn_change_journal = memory_allocate_structure(\n\t                               libfsntfs_internal_usn_change_journal_t );\n\n\tif( internal_usn_change_journal == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create USN change journal.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_usn_change_journal,\n\t     0,\n\t     sizeof( libfsntfs_internal_usn_change_journal_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear USN change journal.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_usn_change_journal );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_cluster_block_stream_initialize(\n\t     &( internal_usn_change_journal->data_stream ),\n\t     io_handle,\n\t     data_attribute,\n\t     NULL,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create $J data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_get_size(\n\t     internal_usn_change_journal->data_stream,\n\t     &( internal_usn_change_journal->data_size ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve $J data stream size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_get_number_of_segments(\n\t     internal_usn_change_journal->data_stream,\n\t     &( internal_usn_change_journal->number_of_extents ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve $J data stream number of extents.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfdata_stream_get_segment_by_index(\n\t     internal_usn_change_journal->data_stream,\n\t     internal_usn_change_journal->extent_index,\n\t     &segment_file_index,\n\t     &segment_offset,\n\t     &( internal_usn_change_journal->extent_size ),\n\t     &( internal_usn_change_journal->extent_flags ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve $J data stream extent: %d.\",\n\t\t function,\n\t\t internal_usn_change_journal->extent_index );\n\n\t\tgoto on_error;\n\t}\n/* TODO what defines the journal block size? the index entry size? */\n\tinternal_usn_change_journal->journal_block_size = 0x1000;\n\n\tinternal_usn_change_journal->journal_block_data = (uint8_t *) memory_allocate(\n\t                                                               sizeof( uint8_t ) * internal_usn_change_journal->journal_block_size );\n\n\tif( internal_usn_change_journal->journal_block_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create journal block data.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tinternal_usn_change_journal->file_io_handle  = file_io_handle;\n\tinternal_usn_change_journal->directory_entry = directory_entry;\n\n\t*usn_change_journal = (libfsntfs_usn_change_journal_t *) internal_usn_change_journal;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_usn_change_journal != NULL )\n\t{\n\t\tif( internal_usn_change_journal->data_stream != NULL )\n\t\t{\n\t\t\tlibfdata_stream_free(\n\t\t\t &( internal_usn_change_journal->data_stream ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t internal_usn_change_journal );\n\t}\n\treturn( -1 );\n}\n\n/* Frees an USN change journal\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_usn_change_journal_free(\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_usn_change_journal_t *internal_usn_change_journal = NULL;\n\tstatic char *function                                                = \"libfsntfs_usn_change_journal_free\";\n\tint result                                                           = 1;\n\n\tif( usn_change_journal == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *usn_change_journal != NULL )\n\t{\n\t\tinternal_usn_change_journal = (libfsntfs_internal_usn_change_journal_t *) *usn_change_journal;\n\t\t*usn_change_journal         = NULL;\n\n\t\t/* The file_io_handle reference is freed elsewhere\n\t\t */\n\t\tif( libfsntfs_directory_entry_free(\n\t\t     &( internal_usn_change_journal->directory_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tif( libfdata_stream_free(\n\t\t     &( internal_usn_change_journal->data_stream ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free $J data stream.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t internal_usn_change_journal->journal_block_data );\n\n\t\tmemory_free(\n\t\t internal_usn_change_journal );\n\t}\n\treturn( result );\n}\n\n/* Retrieves the current offset of the default data stream (nameless $DATA attribute)\n * Returns the offset if successful or -1 on error\n */\nint libfsntfs_usn_change_journal_get_offset(\n     libfsntfs_usn_change_journal_t *usn_change_journal,\n     off64_t *offset,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_usn_change_journal_t *internal_usn_change_journal = NULL;\n\tstatic char *function                                                = \"libfsntfs_usn_change_journal_get_offset\";\n\n\tif( usn_change_journal == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_usn_change_journal = (libfsntfs_internal_usn_change_journal_t *) usn_change_journal;\n\n\tif( offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*offset = internal_usn_change_journal->data_offset;\n\n\treturn( 1 );\n}\n\n/* Reads an USN record from the USN change journal\n * Returns the number of bytes read if successful or -1 on error\n */\nssize_t libfsntfs_usn_change_journal_read_usn_record(\n         libfsntfs_usn_change_journal_t *usn_change_journal,\n         uint8_t *usn_record_data,\n         size_t usn_record_data_size,\n         libcerror_error_t **error )\n{\n\tlibfsntfs_internal_usn_change_journal_t *internal_usn_change_journal = NULL;\n\tstatic char *function                                                = \"libfsntfs_usn_change_journal_read_usn_record\";\n\tsize_t read_size                                                     = 0;\n\tssize_t read_count                                                   = 0;\n\toff64_t journal_block_offset                                         = 0;\n\toff64_t segment_offset                                               = 0;\n\tuint32_t usn_record_size                                             = 0;\n\tint read_journal_block                                               = 0;\n\tint segment_file_index                                               = 0;\n\n\tif( usn_change_journal == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_usn_change_journal = (libfsntfs_internal_usn_change_journal_t *) usn_change_journal;\n\n\tif( ( internal_usn_change_journal->journal_block_size < 60 )\n\t || ( internal_usn_change_journal->journal_block_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid USN change journal - journal block size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( usn_record_data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid USN record data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( usn_record_data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid USN record data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_usn_change_journal->extent_index >= internal_usn_change_journal->number_of_extents )\n\t{\n\t\treturn( 0 );\n\t}\n\twhile( usn_record_size == 0 )\n\t{\n\t\tif( internal_usn_change_journal->data_offset == 0 )\n\t\t{\n\t\t\tread_journal_block = 1;\n\t\t}\n\t\telse if( internal_usn_change_journal->journal_block_offset >= ( internal_usn_change_journal->journal_block_size - 60 ) )\n\t\t{\n\t\t\t/* Get the next journal block\n\t\t\t */\n\t\t\tinternal_usn_change_journal->extent_offset += internal_usn_change_journal->journal_block_size;\n\n\t\t\tread_journal_block = 1;\n\t\t}\n\t\twhile( ( ( internal_usn_change_journal->extent_flags & LIBFSNTFS_EXTENT_FLAG_IS_SPARSE ) != 0 )\n\t\t    || ( (size64_t) internal_usn_change_journal->extent_offset >= internal_usn_change_journal->extent_size ) )\n\t\t{\n\t\t\t/* Get the next non-sparse extent\n\t\t\t */\n\t\t\tinternal_usn_change_journal->extent_start_offset += internal_usn_change_journal->extent_size;\n\t\t\tinternal_usn_change_journal->extent_index        += 1;\n\n\t\t\tif( internal_usn_change_journal->extent_index >= internal_usn_change_journal->number_of_extents )\n\t\t\t{\n\t\t\t\treturn( 0 );\n\t\t\t}\n\t\t\tif( libfdata_stream_get_segment_by_index(\n\t\t\t     internal_usn_change_journal->data_stream,\n\t\t\t     internal_usn_change_journal->extent_index,\n\t\t\t     &segment_file_index,\n\t\t\t     &segment_offset,\n\t\t\t     &( internal_usn_change_journal->extent_size ),\n\t\t\t     &( internal_usn_change_journal->extent_flags ),\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t\t \"%s: unable to retrieve $J data stream extent: %d.\",\n\t\t\t\t function,\n\t\t\t\t internal_usn_change_journal->extent_index );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tinternal_usn_change_journal->extent_offset = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\t\tif( libcnotify_verbose != 0 )\n\t\t\t{\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: $J data stream extent: %d segment offset\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t\t\t function,\n\t\t\t\t internal_usn_change_journal->extent_index,\n\t\t\t\t segment_offset );\n\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"%s: $J data stream extent: %d size\\t: %\" PRIu64 \"\\n\",\n\t\t\t\t function,\n\t\t\t\t internal_usn_change_journal->extent_index,\n\t\t\t\t internal_usn_change_journal->extent_size );\n\n\t\t\t\tlibcnotify_printf(\n\t\t\t\t \"\\n\" );\n\t\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\t\t\tif( ( internal_usn_change_journal->extent_flags & LIBFSNTFS_EXTENT_FLAG_IS_SPARSE ) != 0 )\n\t\t\t{\n\t\t\t\tinternal_usn_change_journal->data_offset += internal_usn_change_journal->extent_size;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tread_journal_block = 1;\n\t\t\t}\n\t\t}\n\t\tif( read_journal_block != 0 )\n\t\t{\n\t\t\tif( (size64_t) internal_usn_change_journal->extent_offset >= internal_usn_change_journal->extent_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t\t \"%s: invalid USN change journal - extent data offset value out of bounds.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tif( memory_set(\n\t\t\t     internal_usn_change_journal->journal_block_data,\n\t\t\t     0,\n\t\t\t     internal_usn_change_journal->journal_block_size ) == NULL )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t\t\t \"%s: unable to clear journal block.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tread_size = internal_usn_change_journal->journal_block_size;\n\n\t\t\tif( read_size > ( internal_usn_change_journal->extent_size - internal_usn_change_journal->extent_offset ) )\n\t\t\t{\n\t\t\t\tread_size = (size_t) ( internal_usn_change_journal->extent_size - internal_usn_change_journal->extent_offset );\n\t\t\t}\n\t\t\tjournal_block_offset = internal_usn_change_journal->extent_start_offset + internal_usn_change_journal->extent_offset;\n\n\t\t\tread_count = libfdata_stream_read_buffer_at_offset(\n\t\t\t              internal_usn_change_journal->data_stream,\n\t\t\t              (intptr_t *) internal_usn_change_journal->file_io_handle,\n\t\t\t              internal_usn_change_journal->journal_block_data,\n\t\t\t              read_size,\n\t\t\t              journal_block_offset,\n\t\t\t              0,\n\t\t\t              error );\n\n\t\t\tif( read_count != (ssize_t) read_size )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t\t \"%s: unable to read journal block from $J data stream at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t\t\t function,\n\t\t\t\t journal_block_offset,\n\t\t\t\t journal_block_offset );\n\n\t\t\t\treturn( -1 );\n\t\t\t}\n\t\t\tinternal_usn_change_journal->journal_block_offset = 0;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: journal block offset\\t: %\" PRIzd \"\\n\",\n\t\t\t function,\n\t\t\t internal_usn_change_journal->journal_block_offset );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: journal block size\\t: %\" PRIu64 \"\\n\",\n\t\t\t function,\n\t\t\t internal_usn_change_journal->journal_block_size );\n\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif\n\t\tif( internal_usn_change_journal->journal_block_offset >= ( internal_usn_change_journal->journal_block_size - 60 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid USN change journal - journal block offset value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: USN change journal record header data:\\n\",\n\t\t\t function );\n\t\t\tlibcnotify_print_data(\n\t\t\t &( internal_usn_change_journal->journal_block_data[ internal_usn_change_journal->journal_block_offset ] ),\n\t\t\t 60,\n\t\t\t 0 );\n\t\t}\n#endif\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t &( internal_usn_change_journal->journal_block_data[ internal_usn_change_journal->journal_block_offset ] ),\n\t\t usn_record_size );\n\n\t\tif( usn_record_size == 0 )\n\t\t{\n\t\t\tinternal_usn_change_journal->data_offset          = internal_usn_change_journal->journal_block_size - internal_usn_change_journal->journal_block_offset;\n\t\t\tinternal_usn_change_journal->journal_block_offset = internal_usn_change_journal->journal_block_size;\n\t\t}\n\t}\n\tif( ( usn_record_size < 60 )\n\t || ( usn_record_size > ( internal_usn_change_journal->journal_block_size - internal_usn_change_journal->journal_block_offset ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid USN record size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( usn_record_data_size < usn_record_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: USN record data size value too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( memory_copy(\n\t     usn_record_data,\n\t     &( internal_usn_change_journal->journal_block_data[ internal_usn_change_journal->journal_block_offset ] ),\n\t     (size_t) usn_record_size ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to copy USN record data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_usn_change_journal->data_offset          += usn_record_size;\n\tinternal_usn_change_journal->journal_block_offset += usn_record_size;\n\n\treturn( (ssize_t) usn_record_size );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_usn_change_journal.h",
    "content": "/*\n * USN change journal functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_INTERNAL_USN_CHANGE_JOURNAL_H )\n#define _LIBFSNTFS_INTERNAL_USN_CHANGE_JOURNAL_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_usn_change_journal libfsntfs_internal_usn_change_journal_t;\n\nstruct libfsntfs_internal_usn_change_journal\n{\n\t/* The file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* The directory entry\n\t */\n\tlibfsntfs_directory_entry_t *directory_entry;\n\n\t/* The $J data stream\n\t */\n\tlibfdata_stream_t *data_stream;\n\n\t/* The data offset\n\t */\n\toff64_t data_offset;\n\n\t/* The data size\n\t */\n\tsize64_t data_size;\n\n\t/* The number of extents\n\t */\n\tint number_of_extents;\n\n\t/* The extent index\n\t */\n\tint extent_index;\n\n\t/* The extent start offset\n\t */\n\toff64_t extent_start_offset;\n\n\t/* The extent offset\n\t */\n\toff64_t extent_offset;\n\n\t/* The extent size\n\t */\n\tsize64_t extent_size;\n\n\t/* The extent flags\n\t */\n\tuint32_t extent_flags;\n\n\t/* The journal block data\n\t */\n\tuint8_t *journal_block_data;\n\n\t/* The journal block (data) offset\n\t */\n\tsize_t journal_block_offset;\n\n\t/* The journal block size\n\t */\n\tsize_t journal_block_size;\n};\n\nint libfsntfs_usn_change_journal_initialize(\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libfsntfs_io_handle_t *io_handle,\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_directory_entry_t *directory_entry,\n     libfsntfs_mft_attribute_t *data_attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_usn_change_journal_free(\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_usn_change_journal_get_offset(\n     libfsntfs_usn_change_journal_t *usn_change_journal,\n     off64_t *offset,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nssize_t libfsntfs_usn_change_journal_read_usn_record(\n         libfsntfs_usn_change_journal_t *usn_change_journal,\n         uint8_t *usn_record_data,\n         size_t usn_record_data_size,\n         libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_INTERNAL_USN_CHANGE_JOURNAL_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume.c",
    "content": "/*\n * Volume functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_directory_entries_tree.h\"\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_file_entry.h\"\n#include \"libfsntfs_file_name_values.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_libfcache.h\"\n#include \"libfsntfs_libfdata.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_usn_change_journal.h\"\n#include \"libfsntfs_volume.h\"\n#include \"libfsntfs_volume_header.h\"\n#include \"libfsntfs_volume_information_attribute.h\"\n#include \"libfsntfs_volume_name_attribute.h\"\n\n/* Creates a volume\n * Make sure the value volume is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_initialize(\n     libfsntfs_volume_t **volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_initialize\";\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = memory_allocate_structure(\n\t                   libfsntfs_internal_volume_t );\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     internal_volume,\n\t     0,\n\t     sizeof( libfsntfs_internal_volume_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear volume.\",\n\t\t function );\n\n\t\tmemory_free(\n\t\t internal_volume );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_io_handle_initialize(\n\t     &( internal_volume->io_handle ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_initialize(\n\t     &( internal_volume->read_write_lock ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize read/write lock.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\t*volume = (libfsntfs_volume_t *) internal_volume;\n\n\treturn( 1 );\n\non_error:\n\tif( internal_volume != NULL )\n\t{\n\t\tif( internal_volume->io_handle != NULL )\n\t\t{\n\t\t\tlibfsntfs_io_handle_free(\n\t\t\t &( internal_volume->io_handle ),\n\t\t\t NULL );\n\t\t}\n\t\tmemory_free(\n\t\t internal_volume );\n\t}\n\treturn( -1 );\n}\n\n/* Frees a volume\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_free(\n     libfsntfs_volume_t **volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_free\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume != NULL )\n\t{\n\t\tinternal_volume = (libfsntfs_internal_volume_t *) *volume;\n\n\t\tif( internal_volume->file_io_handle != NULL )\n\t\t{\n\t\t\tif( libfsntfs_volume_close(\n\t\t\t     *volume,\n\t\t\t     error ) != 0 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t\t \"%s: unable to close volume.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\t*volume = NULL;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t\tif( libcthreads_read_write_lock_free(\n\t\t     &( internal_volume->read_write_lock ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free read/write lock.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n#endif\n\t\tif( libfsntfs_io_handle_free(\n\t\t     &( internal_volume->io_handle ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tmemory_free(\n\t\t internal_volume );\n\t}\n\treturn( result );\n}\n\n/* Signals the volume to abort its current activity\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_signal_abort(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_signal_abort\";\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( internal_volume->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid volume - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume->io_handle->abort = 1;\n\n\treturn( 1 );\n}\n\n/* Opens a volume\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_open(\n     libfsntfs_volume_t *volume,\n     const char *filename,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_open\";\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libbfio_handle_set_track_offsets_read(\n\t     file_io_handle,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set track offsets read in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tif( libbfio_file_set_name(\n\t     file_io_handle,\n\t     filename,\n\t     narrow_string_length(\n\t      filename ) + 1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_open_file_io_handle(\n\t     volume,\n\t     file_io_handle,\n\t     access_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume: %s.\",\n\t\t function,\n\t\t filename );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_volume->file_io_handle_created_in_library = 1;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_volume->file_io_handle_created_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Opens a volume\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_open_wide(\n     libfsntfs_volume_t *volume,\n     const wchar_t *filename,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_open_wide\";\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( filename == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid filename.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_file_initialize(\n\t     &file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libbfio_handle_set_track_offsets_read(\n\t     file_io_handle,\n\t     1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set track offsets read in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tif( libbfio_file_set_name_wide(\n\t     file_io_handle,\n\t     filename,\n\t     wide_string_length(\n\t      filename ) + 1,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set filename in file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_open_file_io_handle(\n\t     volume,\n\t     file_io_handle,\n\t     access_flags,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume: %ls.\",\n\t\t function,\n\t\t filename );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_volume->file_io_handle_created_in_library = 1;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_volume->file_io_handle_created_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Opens a volume using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_open_file_io_handle\";\n\tint bfio_access_flags                        = 0;\n\tint file_io_handle_is_open                   = 0;\n\tuint8_t file_io_handle_opened_in_library     = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( internal_volume->file_io_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume - file IO handle already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) == 0 )\n\t && ( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) == 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBFSNTFS_ACCESS_FLAG_READ ) != 0 )\n\t{\n\t\tbfio_access_flags = LIBBFIO_ACCESS_FLAG_READ;\n\t}\n\tfile_io_handle_is_open = libbfio_handle_is_open(\n\t                          file_io_handle,\n\t                          error );\n\n\tif( file_io_handle_is_open == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( file_io_handle_is_open == 0 )\n\t{\n\t\tif( libbfio_handle_open(\n\t\t     file_io_handle,\n\t\t     bfio_access_flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t\t \"%s: unable to open file IO handle.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tfile_io_handle_opened_in_library = 1;\n\t}\n\tif( libfsntfs_internal_volume_open_read(\n\t     internal_volume,\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#endif\n\tinternal_volume->file_io_handle                   = file_io_handle;\n\tinternal_volume->file_io_handle_opened_in_library = file_io_handle_opened_in_library;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tinternal_volume->file_io_handle                   = NULL;\n\t\tinternal_volume->file_io_handle_opened_in_library = 0;\n\n\t\tgoto on_error;\n\t}\n#endif\n\treturn( 1 );\n\non_error:\n\tif( file_io_handle_opened_in_library != 0 )\n\t{\n\t\tlibbfio_handle_close(\n\t\t file_io_handle,\n\t\t error );\n\t}\n\treturn( -1 );\n}\n\n/* Closes a volume\n * Returns 0 if successful or -1 on error\n */\nint libfsntfs_volume_close(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_close\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( internal_volume->file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid volume - missing file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tif( internal_volume->file_io_handle_created_in_library != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_read_offsets(\n\t\t\t     internal_volume->file_io_handle,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print the read offsets.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( internal_volume->file_io_handle_opened_in_library != 0 )\n\t{\n\t\tif( libbfio_handle_close(\n\t\t     internal_volume->file_io_handle,\n\t\t     error ) != 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t\t \"%s: unable to close file IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tinternal_volume->file_io_handle_opened_in_library = 0;\n\t}\n\tif( internal_volume->file_io_handle_created_in_library != 0 )\n\t{\n\t\tif( libbfio_handle_free(\n\t\t     &( internal_volume->file_io_handle ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file IO handle.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\tinternal_volume->file_io_handle_created_in_library = 0;\n\t}\n\tinternal_volume->file_io_handle = NULL;\n\n\tif( libfsntfs_io_handle_clear(\n\t     internal_volume->io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to clear IO handle.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\tif( internal_volume->volume_header != NULL )\n\t{\n\t\tif( libfsntfs_volume_header_free(\n\t\t     &( internal_volume->volume_header ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume header.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_volume->volume_mft_entry != NULL )\n\t{\n\t\tif( libfsntfs_mft_entry_free(\n\t\t     &( internal_volume->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume MFT entry.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_volume->volume_information_attribute != NULL )\n\t{\n\t\tif( libfsntfs_internal_attribute_free(\n\t\t     (libfsntfs_internal_attribute_t **) &( internal_volume->volume_information_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_volume->volume_name_attribute != NULL )\n\t{\n\t\tif( libfsntfs_internal_attribute_free(\n\t\t     (libfsntfs_internal_attribute_t **) &( internal_volume->volume_name_attribute ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n\tif( internal_volume->file_system != NULL )\n\t{\n\t\tif( libfsntfs_file_system_free(\n\t\t     &( internal_volume->file_system ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free file system.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Opens a volume for reading\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_internal_volume_open_read(\n     libfsntfs_internal_volume_t *internal_volume,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_internal_volume_open_read\";\n\toff64_t mft_offset    = 0;\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid internal volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_volume->io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid internal volume - missing IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_volume->volume_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid internal volume - volume header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_volume->file_system != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid internal volume - file system value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"Reading volume header:\\n\" );\n\t}\n#endif\n\tif( libfsntfs_volume_header_initialize(\n\t     &( internal_volume->volume_header ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create volume header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_read_file_io_handle(\n\t     internal_volume->volume_header,\n\t     file_io_handle,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read volume header at offset: 0 (0x00000000).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_get_bytes_per_sector(\n\t     internal_volume->volume_header,\n\t     &( internal_volume->io_handle->bytes_per_sector ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve bytes per sector.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_get_cluster_block_size(\n\t     internal_volume->volume_header,\n\t     &( internal_volume->io_handle->cluster_block_size ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve cluster block size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_get_mft_entry_size(\n\t     internal_volume->volume_header,\n\t     &( internal_volume->io_handle->mft_entry_size ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_get_index_entry_size(\n\t     internal_volume->volume_header,\n\t     &( internal_volume->io_handle->index_entry_size ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index entry size.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_volume_header_get_mft_offset(\n\t     internal_volume->volume_header,\n\t     &mft_offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT offset.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libfsntfs_file_system_initialize(\n\t     &( internal_volume->file_system ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file system.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( mft_offset < 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT offset value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"Reading MFT entry: 0 ($MFT):\\n\" );\n\t}\n#endif\n\tif( libfsntfs_file_system_read_mft(\n\t     internal_volume->file_system,\n\t     internal_volume->io_handle,\n\t     file_io_handle,\n\t     mft_offset,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read MFT (MFT entry: 0).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n/* TODO what about the mirror MFT ? */\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"Reading MFT entry: 6 ($Bitmap):\\n\" );\n\t}\n\tif( libfsntfs_file_system_read_bitmap(\n\t     internal_volume->file_system,\n\t     internal_volume->io_handle,\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read bitmap (MFT entry: 6).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"Reading MFT entry: 9 ($Secure):\\n\" );\n\t}\n#endif\n\tif( libfsntfs_file_system_read_security_descriptors(\n\t     internal_volume->file_system,\n\t     internal_volume->io_handle,\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read security descriptors (MFT entry: 9).\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( internal_volume->file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t\t &( internal_volume->file_system ),\n\t\t NULL );\n\t}\n\tif( internal_volume->volume_header != NULL )\n\t{\n\t\tlibfsntfs_volume_header_free(\n\t\t &( internal_volume->volume_header ),\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Determines if the volume has BitLocker Drive Encryption (BDE)\n * Returns 1 if the volume has BitLocker Drive Encryption, 0 if not or -1 on error\n */\nint libfsntfs_volume_has_bitlocker_drive_encryption(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_has_bitlocker_drive_encryption\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n/* TODO implement */\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Determines if the volume has Volume Shadow Snapshots (VSS)\n * Returns 1 if the volume has Volume Shadow Snapshots, 0 if not or -1 on error\n */\nint libfsntfs_volume_has_volume_shadow_snapshots(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_has_volume_shadow_snapshots\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n/* TODO implement */\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the $VOLUME_INFORMATION attribute from MFT entry 3\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_volume_get_volume_information_attribute(\n     libfsntfs_internal_volume_t *internal_volume,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_internal_volume_get_volume_information_attribute\";\n\tint result                               = 0;\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_volume->volume_mft_entry == NULL )\n\t{\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n\t\t     internal_volume->file_system,\n\t\t     internal_volume->file_io_handle,\n\t\t     LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME,\n\t\t     &( internal_volume->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( internal_volume->volume_information_attribute == NULL )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_volume_information_attribute(\n\t\t          internal_volume->volume_mft_entry,\n\t\t          &mft_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( libfsntfs_attribute_initialize(\n\t\t     &( internal_volume->volume_information_attribute ),\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_internal_attribute_read_value(\n\t\t     (libfsntfs_internal_attribute_t *) internal_volume->volume_information_attribute,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read value of $VOLUME_INFORMATION attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_volume->volume_information_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the $VOLUME_NAME attribute from MFT entry 3\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_internal_volume_get_volume_name_attribute(\n     libfsntfs_internal_volume_t *internal_volume,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tstatic char *function                    = \"libfsntfs_internal_volume_get_volume_name_attribute\";\n\tint result                               = 0;\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( internal_volume->volume_mft_entry == NULL )\n\t{\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index_no_cache(\n\t\t     internal_volume->file_system,\n\t\t     internal_volume->file_io_handle,\n\t\t     LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME,\n\t\t     &( internal_volume->volume_mft_entry ),\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %d.\",\n\t\t\t function,\n\t\t\t LIBFSNTFS_MFT_ENTRY_INDEX_VOLUME );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\tif( internal_volume->volume_name_attribute == NULL )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_volume_name_attribute(\n\t\t          internal_volume->volume_mft_entry,\n\t\t          &mft_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\treturn( 0 );\n\t\t}\n\t\tif( libfsntfs_attribute_initialize(\n\t\t     &( internal_volume->volume_name_attribute ),\n\t\t     mft_attribute,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( libfsntfs_internal_attribute_read_value(\n\t\t     (libfsntfs_internal_attribute_t *) internal_volume->volume_name_attribute,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read value of $VOLUME_NAME attribute.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\t*attribute = internal_volume->volume_name_attribute;\n\n\treturn( 1 );\n}\n\n/* Retrieves the bytes per sector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_bytes_per_sector(\n     libfsntfs_volume_t *volume,\n     uint16_t *bytes_per_sector,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_bytes_per_sector\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_volume_header_get_bytes_per_sector(\n\t     internal_volume->volume_header,\n\t     bytes_per_sector,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve bytes per sector.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the cluster block size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_cluster_block_size(\n     libfsntfs_volume_t *volume,\n     size32_t *cluster_block_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_cluster_block_size\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_volume_header_get_cluster_block_size(\n\t     internal_volume->volume_header,\n\t     cluster_block_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve cluster block size.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the MFT entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_mft_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *mft_entry_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_mft_entry_size\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_volume_header_get_mft_entry_size(\n\t     internal_volume->volume_header,\n\t     mft_entry_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry size.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the index entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_index_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *index_entry_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_index_entry_size\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_volume_header_get_index_entry_size(\n\t     internal_volume->volume_header,\n\t     index_entry_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve index entry size.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_utf8_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_utf8_name_size\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_name_attribute(\n\t          internal_volume,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t\t     volume_name_attribute,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-8 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_utf8_name(\n     libfsntfs_volume_t *volume,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_utf8_name\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_name_attribute(\n\t          internal_volume,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf8_name(\n\t\t     volume_name_attribute,\n\t\t     utf8_string,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_utf16_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_utf16_name_size\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_name_attribute(\n\t          internal_volume,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t\t     volume_name_attribute,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of UTF-16 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * This value is retrieved from the $VOLUME_NAME attribute of the $Volume metadata file\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_utf16_name(\n     libfsntfs_volume_t *volume,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_name_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_utf16_name\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_name_attribute(\n\t          internal_volume,\n\t          &volume_name_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume name attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_name_attribute_get_utf16_name(\n\t\t     volume_name_attribute,\n\t\t     utf16_string,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 name from volume name attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the format version\n * This value is retrieved from the $VOLUME_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_version(\n     libfsntfs_volume_t *volume,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_information_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume        = NULL;\n\tstatic char *function                               = \"libfsntfs_volume_get_version\";\n\tint result                                          = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_information_attribute(\n\t          internal_volume,\n\t          &volume_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_information_attribute_get_version(\n\t\t     volume_information_attribute,\n\t\t     major_version,\n\t\t     minor_version,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve version from volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the flags\n * This value is retrieved from the $VOLUME_INFORMATION attribute\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_flags(\n     libfsntfs_volume_t *volume,\n     uint16_t *flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_attribute_t *volume_information_attribute = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume        = NULL;\n\tstatic char *function                               = \"libfsntfs_volume_get_flags\";\n\tint result                                          = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_volume_information_attribute(\n\t          internal_volume,\n\t          &volume_information_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume information attribute.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tif( libfsntfs_volume_information_attribute_get_flags(\n\t\t     volume_information_attribute,\n\t\t     flags,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve flags from volume information attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the serial number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_serial_number(\n     libfsntfs_volume_t *volume,\n     uint64_t *serial_number,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_serial_number\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_volume_header_get_volume_serial_number(\n\t     internal_volume->volume_header,\n\t     serial_number,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve volume serial number.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the root directory file entry\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_root_directory(\n     libfsntfs_volume_t *volume,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_root_directory\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_file_entry_initialize(\n\t     file_entry,\n\t     internal_volume->io_handle,\n\t     internal_volume->file_io_handle,\n\t     internal_volume->file_system,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY,\n\t     NULL,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file entry from MFT entry: %d.\",\n\t\t function,\n\t\t LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the number of file entries (MFT entries)\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_number_of_file_entries(\n     libfsntfs_volume_t *volume,\n     uint64_t *number_of_file_entries,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_number_of_file_entries\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_file_system_get_number_of_mft_entries(\n\t     internal_volume->file_system,\n\t     number_of_file_entries,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve number of MFT entries.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_read(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for reading.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the file entry of a specific MFT entry index\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_get_file_entry_by_index(\n     libfsntfs_volume_t *volume,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_file_entry_by_index\";\n\tint result                                   = 1;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( libfsntfs_file_entry_initialize(\n\t     file_entry,\n\t     internal_volume->io_handle,\n\t     internal_volume->file_io_handle,\n\t     internal_volume->file_system,\n\t     mft_entry_index,\n\t     NULL,\n\t     0,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file entry with MFT entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t mft_entry_index );\n\n\t\tresult = -1;\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\treturn( result );\n}\n\n/* Retrieves the MFT entry for an UTF-8 encoded path\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * A new directory_entry is allocated if a match is found\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n     libfsntfs_internal_volume_t *internal_volume,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_mft_entry_t **mft_entry,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tlibfsntfs_directory_entry_t *safe_directory_entry          = NULL;\n\tconst uint8_t *utf8_string_segment                         = NULL;\n\tstatic char *function                                      = \"libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path\";\n\tlibuna_unicode_character_t unicode_character               = 0;\n\tsize_t utf8_string_index                                   = 0;\n\tsize_t utf8_string_segment_length                          = 0;\n\tuint64_t mft_entry_index                                   = 0;\n\tint result                                                 = 0;\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string_length > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-8 string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string_length > 0 )\n\t{\n\t\t/* Ignore a leading separator\n\t\t */\n\t\tif( utf8_string[ utf8_string_index ] == (uint8_t) LIBFSNTFS_SEPARATOR )\n\t\t{\n\t\t\tutf8_string_index++;\n\t\t}\n\t}\n\tif( libfsntfs_file_system_get_mft_entry_by_index(\n\t     internal_volume->file_system,\n\t     internal_volume->file_io_handle,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY,\n\t     mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: 5.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( utf8_string_length == 0 )\n\t || ( utf8_string_length == 1 ) )\n\t{\n\t\tresult = 1;\n\t}\n\telse while( utf8_string_index < utf8_string_length )\n\t{\n\t\tif( directory_entries_tree != NULL )\n\t\t{\n\t\t\tif( libfsntfs_directory_entries_tree_free(\n\t\t\t     &directory_entries_tree,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entries tree.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( libfsntfs_directory_entries_tree_initialize(\n\t\t     &directory_entries_tree,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create directory entries tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_directory_entries_tree_read_from_i30_index(\n\t\t     directory_entries_tree,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     *mft_entry,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read directory entries tree from MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tutf8_string_segment        = &( utf8_string[ utf8_string_index ] );\n\t\tutf8_string_segment_length = utf8_string_index;\n\n\t\twhile( utf8_string_index < utf8_string_length )\n\t\t{\n\t\t\tif( libuna_unicode_character_copy_from_utf8_rfc2279(\n\t\t\t     &unicode_character,\n\t\t\t     utf8_string,\n\t\t\t     utf8_string_length,\n\t\t\t     &utf8_string_index,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-8 string to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( ( unicode_character == (libuna_unicode_character_t) LIBFSNTFS_SEPARATOR )\n\t\t\t || ( unicode_character == 0 ) )\n\t\t\t{\n\t\t\t\tutf8_string_segment_length += 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tutf8_string_segment_length = utf8_string_index - utf8_string_segment_length;\n\n\t\tif( utf8_string_segment_length == 0 )\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( safe_directory_entry != NULL )\n\t\t\t{\n\t\t\t\tif( libfsntfs_directory_entry_free(\n\t\t\t\t     &safe_directory_entry,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t\t\t          directory_entries_tree,\n\t\t\t          internal_volume->file_io_handle,\n\t\t\t          utf8_string_segment,\n\t\t\t          utf8_string_segment_length,\n\t\t\t          &safe_directory_entry,\n\t\t\t          error );\n\t\t}\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve directory entry by UTF-8 name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_directory_entry_get_mft_entry_index(\n\t\t     safe_directory_entry,\n\t\t     &mft_entry_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index(\n\t\t     internal_volume->file_system,\n\t\t     internal_volume->file_io_handle,\n\t\t     mft_entry_index,\n\t\t     mft_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( result != 0 )\n\t{\n\t\t*directory_entry = safe_directory_entry;\n\t}\n\telse if( safe_directory_entry != NULL )\n\t{\n\t\tif( libfsntfs_directory_entry_free(\n\t\t     &safe_directory_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tif( libfsntfs_directory_entries_tree_free(\n\t\t     &directory_entries_tree,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free directory entries tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &safe_directory_entry,\n\t\t NULL );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\t*directory_entry = NULL;\n\n\treturn( -1 );\n}\n\n/* Retrieves the file entry for an UTF-8 encoded path\n * This function uses UTF-8 RFC 2279 (or 6-byte UTF-8) to support characters outside Unicode\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_volume_get_file_entry_by_utf8_path(\n     libfsntfs_volume_t *volume,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry             = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_file_entry_by_utf8_path\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          internal_volume,\n\t          utf8_string,\n\t          utf8_string_length,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT and directory entry by path.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\t/* file_entry takes over management of directory_entry\n\t\t */\n\t\tif( libfsntfs_file_entry_initialize(\n\t\t     file_entry,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     internal_volume->file_system,\n\t\t     (uint64_t) mft_entry->index,\n\t\t     directory_entry,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create file entry with MFT entry: %\" PRIu32 \".\",\n\t\t\t function,\n\t\t\t mft_entry->index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tif( directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Retrieves the MFT entry for an UTF-16 encoded path\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * A new directory_entry is allocated if a match is found\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n     libfsntfs_internal_volume_t *internal_volume,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_mft_entry_t **mft_entry,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tlibfsntfs_directory_entry_t *safe_directory_entry          = NULL;\n\tconst uint16_t *utf16_string_segment                       = NULL;\n\tstatic char *function                                      = \"libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path\";\n\tlibuna_unicode_character_t unicode_character               = 0;\n\tsize_t utf16_string_index                                  = 0;\n\tsize_t utf16_string_segment_length                         = 0;\n\tuint64_t mft_entry_index                                   = 0;\n\tint result                                                 = 0;\n\n\tif( internal_volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-16 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_string_length > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid UTF-16 string length value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( directory_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid directory entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf16_string_length > 0 )\n\t{\n\t\t/* Ignore a leading separator\n\t\t */\n\t\tif( utf16_string[ utf16_string_index ] == (uint16_t) LIBFSNTFS_SEPARATOR )\n\t\t{\n\t\t\tutf16_string_index++;\n\t\t}\n\t}\n\tif( libfsntfs_file_system_get_mft_entry_by_index(\n\t     internal_volume->file_system,\n\t     internal_volume->file_io_handle,\n\t     LIBFSNTFS_MFT_ENTRY_INDEX_ROOT_DIRECTORY,\n\t     mft_entry,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT entry: 5.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( ( utf16_string_length == 0 )\n\t || ( utf16_string_length == 1 ) )\n\t{\n\t\tresult = 1;\n\t}\n\telse while( utf16_string_index < utf16_string_length )\n\t{\n\t\tif( directory_entries_tree != NULL )\n\t\t{\n\t\t\tif( libfsntfs_directory_entries_tree_free(\n\t\t\t     &directory_entries_tree,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entries tree.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t}\n\t\tif( libfsntfs_directory_entries_tree_initialize(\n\t\t     &directory_entries_tree,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create directory entries tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_directory_entries_tree_read_from_i30_index(\n\t\t     directory_entries_tree,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     *mft_entry,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read directory entries tree from MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tutf16_string_segment        = &( utf16_string[ utf16_string_index ] );\n\t\tutf16_string_segment_length = utf16_string_index;\n\n\t\twhile( utf16_string_index < utf16_string_length )\n\t\t{\n\t\t\tif( libuna_unicode_character_copy_from_ucs2(\n\t\t\t     &unicode_character,\n\t\t\t     utf16_string,\n\t\t\t     utf16_string_length,\n\t\t\t     &utf16_string_index,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t\t \"%s: unable to copy UTF-16 string to Unicode character.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tif( ( unicode_character == (libuna_unicode_character_t) LIBFSNTFS_SEPARATOR )\n\t\t\t || ( unicode_character == 0 ) )\n\t\t\t{\n\t\t\t\tutf16_string_segment_length += 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tutf16_string_segment_length = utf16_string_index - utf16_string_segment_length;\n\n\t\tif( utf16_string_segment_length == 0 )\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( safe_directory_entry != NULL )\n\t\t\t{\n\t\t\t\tif( libfsntfs_directory_entry_free(\n\t\t\t\t     &safe_directory_entry,\n\t\t\t\t     error ) != 1 )\n\t\t\t\t{\n\t\t\t\t\tlibcerror_error_set(\n\t\t\t\t\t error,\n\t\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t\t\t function );\n\n\t\t\t\t\tgoto on_error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t\t\t          directory_entries_tree,\n\t\t\t          internal_volume->file_io_handle,\n\t\t\t          utf16_string_segment,\n\t\t\t          utf16_string_segment_length,\n\t\t\t          &safe_directory_entry,\n\t\t\t          error );\n\t\t}\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve directory entry by UTF-16 name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( libfsntfs_directory_entry_get_mft_entry_index(\n\t\t     safe_directory_entry,\n\t\t     &mft_entry_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry index.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( libfsntfs_file_system_get_mft_entry_by_index(\n\t\t     internal_volume->file_system,\n\t\t     internal_volume->file_io_handle,\n\t\t     mft_entry_index,\n\t\t     mft_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve MFT entry: %\" PRIu64 \".\",\n\t\t\t function,\n\t\t\t mft_entry_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( result != 0 )\n\t{\n\t\t*directory_entry = safe_directory_entry;\n\t}\n\telse if( safe_directory_entry != NULL )\n\t{\n\t\tif( libfsntfs_directory_entry_free(\n\t\t     &safe_directory_entry,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tif( libfsntfs_directory_entries_tree_free(\n\t\t     &directory_entries_tree,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t \"%s: unable to free directory entries tree.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\treturn( result );\n\non_error:\n\tif( safe_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &safe_directory_entry,\n\t\t NULL );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\t*directory_entry = NULL;\n\n\treturn( -1 );\n}\n\n/* Retrieves the file entry for an UTF-16 encoded path\n * This function uses UCS-2 (with surrogates) to support characters outside Unicode\n * Returns 1 if successful, 0 if no such file entry or -1 on error\n */\nint libfsntfs_volume_get_file_entry_by_utf16_path(\n     libfsntfs_volume_t *volume,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry             = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_file_entry_by_utf16_path\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n\tif( file_entry == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_entry != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file entry value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          internal_volume,\n\t          utf16_string,\n\t          utf16_string_length,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve MFT and directory entry by path.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\t/* file_entry takes over management of directory_entry\n\t\t */\n\t\tif( libfsntfs_file_entry_initialize(\n\t\t     file_entry,\n\t\t     internal_volume->io_handle,\n\t\t     internal_volume->file_io_handle,\n\t\t     internal_volume->file_system,\n\t\t     (uint64_t) mft_entry->index,\n\t\t     directory_entry,\n\t\t     0,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t \"%s: unable to create file entry with MFT entry: %\" PRIu32 \".\",\n\t\t\t function,\n\t\t\t mft_entry->index );\n\n\t\t\tresult = -1;\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tif( directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n/* Retrieves the USN change journal\n * Returns 1 if successful, 0 if not available or -1 on error\n */\nint libfsntfs_volume_get_usn_change_journal(\n     libfsntfs_volume_t *volume,\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_internal_volume_t *internal_volume = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute    = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry             = NULL;\n\tstatic char *function                        = \"libfsntfs_volume_get_usn_change_journal\";\n\tint result                                   = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_volume = (libfsntfs_internal_volume_t *) volume;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_grab_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to grab read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          internal_volume,\n\t          (uint8_t *) \"\\\\$Extend\\\\$UsnJrnl\",\n\t          17,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve \\\\$Extend\\\\$UsnJrnl MFT and directory entry by path.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\telse if( result != 0 )\n\t{\n\t\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name(\n\t\t          mft_entry,\n\t\t          (uint8_t *) \"$J\",\n\t\t          2,\n\t\t          &data_attribute,\n\t\t          error );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve $J data attribute.\",\n\t\t\t function );\n\n\t\t\tresult = -1;\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\t/* libfsntfs_usn_change_journal_initialize takes over management of directory_entry\n\t\t\t */\n\t\t\tif( libfsntfs_usn_change_journal_initialize(\n\t\t\t     usn_change_journal,\n\t\t\t     internal_volume->io_handle,\n\t\t\t     internal_volume->file_io_handle,\n\t\t\t     directory_entry,\n\t\t\t     data_attribute,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t\t\t \"%s: unable to create USN change journal.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( libfsntfs_directory_entry_free(\n\t\t\t     &directory_entry,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t\t\t \"%s: unable to free directory entry.\",\n\t\t\t\t function );\n\n\t\t\t\tresult = -1;\n\t\t\t}\n\t\t}\n\t}\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\tif( libcthreads_read_write_lock_release_for_write(\n\t     internal_volume->read_write_lock,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to release read/write lock for writing.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\tif( result == - 1 )\n\t{\n\t\tif( directory_entry != NULL )\n\t\t{\n\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t &directory_entry,\n\t\t\t NULL );\n\t\t}\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume.h",
    "content": "/*\n * Volume functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_H )\n#define _LIBFSNTFS_VOLUME_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_directory_entry.h\"\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_file_system.h\"\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_mft.h\"\n#include \"libfsntfs_mft_entry.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_volume_header.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_internal_volume libfsntfs_internal_volume_t;\n\nstruct libfsntfs_internal_volume\n{\n\t/* The IO handle\n\t */\n\tlibfsntfs_io_handle_t *io_handle;\n\n\t/* The file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n\n\t/* Value to indicate if the file IO handle was created inside the library\n\t */\n\tuint8_t file_io_handle_created_in_library;\n\n\t/* Value to indicate if the file IO handle was opened inside the library\n\t */\n\tuint8_t file_io_handle_opened_in_library;\n\n\t/* The volume serial number\n\t */\n\tuint64_t volume_serial_number;\n\n\t/* The volume header\n\t */\n\tlibfsntfs_volume_header_t *volume_header;\n\n\t/* The MFT\n\t */\n\tlibfsntfs_mft_t *mft;\n\n\t/* The volume MFT entry\n\t */\n\tlibfsntfs_mft_entry_t *volume_mft_entry;\n\n\t/* The volume information ($VOLUME_INFORMATION) attribute\n\t */\n\tlibfsntfs_attribute_t *volume_information_attribute;\n\n\t/* The volume name ($VOLUME_NAME) attribute\n\t */\n\tlibfsntfs_attribute_t *volume_name_attribute;\n\n\t/* The file system\n\t */\n\tlibfsntfs_file_system_t *file_system;\n\n#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )\n\t/* The read/write lock\n\t */\n\tlibcthreads_read_write_lock_t *read_write_lock;\n#endif\n};\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_initialize(\n     libfsntfs_volume_t **volume,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_free(\n     libfsntfs_volume_t **volume,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_signal_abort(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open(\n     libfsntfs_volume_t *volume,\n     const char *filename,\n     int access_flags,\n     libcerror_error_t **error );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_wide(\n     libfsntfs_volume_t *volume,\n     const wchar_t *filename,\n     int access_flags,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_close(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_open_read(\n     libfsntfs_internal_volume_t *internal_volume,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_read_bitmap(\n     libfsntfs_internal_volume_t *internal_volume,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_has_bitlocker_drive_encryption(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_has_volume_shadow_snapshots(\n     libfsntfs_volume_t *volume,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_get_volume_information_attribute(\n     libfsntfs_internal_volume_t *internal_volume,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_get_volume_name_attribute(\n     libfsntfs_internal_volume_t *internal_volume,\n     libfsntfs_attribute_t **attribute,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_bytes_per_sector(\n     libfsntfs_volume_t *volume,\n     uint16_t *bytes_per_sector,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_cluster_block_size(\n     libfsntfs_volume_t *volume,\n     size32_t *cluster_block_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_mft_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *mft_entry_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_index_entry_size(\n     libfsntfs_volume_t *volume,\n     size32_t *index_entry_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf8_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf8_name(\n     libfsntfs_volume_t *volume,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf16_name_size(\n     libfsntfs_volume_t *volume,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_utf16_name(\n     libfsntfs_volume_t *volume,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_version(\n     libfsntfs_volume_t *volume,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_flags(\n     libfsntfs_volume_t *volume,\n     uint16_t *flags,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_serial_number(\n     libfsntfs_volume_t *volume,\n     uint64_t *serial_number,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_root_directory(\n     libfsntfs_volume_t *volume,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_number_of_file_entries(\n     libfsntfs_volume_t *volume,\n     uint64_t *number_of_file_entries,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_index(\n     libfsntfs_volume_t *volume,\n     uint64_t mft_entry_index,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n     libfsntfs_internal_volume_t *internal_volume,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_mft_entry_t **mft_entry,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_utf8_path(\n     libfsntfs_volume_t *volume,\n     const uint8_t *utf8_string,\n     size_t utf8_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nint libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n     libfsntfs_internal_volume_t *internal_volume,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_mft_entry_t **mft_entry,\n     libfsntfs_directory_entry_t **directory_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_file_entry_by_utf16_path(\n     libfsntfs_volume_t *volume,\n     const uint16_t *utf16_string,\n     size_t utf16_string_length,\n     libfsntfs_file_entry_t **file_entry,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_get_usn_change_journal(\n     libfsntfs_volume_t *volume,\n     libfsntfs_usn_change_journal_t **usn_change_journal,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_header.c",
    "content": "/*\n * The NTFS volume header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_io_handle.h\"\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_volume_header.h\"\n\n#include \"fsntfs_index.h\"\n#include \"fsntfs_mft_entry.h\"\n#include \"fsntfs_volume_header.h\"\n\n/* Creates a volume header\n * Make sure the value volume_header is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_initialize(\n     libfsntfs_volume_header_t **volume_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_initialize\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_header != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume header value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*volume_header = memory_allocate_structure(\n\t                  libfsntfs_volume_header_t );\n\n\tif( *volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create volume header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *volume_header,\n\t     0,\n\t     sizeof( libfsntfs_volume_header_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear volume header.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *volume_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *volume_header );\n\n\t\t*volume_header = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees a volume header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_free(\n     libfsntfs_volume_header_t **volume_header,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_free\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_header != NULL )\n\t{\n\t\tmemory_free(\n\t\t *volume_header );\n\n\t\t*volume_header = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the volume header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_read_data(\n     libfsntfs_volume_header_t *volume_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function                    = \"libfsntfs_volume_header_read_data\";\n\tuint64_t mft_cluster_block_number        = 0;\n\tuint64_t mirror_mft_cluster_block_number = 0;\n\tuint64_t volume_size                     = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tuint32_t value_32bit                     = 0;\n\tuint16_t value_16bit                     = 0;\n#endif\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( data_size < sizeof( fsntfs_volume_header_t ) )\n\t || ( data_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: volume header data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t sizeof( fsntfs_volume_header_t ),\n\t\t LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA );\n\t}\n#endif\n\tif( memory_compare(\n\t     ( (fsntfs_volume_header_t *) data )->file_system_signature,\n\t     fsntfs_volume_file_system_signature,\n\t     8 ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: invalid volume system signature.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->bytes_per_sector,\n\t volume_header->bytes_per_sector );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->total_number_of_sectors,\n\t volume_size );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->mft_cluster_block_number,\n\t mft_cluster_block_number );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->mirror_mft_cluster_block_number,\n\t mirror_mft_cluster_block_number );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->mft_entry_size,\n\t volume_header->mft_entry_size );\n\n\tbyte_stream_copy_to_uint32_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->index_entry_size,\n\t volume_header->index_entry_size );\n\n\tbyte_stream_copy_to_uint64_little_endian(\n\t ( (fsntfs_volume_header_t *) data )->volume_serial_number,\n\t volume_header->volume_serial_number );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: boot entry point\\t\\t\\t: 0x%02x 0x%02x 0x%02x\\n\",\n\t\t function,\n\t\t ( (fsntfs_volume_header_t *) data )->boot_entry_point[ 0 ],\n\t\t ( (fsntfs_volume_header_t *) data )->boot_entry_point[ 1 ],\n\t\t ( (fsntfs_volume_header_t *) data )->boot_entry_point[ 2 ] );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: file system signature\\t\\t: %c%c%c%c%c%c%c%c\\n\",\n\t\t function,\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 0 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 1 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 2 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 3 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 4 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 5 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 6 ],\n\t\t ( (fsntfs_volume_header_t *) data )->file_system_signature[ 7 ] );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: bytes per sector\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t volume_header->bytes_per_sector );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: sectors per cluster block\\t\\t: %\" PRIu8 \"\\n\",\n\t\t function,\n\t\t ( (fsntfs_volume_header_t *) data )->sectors_per_cluster_block );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown1\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t ( (fsntfs_volume_header_t *) data )->unknown1,\n\t\t 7,\n\t\t 0 );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: media descriptor\\t\\t\\t: 0x%02\" PRIx8 \"\\n\",\n\t\t function,\n\t\t ( (fsntfs_volume_header_t *) data )->media_descriptor );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->unknown2,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown2\\t\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->sectors_per_track,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: sectors per track\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->number_of_heads,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: number of heads\\t\\t\\t: %\" PRIu16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->number_of_hidden_sectors,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: number of hidden sectors\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->unknown3,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown3\\t\\t\\t\\t: 0x%08\" PRIx32 \" (%\" PRIu32 \")\\n\",\n\t\t function,\n\t\t value_32bit,\n\t\t value_32bit );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->unknown4,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown4\\t\\t\\t\\t: 0x%08\" PRIx32 \" (%\" PRIu32 \")\\n\",\n\t\t function,\n\t\t value_32bit,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: total number of sectors\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t volume_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: MFT cluster block number\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t mft_cluster_block_number );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: mirror MFT cluster block number\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t mirror_mft_cluster_block_number );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: MFT entry size\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t volume_header->mft_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: index entry size\\t\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t volume_header->index_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: volume serial number\\t\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t volume_header->volume_serial_number );\n\n\t\tbyte_stream_copy_to_uint32_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->checksum,\n\t\t value_32bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: checksum\\t\\t\\t\\t: 0x%08\" PRIx32 \"\\n\",\n\t\t function,\n\t\t value_32bit );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: bootcode\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t ( (fsntfs_volume_header_t *) data )->bootcode,\n\t\t 426,\n\t\t 0 );\n\n\t\tbyte_stream_copy_to_uint16_little_endian(\n\t\t ( (fsntfs_volume_header_t *) data )->sector_signature,\n\t\t value_16bit );\n\t\tlibcnotify_printf(\n\t\t \"%s: sector signature\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t value_16bit );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\tif( ( volume_header->bytes_per_sector != 256 )\n\t && ( volume_header->bytes_per_sector != 512 )\n\t && ( volume_header->bytes_per_sector != 1024 )\n\t && ( volume_header->bytes_per_sector != 2048 )\n\t && ( volume_header->bytes_per_sector != 4096 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported bytes per sector: %\" PRIu16 \".\",\n\t\t function,\n\t\t volume_header->bytes_per_sector );\n\n\t\treturn( -1 );\n\t}\n\tvolume_header->cluster_block_size = ( (fsntfs_volume_header_t *) data )->sectors_per_cluster_block;\n\n\tif( volume_header->cluster_block_size > 128 )\n\t{\n\t\t/* The size is calculated as: 2 ^ ( 256 - value )\n\t\t */\n\t\tvolume_header->cluster_block_size = 256 - volume_header->cluster_block_size;\n\n\t\tif( volume_header->cluster_block_size > 12 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid cluster block size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tvolume_header->cluster_block_size = 1 << volume_header->cluster_block_size;\n\t}\n\tvolume_header->cluster_block_size *= volume_header->bytes_per_sector;\n\n\tif( ( volume_header->cluster_block_size != 256 )\n\t && ( volume_header->cluster_block_size != 512 )\n\t && ( volume_header->cluster_block_size != 1024 )\n\t && ( volume_header->cluster_block_size != 2048 )\n\t && ( volume_header->cluster_block_size != 4096 )\n\t && ( volume_header->cluster_block_size != 8192 )\n\t && ( volume_header->cluster_block_size != 16384 )\n\t && ( volume_header->cluster_block_size != 32768 )\n\t && ( volume_header->cluster_block_size != 65536 )\n\t && ( volume_header->cluster_block_size != 131072 )\n\t && ( volume_header->cluster_block_size != 262144 )\n\t && ( volume_header->cluster_block_size != 524288 )\n\t && ( volume_header->cluster_block_size != 1048576 )\n\t && ( volume_header->cluster_block_size != 2097152 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported cluster block size: %\" PRIu32 \".\",\n\t\t function,\n\t\t volume_header->cluster_block_size );\n\n\t\treturn( -1 );\n\t}\n\tif( ( volume_header->mft_entry_size == 0 )\n\t || ( volume_header->mft_entry_size > 255 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported MFT entry size: %\" PRIu32 \".\",\n\t\t function,\n\t\t volume_header->mft_entry_size );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_header->mft_entry_size < 128 )\n\t{\n\t\tif( volume_header->mft_entry_size >= (size32_t) ( ( UINT32_MAX / volume_header->cluster_block_size ) + 1 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid MFT entry size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tvolume_header->mft_entry_size *= volume_header->cluster_block_size;\n\t}\n\telse\n\t{\n\t\t/* The size is calculated as: 2 ^ ( 256 - value )\n\t\t */\n\t\tvolume_header->mft_entry_size = 256 - volume_header->mft_entry_size;\n\n\t\tif( volume_header->mft_entry_size >= 32 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid MFT entry size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tvolume_header->mft_entry_size = (uint32_t) 1UL << volume_header->mft_entry_size;\n\t}\n\tif( ( (size_t) volume_header->mft_entry_size < sizeof( fsntfs_mft_entry_header_t ) )\n\t || ( volume_header->mft_entry_size >= (uint32_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid MFT entry size: %\" PRIu32 \" value out of bounds.\",\n\t\t function,\n\t\t volume_header->mft_entry_size );\n\n\t\treturn( -1 );\n\t}\n\tif( ( volume_header->index_entry_size == 0 )\n\t || ( volume_header->index_entry_size > 255 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported index entry size: %\" PRIu32 \".\",\n\t\t function,\n\t\t volume_header->index_entry_size );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_header->index_entry_size < 128 )\n\t{\n\t\tif( volume_header->index_entry_size >= (size32_t) ( ( UINT32_MAX / volume_header->cluster_block_size ) + 1 ) )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid index entry size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tvolume_header->index_entry_size *= volume_header->cluster_block_size;\n\t}\n\telse\n\t{\n\t\t/* The size is calculated as: 2 ^ ( 256 - value )\n\t\t */\n\t\tvolume_header->index_entry_size = 256 - volume_header->index_entry_size;\n\n\t\tif( volume_header->index_entry_size >= 32 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t\t \"%s: invalid index entry size value out of bounds.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tvolume_header->index_entry_size = (uint32_t) 1UL << volume_header->index_entry_size;\n\t}\n\tif( (size_t) volume_header->index_entry_size < sizeof( fsntfs_index_entry_header_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid index entry size: %\" PRIu32 \" value out of bounds.\",\n\t\t function,\n\t\t volume_header->index_entry_size );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_size > (size64_t) ( ( UINT64_MAX / volume_header->bytes_per_sector ) + 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid volume size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tvolume_size *= volume_header->bytes_per_sector;\n\tvolume_size += volume_header->bytes_per_sector;\n\n\tvolume_header->mft_offset = mft_cluster_block_number\n\t                          * volume_header->cluster_block_size;\n\n\tvolume_header->mirror_mft_offset = mirror_mft_cluster_block_number\n\t                                 * volume_header->cluster_block_size;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated cluster block size\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t volume_header->cluster_block_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated MFT entry size\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t volume_header->mft_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated index entry size\\t\\t: %\" PRIu32 \"\\n\",\n\t\t function,\n\t\t volume_header->index_entry_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated volume size\\t\\t: %\" PRIu64 \"\\n\",\n\t\t function,\n\t\t volume_size );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated MFT offset\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t volume_header->mft_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: calculated mirror MFT offset\\t\\t: 0x%08\" PRIx64 \"\\n\",\n\t\t function,\n\t\t volume_header->mirror_mft_offset );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n}\n\n/* Reads the volume header\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_read_file_io_handle(\n     libfsntfs_volume_header_t *volume_header,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     libcerror_error_t **error )\n{\n\tuint8_t volume_header_data[ sizeof( fsntfs_volume_header_t ) ];\n\n\tstatic char *function = \"libfsntfs_volume_header_read_file_io_handle\";\n\tssize_t read_count    = 0;\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: reading volume header at offset: %\" PRIi64 \" (0x%08\" PRIx64 \")\\n\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset );\n\t}\n#endif\n\tread_count = libbfio_handle_read_buffer_at_offset(\n\t              file_io_handle,\n\t              volume_header_data,\n\t              sizeof( fsntfs_volume_header_t ),\n\t              file_offset,\n\t              error );\n\n\tif( read_count != (ssize_t) sizeof( fsntfs_volume_header_t ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read volume header data at offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t file_offset,\n\t\t file_offset );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_header_read_data(\n\t     volume_header,\n\t     volume_header_data,\n\t     sizeof( fsntfs_volume_header_t ),\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read volume header data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the bytes per sector\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_bytes_per_sector(\n     libfsntfs_volume_header_t *volume_header,\n     uint16_t *bytes_per_sector,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_bytes_per_sector\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( bytes_per_sector == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid bytes per sector.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*bytes_per_sector = volume_header->bytes_per_sector;\n\n\treturn( 1 );\n}\n\n/* Retrieves the cluster block size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_cluster_block_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *cluster_block_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_cluster_block_size\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( cluster_block_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid cluster block size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*cluster_block_size = volume_header->cluster_block_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the MFT entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_mft_entry_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *mft_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_mft_entry_size\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_entry_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_entry_size = volume_header->mft_entry_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the index entry size\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_index_entry_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *index_entry_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_index_entry_size\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( index_entry_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid index entry size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*index_entry_size = volume_header->index_entry_size;\n\n\treturn( 1 );\n}\n\n/* Retrieves the volume serial number\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_volume_serial_number(\n     libfsntfs_volume_header_t *volume_header,\n     uint64_t *volume_serial_number,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_volume_serial_number\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_serial_number == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume serial number.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*volume_serial_number = volume_header->volume_serial_number;\n\n\treturn( 1 );\n}\n\n/* Retrieves the MFT offset\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_header_get_mft_offset(\n     libfsntfs_volume_header_t *volume_header,\n     off64_t *mft_offset,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_header_get_mft_offset\";\n\n\tif( volume_header == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume header.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( mft_offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*mft_offset = volume_header->mft_offset;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_header.h",
    "content": "/*\n * The NTFS volume header functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_HEADER_H )\n#define _LIBFSNTFS_VOLUME_HEADER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libbfio.h\"\n#include \"libfsntfs_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_volume_header libfsntfs_volume_header_t;\n\nstruct libfsntfs_volume_header\n{\n\t/* The cluster block size\n\t */\n\tsize32_t cluster_block_size;\n\n\t/* The number of bytes per sector\n\t */\n\tuint16_t bytes_per_sector;\n\n\t/* The volume serial number\n\t */\n\tuint64_t volume_serial_number;\n\n\t/* The MFT entry size\n\t */\n\tuint32_t mft_entry_size;\n\n\t/* The index entry size\n\t */\n\tuint32_t index_entry_size;\n\n\t/* The offset of the MFT\n\t */\n\toff64_t mft_offset;\n\n\t/* The offset of the mirror MFT\n\t */\n\toff64_t mirror_mft_offset;\n};\n\nint libfsntfs_volume_header_initialize(\n     libfsntfs_volume_header_t **volume_header,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_free(\n     libfsntfs_volume_header_t **volume_header,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_read_data(\n     libfsntfs_volume_header_t *volume_header,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_read_file_io_handle(\n     libfsntfs_volume_header_t *volume_header,\n     libbfio_handle_t *file_io_handle,\n     off64_t file_offset,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_bytes_per_sector(\n     libfsntfs_volume_header_t *volume_header,\n     uint16_t *bytes_per_sector,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_cluster_block_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *cluster_block_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_mft_entry_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *mft_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_index_entry_size(\n     libfsntfs_volume_header_t *volume_header,\n     size32_t *index_entry_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_volume_serial_number(\n     libfsntfs_volume_header_t *volume_header,\n     uint64_t *volume_serial_number,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_header_get_mft_offset(\n     libfsntfs_volume_header_t *volume_header,\n     off64_t *mft_offset,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_HEADER_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_information_attribute.c",
    "content": "/*\n * Volume information attribute ($VOLUME_INFORMATION) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_volume_information_attribute.h\"\n#include \"libfsntfs_volume_information_values.h\"\n\n/* Retrieves the version\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_attribute_get_version(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute               = NULL;\n\tlibfsntfs_volume_information_values_t *volume_information_values = NULL;\n\tstatic char *function                                            = \"libfsntfs_volume_information_attribute_get_version\";\n\tuint32_t attribute_type                                          = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tvolume_information_values = (libfsntfs_volume_information_values_t *) internal_attribute->value;\n\n\tif( major_version == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid major version.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( minor_version == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid minor version.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*major_version = volume_information_values->major_version;\n\t*minor_version = volume_information_values->minor_version;\n\n\treturn( 1 );\n}\n\n/* Retrieves the flags\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_attribute_get_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *flags,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute               = NULL;\n\tlibfsntfs_volume_information_values_t *volume_information_values = NULL;\n\tstatic char *function                                            = \"libfsntfs_volume_information_attribute_get_flags\";\n\tuint32_t attribute_type                                          = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( internal_attribute->value == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid attribute - missing value.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tvolume_information_values = (libfsntfs_volume_information_values_t *) internal_attribute->value;\n\n\tif( flags == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*flags = volume_information_values->flags;\n\n\treturn( 1 );\n}\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_information_attribute.h",
    "content": "/*\n * Volume information attribute ($VOLUME_INFORMATION) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H )\n#define _LIBFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_information_attribute_get_version(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *major_version,\n     uint8_t *minor_version,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_information_attribute_get_flags(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *flags,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_information_values.c",
    "content": "/*\n * Volume information attribute ($VOLUME_INFORMATION) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_volume_information_values.h\"\n\n#include \"fsntfs_volume_information.h\"\n\n/* Creates volume information values\n * Make sure the value volume_information_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_values_initialize(\n     libfsntfs_volume_information_values_t **volume_information_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_information_values_initialize\";\n\n\tif( volume_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_information_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume information values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*volume_information_values = memory_allocate_structure(\n\t                              libfsntfs_volume_information_values_t );\n\n\tif( *volume_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create volume information values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *volume_information_values,\n\t     0,\n\t     sizeof( libfsntfs_volume_information_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear volume information values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *volume_information_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *volume_information_values );\n\n\t\t*volume_information_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees volume information values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_values_free(\n     libfsntfs_volume_information_values_t **volume_information_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_information_values_free\";\n\n\tif( volume_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_information_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *volume_information_values );\n\n\t\t*volume_information_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the volume information values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_values_read_data(\n     libfsntfs_volume_information_values_t *volume_information_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_information_values_read_data\";\n\n\tif( volume_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( data_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: volume information data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\tif( data_size != 12 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported volume information data size: %\" PRIzd \"\\n\",\n\t\t function,\n\t\t data_size );\n\n\t\treturn( -1 );\n\t}\n\tvolume_information_values->major_version = ( (fsntfs_volume_information_t *) data )->major_version;\n\tvolume_information_values->minor_version = ( (fsntfs_volume_information_t *) data )->minor_version;\n\n\tbyte_stream_copy_to_uint16_little_endian(\n\t ( (fsntfs_volume_information_t *) data )->flags,\n\t volume_information_values->flags );\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: unknown1:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t ( (fsntfs_volume_information_t *) data )->unknown1,\n\t\t 8,\n\t\t 0 );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: major version\\t\\t: %\" PRIu8 \"\\n\",\n\t\t function,\n\t\t volume_information_values->major_version );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: minor version\\t\\t: %\" PRIu8 \"\\n\",\n\t\t function,\n\t\t volume_information_values->minor_version );\n\n\t\tlibcnotify_printf(\n\t\t \"%s: flags\\t\\t\\t: 0x%04\" PRIx16 \"\\n\",\n\t\t function,\n\t\t volume_information_values->flags );\n\t\tlibfsntfs_debug_print_volume_information_flags(\n\t\t volume_information_values->flags );\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\n\t\tlibcnotify_printf(\n\t\t \"\\n\" );\n\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\n\treturn( 1 );\n}\n\n/* Reads the volume information values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_information_values_read_from_mft_attribute(\n     libfsntfs_volume_information_values_t *volume_information_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_volume_information_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( volume_information_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_information_values_read_data(\n\t     volume_information_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read volume information values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_information_values.h",
    "content": "/*\n * Volume information attribute ($VOLUME_INFORMATION) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_INFORMATION_VALUES_H )\n#define _LIBFSNTFS_VOLUME_INFORMATION_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_volume_information_values libfsntfs_volume_information_values_t;\n\nstruct libfsntfs_volume_information_values\n{\n\t/* The major version (number)\n\t */\n\tuint8_t major_version;\n\n\t/* The minor version (number)\n\t */\n\tuint8_t minor_version;\n\n\t/* The flags\n\t */\n\tuint16_t flags;\n};\n\nint libfsntfs_volume_information_values_initialize(\n     libfsntfs_volume_information_values_t **volume_information_values,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_information_values_free(\n     libfsntfs_volume_information_values_t **volume_information_values,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_information_values_read_data(\n     libfsntfs_volume_information_values_t *volume_information_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_information_values_read_from_mft_attribute(\n     libfsntfs_volume_information_values_t *volume_information_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_INFORMATION_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_name_attribute.c",
    "content": "/*\n * Volume name attribute ($VOLUME_NAME) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"libfsntfs_attribute.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcthreads.h\"\n#include \"libfsntfs_types.h\"\n#include \"libfsntfs_volume_name_attribute.h\"\n#include \"libfsntfs_volume_name_values.h\"\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_volume_name_attribute_get_utf8_name_size\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_name_values_get_utf8_name_size(\n\t     (libfsntfs_volume_name_values_t *) internal_attribute->value,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-8 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_volume_name_attribute_get_utf8_name\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_name_values_get_utf8_name(\n\t     (libfsntfs_volume_name_values_t *) internal_attribute->value,\n\t     utf8_string,\n\t     utf8_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-8 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_volume_name_attribute_get_utf16_name_size\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_name_values_get_utf16_name_size(\n\t     (libfsntfs_volume_name_values_t *) internal_attribute->value,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of UTF-16 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tlibfsntfs_internal_attribute_t *internal_attribute = NULL;\n\tstatic char *function                              = \"libfsntfs_volume_name_attribute_get_utf16_name\";\n\tuint32_t attribute_type                            = 0;\n\n\tif( attribute == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tinternal_attribute = (libfsntfs_internal_attribute_t *) attribute;\n\n\tif( libfsntfs_internal_attribute_get_type(\n\t     internal_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_name_values_get_utf16_name(\n\t     (libfsntfs_volume_name_values_t *) internal_attribute->value,\n\t     utf16_string,\n\t     utf16_string_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve UTF-16 name.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_name_attribute.h",
    "content": "/*\n * Volume name attribute ($VOLUME_NAME) functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_NAME_ATTRIBUTE_H )\n#define _LIBFSNTFS_VOLUME_NAME_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_extern.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_types.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_NAME_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_name_values.c",
    "content": "/*\n * Volume name attribute ($VOLUME_NAME) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#include \"libfsntfs_debug.h\"\n#include \"libfsntfs_definitions.h\"\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_libcnotify.h\"\n#include \"libfsntfs_libuna.h\"\n#include \"libfsntfs_mft_attribute.h\"\n#include \"libfsntfs_volume_name_values.h\"\n\n/* Creates volume name values\n * Make sure the value volume_name_values is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_initialize(\n     libfsntfs_volume_name_values_t **volume_name_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_initialize\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_name_values != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume name values value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*volume_name_values = memory_allocate_structure(\n\t                       libfsntfs_volume_name_values_t );\n\n\tif( *volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create volume name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *volume_name_values,\n\t     0,\n\t     sizeof( libfsntfs_volume_name_values_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear volume name values.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *volume_name_values != NULL )\n\t{\n\t\tmemory_free(\n\t\t *volume_name_values );\n\n\t\t*volume_name_values = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Frees volume name values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_free(\n     libfsntfs_volume_name_values_t **volume_name_values,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_free\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *volume_name_values != NULL )\n\t{\n\t\tif( ( *volume_name_values )->name != NULL )\n\t\t{\n\t\t\tmemory_free(\n\t\t\t ( *volume_name_values )->name );\n\t\t}\n\t\tmemory_free(\n\t\t *volume_name_values );\n\n\t\t*volume_name_values = NULL;\n\t}\n\treturn( 1 );\n}\n\n/* Reads the volume name values\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_read_data(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_read_data\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_name_values->name != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid volume name values - name already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* The volume name attribute can contain an empty volume name\n\t */\n\tif( data_size > 0 )\n\t{\n\t\tif( data == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: invalid data.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( data_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid data size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\tif( libcnotify_verbose != 0 )\n\t{\n\t\tlibcnotify_printf(\n\t\t \"%s: volume name data:\\n\",\n\t\t function );\n\t\tlibcnotify_print_data(\n\t\t data,\n\t\t data_size,\n\t\t 0 );\n\t}\n#endif\n\t/* The size of the data can be 0 if the name is not set.\n\t */\n\tif( data_size > 0 )\n\t{\n\t\tvolume_name_values->name = (uint8_t *) memory_allocate(\n\t\t                                        sizeof( uint8_t ) * data_size );\n\n\t\tif( volume_name_values->name == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t\t \"%s: unable to create name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tvolume_name_values->name_size = data_size;\n\n\t\tif( memory_copy(\n\t\t     volume_name_values->name,\n\t\t     data,\n\t\t     volume_name_values->name_size ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy volume name.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if defined( HAVE_DEBUG_OUTPUT )\n\t\tif( libcnotify_verbose != 0 )\n\t\t{\n\t\t\tif( libfsntfs_debug_print_utf16_string_value(\n\t\t\t     function,\n\t\t\t     \"name\\t\\t\\t\\t\",\n\t\t\t     volume_name_values->name,\n\t\t\t     volume_name_values->name_size,\n\t\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t\t     error ) != 1 )\n\t\t\t{\n\t\t\t\tlibcerror_error_set(\n\t\t\t\t error,\n\t\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t\t LIBCERROR_RUNTIME_ERROR_PRINT_FAILED,\n\t\t\t\t \"%s: unable to print UTF-16 string value.\",\n\t\t\t\t function );\n\n\t\t\t\tgoto on_error;\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"\\n\" );\n\t\t}\n#endif /* defined( HAVE_DEBUG_OUTPUT ) */\n\t}\n\treturn( 1 );\n\non_error:\n\tif( volume_name_values->name != NULL )\n\t{\n\t\tmemory_free(\n\t\t volume_name_values->name );\n\n\t\tvolume_name_values->name = NULL;\n\t}\n\tvolume_name_values->name_size = 0;\n\n\treturn( -1 );\n}\n\n/* Reads the volume name values from an MFT attribute\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_read_from_mft_attribute(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error )\n{\n\tuint8_t *data           = NULL;\n\tstatic char *function   = \"libfsntfs_volume_name_values_read_from_mft_attribute\";\n\tsize_t data_size        = 0;\n\tuint32_t attribute_type = 0;\n\tint result              = 0;\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_type(\n\t     mft_attribute,\n\t     &attribute_type,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve type from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( attribute_type != LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported attribute type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          error );\n\n\tif( result == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if attribute data is resident.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported non-resident attribute.\",\n\t\t function );\n\n\t\treturn( 1 );\n\t}\n\tif( libfsntfs_mft_attribute_get_resident_data(\n\t     mft_attribute,\n\t     &data,\n\t     &data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve resident data from attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_name_values_read_data(\n\t     volume_name_values,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-8 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_get_utf8_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_get_utf8_name_size\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_name_values->name_size == 0 )\n\t{\n\t\tif( utf8_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf8_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf8_string_size_from_utf16_stream(\n\t\t     volume_name_values->name,\n\t\t     (size_t) volume_name_values->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf8_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-8 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_get_utf8_name(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_get_utf8_name\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_name_values->name_size == 0 )\n\t{\n\t\tif( utf8_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-8 string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( utf8_string_size > (size_t) SSIZE_MAX )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t\t \"%s: invalid UTF-8 string size value exceeds maximum.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( utf8_string_size < 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: UTF-8 string size value too small.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tutf8_string[ 0 ] = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf8_string_copy_from_utf16_stream(\n\t\t     utf8_string,\n\t\t     utf8_string_size,\n\t\t     volume_name_values->name,\n\t\t     (size_t) volume_name_values->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-8 string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the size of the UTF-16 encoded name\n * The returned size includes the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_get_utf16_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_get_utf16_name_size\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_name_values->name_size == 0 )\n\t{\n\t\tif( utf16_string_size == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*utf16_string_size = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf16_string_size_from_utf16_stream(\n\t\t     volume_name_values->name,\n\t\t     (size_t) volume_name_values->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     utf16_string_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 string size.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n/* Retrieves the UTF-16 encoded name\n * The size should include the end of string character\n * Returns 1 if successful or -1 on error\n */\nint libfsntfs_volume_name_values_get_utf16_name(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"libfsntfs_volume_name_values_get_utf16_name\";\n\n\tif( volume_name_values == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume name values.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( volume_name_values->name_size == 0 )\n\t{\n\t\tif( utf16_string == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t\t \"%s: invalid UTF-16 string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( utf16_string_size > (size_t) SSIZE_MAX )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t\t \"%s: invalid UTF-16 string size value exceeds maximum.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tif( utf16_string_size < 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t\t \"%s: UTF-16 string size value too small.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\tutf16_string[ 0 ] = 0;\n\t}\n\telse\n\t{\n\t\tif( libuna_utf16_string_copy_from_utf16_stream(\n\t\t     utf16_string,\n\t\t     utf16_string_size,\n\t\t     volume_name_values->name,\n\t\t     (size_t) volume_name_values->name_size,\n\t\t     LIBUNA_ENDIAN_LITTLE,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve UTF-16 string.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t}\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "libfsntfs/libfsntfs_volume_name_values.h",
    "content": "/*\n * Volume name attribute ($VOLUME_NAME) values functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _LIBFSNTFS_VOLUME_NAME_VALUES_H )\n#define _LIBFSNTFS_VOLUME_NAME_VALUES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"libfsntfs_libcerror.h\"\n#include \"libfsntfs_mft_attribute.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct libfsntfs_volume_name_values libfsntfs_volume_name_values_t;\n\nstruct libfsntfs_volume_name_values\n{\n\t/* The name\n\t */\n\tuint8_t *name;\n\n\t/* The name size\n\t */\n\tsize_t name_size;\n};\n\nint libfsntfs_volume_name_values_initialize(\n     libfsntfs_volume_name_values_t **volume_name_values,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_free(\n     libfsntfs_volume_name_values_t **volume_name_values,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_read_data(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     const uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_read_from_mft_attribute(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     libfsntfs_mft_attribute_t *mft_attribute,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_get_utf8_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_get_utf8_name(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     uint8_t *utf8_string,\n     size_t utf8_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_get_utf16_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     size_t *utf16_string_size,\n     libcerror_error_t **error );\n\nint libfsntfs_volume_name_values_get_utf16_name(\n     libfsntfs_volume_name_values_t *volume_name_values,\n     uint16_t *utf16_string,\n     size_t utf16_string_size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _LIBFSNTFS_VOLUME_NAME_VALUES_H ) */\n\n"
  },
  {
    "path": "libfsntfs.ini",
    "content": "[project]\nname: \"libfsntfs\"\nstatus: \"experimental\"\nyear_of_creation: \"2010\"\ndata_format: \"New Technology File System (NTFS)\"\ndocumentation_url: \"https://github.com/libyal/libfsntfs/tree/main/documentation\"\nfeatures: [\"debug_output\", \"nuget\", \"ossfuzz\", \"python_bindings\", \"tools\"]\n\n[library]\nfeatures: [\"pthread\", \"wide_character_type\"]\npublic_types: [\"attribute\", \"attribute_list_entry\", \"data_stream\", \"file_entry\", \"mft_metadata_file\", \"usn_change_journal\", \"volume\"]\n\n[tools]\nbuild_dependencies: [\"crypto\", \"fuse\"]\ndescription: \"Several tools for reading New Technology File System (NTFS) volumes\"\nnames: [\"fsntfsinfo\", \"fsntfsmount\"]\n\n[info_tool]\nsource_description: \"a New Technology File System (NTFS) volume\"\nsource_type: \"volume\"\n\n[mount_tool]\nfeatures: [\"offset\", \"symbolic_link\"]\nfile_entry_access_time_type: \"filetime\"\nfile_entry_creation_time_type: \"filetime\"\nfile_entry_inode_change_time_type: \"filetime\"\nfile_entry_modification_time_type: \"filetime\"\nfile_entry_type: \"file_entry\"\nfile_system_type: \"volume\"\nmounted_description: \"a file system contained in the NTFS volume\"\nsource: \"image.raw\"\nsource_description: \"a NTFS volume\"\nsource_description_long: \"a New Technology File System (NTFS) volume\"\nsource_type: \"volume\"\n\n[tests]\nprofiles: [\"libfsntfs\", \"pyfsntfs\", \"fsntfsinfo\", \"fsntfsinfo_bodyfile_fs\", \"fsntfsinfo_bodyfile_mft\", \"fsntfsinfo_fs\", \"fsntfsinfo_mft\", \"fsntfsinfo_usn\"]\noption_sets: [\"offset\"]\ninfo_tool_option_sets: [\"offset\"]\ninfo_tool_options_per_profile: [\"\", \"-H\", \"-Eall\", \"-U\"]\ninfo_tool_profiles: [\"fsntfsinfo\", \"fsntfsinfo_fs\", \"fsntfsinfo_mft\", \"fsntfsinfo_usn\"]\n\n"
  },
  {
    "path": "libfsntfs.nuspec",
    "content": "<?xml version=\"1.0\"?>\r\n<package >\r\n  <metadata>\r\n    <id>libfsntfs</id>\r\n    <version>20260208</version>\r\n    <authors>Joachim Metz</authors>\r\n    <owners>joachimmetz</owners>\r\n    <license type=\"expression\">LGPL-3.0-or-later</license>\r\n    <projectUrl>https://github.com/libyal/libfsntfs</projectUrl>\r\n    <requireLicenseAcceptance>false</requireLicenseAcceptance>\r\n    <title>libfsntfs</title>\r\n    <description>Library to access the New Technology File System (NTFS) format</description>\r\n    <releaseNotes>Release of libfsntfs 20260208</releaseNotes>\r\n    <copyright>Copyright (C) 2010-2026</copyright>\r\n    <tags>native</tags>\r\n  </metadata>\r\n  <files>\r\n    <file src=\"include\\*.h\" target=\"lib\\native\\include\\\" />\r\n    <file src=\"include\\libfsntfs\\*.h\" target=\"lib\\native\\include\\libfsntfs\\\" />\r\n    <file src=\"msvscpp\\Release\\Win32\\libfsntfs.dll\" target=\"lib\\native\\lib\\Win32\\\" />\r\n    <file src=\"msvscpp\\Release\\Win32\\libfsntfs.lib\" target=\"lib\\native\\lib\\Win32\\\" />\r\n    <file src=\"msvscpp\\Release\\Win32\\libfsntfs.pdb\" target=\"lib\\native\\lib\\Win32\\\" />\r\n    <file src=\"msvscpp\\Release\\x64\\libfsntfs.dll\" target=\"lib\\native\\lib\\x64\\\" />\r\n    <file src=\"msvscpp\\Release\\x64\\libfsntfs.lib\" target=\"lib\\native\\lib\\x64\\\" />\r\n    <file src=\"msvscpp\\Release\\x64\\libfsntfs.pdb\" target=\"lib\\native\\lib\\x64\\\" />\r\n  </files>\r\n</package>\r\n"
  },
  {
    "path": "libfsntfs.pc.in",
    "content": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: libfsntfs\nDescription: Library to access the New Technology File System (NTFS) format\nVersion: @VERSION@\nLibs: -L${libdir} -lfsntfs\nLibs.private: @ax_libbfio_pc_libs_private@ @ax_libcdata_pc_libs_private@ @ax_libcerror_pc_libs_private@ @ax_libcfile_pc_libs_private@ @ax_libclocale_pc_libs_private@ @ax_libcnotify_pc_libs_private@ @ax_libcpath_pc_libs_private@ @ax_libcsplit_pc_libs_private@ @ax_libcthreads_pc_libs_private@ @ax_libfcache_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libfwnt_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@\nCflags: -I${includedir}\n\n"
  },
  {
    "path": "libfsntfs.spec.in",
    "content": "Name: libfsntfs\nVersion: @VERSION@\nRelease: 1\nSummary: Library to access the New Technology File System (NTFS) format\nGroup: System Environment/Libraries\nLicense: LGPL-3.0-or-later\nSource: %{name}-%{version}.tar.gz\nURL: https://github.com/libyal/libfsntfs\n@libfsntfs_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcdata_spec_requires@ @ax_libcerror_spec_requires@ @ax_libcfile_spec_requires@ @ax_libclocale_spec_requires@ @ax_libcnotify_spec_requires@ @ax_libcpath_spec_requires@ @ax_libcsplit_spec_requires@ @ax_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@\nBuildRequires: gcc @ax_libbfio_spec_build_requires@ @ax_libcdata_spec_build_requires@ @ax_libcerror_spec_build_requires@ @ax_libcfile_spec_build_requires@ @ax_libclocale_spec_build_requires@ @ax_libcnotify_spec_build_requires@ @ax_libcpath_spec_build_requires@ @ax_libcsplit_spec_build_requires@ @ax_libcthreads_spec_build_requires@ @ax_libfcache_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfguid_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@\n\n%description -n libfsntfs\nLibrary to access the New Technology File System (NTFS) format\n\n%package -n libfsntfs-static\nSummary: Library to access the New Technology File System (NTFS) format\nGroup: Development/Libraries\nRequires: libfsntfs = %{version}-%{release}\n\n%description -n libfsntfs-static\nStatic library version of libfsntfs.\n\n%package -n libfsntfs-devel\nSummary: Header files and libraries for developing applications for libfsntfs\nGroup: Development/Libraries\nRequires: libfsntfs = %{version}-%{release}\n\n%description -n libfsntfs-devel\nHeader files and libraries for developing applications for libfsntfs.\n\n%package -n libfsntfs-python3\nSummary: Python 3 bindings for libfsntfs\nGroup: System Environment/Libraries\nRequires: libfsntfs = %{version}-%{release} python3\nBuildRequires: python3-devel python3-setuptools\n\n%description -n libfsntfs-python3\nPython 3 bindings for libfsntfs\n\n%package -n libfsntfs-tools\nSummary: Several tools for reading New Technology File System (NTFS) volumes\nGroup: Applications/System\nRequires: libfsntfs = %{version}-%{release} @ax_libcrypto_spec_requires@ @ax_libfuse_spec_requires@ @ax_libfusn_spec_requires@ @ax_libhmac_spec_requires@\n@libfsntfs_spec_tools_build_requires@ @ax_libcrypto_spec_build_requires@ @ax_libfuse_spec_build_requires@ @ax_libfusn_spec_build_requires@ @ax_libhmac_spec_build_requires@\n\n%description -n libfsntfs-tools\nSeveral tools for reading New Technology File System (NTFS) volumes\n\n%prep\n%setup -q\n\n%build\n%configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python\nmake %{?_smp_mflags}\n\n%install\nrm -rf %{buildroot}\n%make_install\n\n%clean\nrm -rf %{buildroot}\n\n%post -p /sbin/ldconfig\n\n%postun -p /sbin/ldconfig\n\n%files -n libfsntfs\n%license COPYING COPYING.LESSER\n%doc AUTHORS README\n%{_libdir}/*.so.*\n\n%files -n libfsntfs-static\n%license COPYING COPYING.LESSER\n%doc AUTHORS README\n%{_libdir}/*.a\n\n%files -n libfsntfs-devel\n%license COPYING COPYING.LESSER\n%doc AUTHORS README\n%{_libdir}/*.so\n%{_libdir}/pkgconfig/libfsntfs.pc\n%{_includedir}/*\n%{_mandir}/man3/*\n\n%files -n libfsntfs-python3\n%license COPYING COPYING.LESSER\n%doc AUTHORS README\n%{_libdir}/python3*/site-packages/*.a\n%{_libdir}/python3*/site-packages/*.so\n\n%files -n libfsntfs-tools\n%license COPYING COPYING.LESSER\n%doc AUTHORS README\n%{_bindir}/*\n%{_mandir}/man1/*\n\n%changelog\n* @SPEC_DATE@ Joachim Metz <joachim.metz@gmail.com> @VERSION@-1\n- Auto-generated\n\n"
  },
  {
    "path": "m4/common.m4",
    "content": "dnl Checks for common headers and functions\ndnl\ndnl Version: 20241013\n\ndnl Function to test if a certain feature was disabled\nAC_DEFUN([AX_COMMON_ARG_DISABLE],\n  [AC_ARG_ENABLE(\n    [$1],\n    [AS_HELP_STRING(\n      [--disable-$1],\n      [$3])],\n    [ac_cv_enable_$2=$enableval],\n    [ac_cv_enable_$2=\"yes\"])dnl\n\n    AC_CACHE_CHECK(\n      [whether to disable $3],\n      [ac_cv_enable_$2],\n      [ac_cv_enable_$2=\"yes\"])dnl\n  ])\n\ndnl Function to test if a certain feature was enabled\nAC_DEFUN([AX_COMMON_ARG_ENABLE],\n  [AC_ARG_ENABLE(\n    [$1],\n    [AS_HELP_STRING(\n      [--enable-$1],\n      [$3 @<:@default=$4@:>@])],\n    [ac_cv_enable_$2=$enableval],\n    [ac_cv_enable_$2=$4])dnl\n\n    AC_CACHE_CHECK(\n      [whether to enable $3],\n      [ac_cv_enable_$2],\n      [ac_cv_enable_$2=$4])dnl\n  ])\n\ndnl Function to test if the location of a certain feature was provided\nAC_DEFUN([AX_COMMON_ARG_WITH],\n  [AC_ARG_WITH(\n    [$1],\n    [AS_HELP_STRING(\n      [--with-$1[[=$5]]],\n      [$3 @<:@default=$4@:>@])],\n    [ac_cv_with_$2=$withval],\n    [ac_cv_with_$2=$4])dnl\n\n    AC_CACHE_CHECK(\n      [whether to use $3],\n      [ac_cv_with_$2],\n      [ac_cv_with_$2=$4])dnl\n  ])\n\ndnl Function to detect whether shared library support should be disabled\nAC_DEFUN([AX_COMMON_CHECK_DISABLE_SHARED_LIBS],\n  [AX_COMMON_ARG_DISABLE(\n    [shared-libs],\n    [shared_libs],\n    [disable shared library support])\n  ])\n\ndnl Function to detect whether debug output should be enabled\nAC_DEFUN([AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT],\n  [AX_COMMON_ARG_ENABLE(\n    [debug-output],\n    [debug_output],\n    [enable debug output],\n    [no])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_debug_output\" != xno ],\n    [AC_DEFINE(\n      [HAVE_DEBUG_OUTPUT],\n      [1],\n      [Define to 1 if debug output should be used.])\n\n    ac_cv_enable_debug_output=yes])\n  ])\n\ndnl Function to detect whether static executables support should be enabled\nAC_DEFUN([AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES],\n  [AX_COMMON_ARG_ENABLE(\n    [static-executables],\n    [static_executables],\n    [build static executables (binaries)],\n    [no])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_static_executables\" != xno],\n    [STATIC_LDFLAGS=\"-all-static\";\n\n    AC_SUBST(\n      [STATIC_LDFLAGS])\n\n    ac_cv_enable_static_executables=yes\n    enable_shared=no])\n  ])\n\ndnl Function to detect whether verbose output should be enabled\nAC_DEFUN([AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT],\n  [AX_COMMON_ARG_ENABLE(\n    [verbose-output],\n    [verbose_output],\n    [enable verbose output],\n    [no])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_verbose_output\" != xno ],\n    [AC_DEFINE(\n      [HAVE_VERBOSE_OUTPUT],\n      [1],\n      [Define to 1 if verbose output should be used.])\n\n    ac_cv_enable_verbose_output=yes])\n  ])\n\ndnl Function to detect whether wide character type support should be enabled\nAC_DEFUN([AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE],\n  [AX_COMMON_ARG_ENABLE(\n    [wide-character-type],\n    [wide_character_type],\n    [enable wide character type support],\n    [no])\n  ])\n\ndnl Function to detect whether WINAPI support should be enabled\nAC_DEFUN([AX_COMMON_CHECK_ENABLE_WINAPI],\n  [AX_COMMON_ARG_ENABLE(\n    [winapi],\n    [winapi],\n    [enable WINAPI support for cross-compilation],\n    [auto-detect])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xauto-detect],\n    [ac_common_check_winapi_target_string=\"$target\"\n\n    AS_IF(\n      [test \"x$ac_common_check_winapi_target_string\" = x],\n      [ac_common_check_winapi_target_string=\"$host\"])\n\n    AS_CASE(\n      [$ac_common_check_winapi_target_string],\n      [*mingw*],[AC_MSG_NOTICE(\n        [detected MinGW enabling WINAPI support for cross-compilation])\n        ac_cv_enable_winapi=yes],\n      [*msys*],[AC_MSG_NOTICE(\n        [detected MSYS enabling WINAPI support for cross-compilation])\n        ac_cv_enable_winapi=yes],\n      [*],[ac_cv_enable_winapi=no])\n    ])\n  ])\n\ndnl Function to detect whether printf conversion specifier \"%jd\" is available\nAC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_JD],\n  [AC_MSG_CHECKING(\n    [whether printf supports the conversion specifier \"%jd\"])\n\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -Wall -Werror\"\n  AC_LANG_PUSH(C)\n\n  dnl First try to see if compilation and linkage without a parameter succeeds\n  AC_LINK_IFELSE(\n    [AC_LANG_PROGRAM(\n      [[#include <stdio.h>]],\n      [[printf( \"%jd\" ); ]] )],\n    [ac_cv_cv_have_printf_jd=no],\n    [ac_cv_cv_have_printf_jd=yes])\n\n  dnl Second try to see if compilation and linkage with a parameter succeeds\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_jd\" = xyes],\n    [AC_LINK_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <sys/types.h>\n#include <stdio.h>]],\n        [[printf( \"%jd\", (off_t) 10 ); ]] )],\n      [ac_cv_cv_have_printf_jd=yes],\n      [ac_cv_cv_have_printf_jd=no])\n    ])\n\n  dnl Third try to see if the program runs correctly\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_jd\" = xyes],\n    [AC_RUN_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <sys/types.h>\n#include <stdio.h>]],\n        [[char string[ 3 ];\nif( snprintf( string, 3, \"%jd\", (off_t) 10 ) < 0 ) return( 1 );\nif( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )],\n      [ac_cv_cv_have_printf_jd=yes],\n      [ac_cv_cv_have_printf_jd=no],\n      [ac_cv_cv_have_printf_jd=undetermined])\n    ])\n\n  AC_LANG_POP(C)\n  CFLAGS=\"$SAVE_CFLAGS\"\n\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_jd\" = xyes],\n    [AC_MSG_RESULT(\n      [yes])\n    AC_DEFINE(\n      [HAVE_PRINTF_JD],\n      [1],\n      [Define to 1 whether printf supports the conversion specifier \"%jd\".]) ],\n    [AC_MSG_RESULT(\n      [$ac_cv_cv_have_printf_jd])\n    ])\n  ])\n\ndnl Function to detect whether printf conversion specifier \"%zd\" is available\nAC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD],\n  [AC_MSG_CHECKING(\n    [whether printf supports the conversion specifier \"%zd\"])\n\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -Wall -Werror\"\n  AC_LANG_PUSH(C)\n\n  dnl First try to see if compilation and linkage without a parameter succeeds\n  AC_LINK_IFELSE(\n    [AC_LANG_PROGRAM(\n      [[#include <stdio.h>]],\n      [[printf( \"%zd\" ); ]] )],\n    [ac_cv_cv_have_printf_zd=no],\n    [ac_cv_cv_have_printf_zd=yes])\n\n  dnl Second try to see if compilation and linkage with a parameter succeeds\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_zd\" = xyes],\n    [AC_LINK_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <sys/types.h>\n#include <stdio.h>]],\n        [[printf( \"%zd\", (size_t) 10 ); ]] )],\n      [ac_cv_cv_have_printf_zd=yes],\n      [ac_cv_cv_have_printf_zd=no])\n    ])\n\n  dnl Third try to see if the program runs correctly\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_zd\" = xyes],\n    [AC_RUN_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <sys/types.h>\n#include <stdio.h>]],\n        [[char string[ 3 ];\nif( snprintf( string, 3, \"%zd\", (size_t) 10 ) < 0 ) return( 1 );\nif( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )],\n      [ac_cv_cv_have_printf_zd=yes],\n      [ac_cv_cv_have_printf_zd=no],\n      [ac_cv_cv_have_printf_zd=undetermined])\n    ])\n\n  AC_LANG_POP(C)\n  CFLAGS=\"$SAVE_CFLAGS\"\n\n  AS_IF(\n    [test \"x$ac_cv_cv_have_printf_zd\" = xyes],\n    [AC_MSG_RESULT(\n      [yes])\n    AC_DEFINE(\n      [HAVE_PRINTF_ZD],\n      [1],\n      [Define to 1 whether printf supports the conversion specifier \"%zd\".]) ],\n    [AC_MSG_RESULT(\n      [$ac_cv_cv_have_printf_zd])\n    ])\n  ])\n\ndnl Function to detect if common dependencies are available\nAC_DEFUN([AX_COMMON_CHECK_LOCAL],\n  [dnl Headers included in common/common.h\n  AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xyes],\n    [AC_CHECK_HEADERS([windows.h])\n\n    AS_IF(\n      [test \"x$ac_cv_header_windows_h\" = xno],\n      [AC_MSG_FAILURE(\n        [Missing header: windows.h header is required to compile with winapi support],\n        [1])\n      ])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xno],\n    [AC_CHECK_HEADERS([libintl.h])\n    ])\n\n  dnl Headers included in common/types.h\n  AC_CHECK_HEADERS([limits.h])\n\n  dnl Headers included in common/memory.h and common/narrow_string.h\n  AC_CHECK_HEADERS([stdlib.h string.h])\n\n  dnl Headers included in common/wide_string.h\n  AC_CHECK_HEADERS([wchar.h wctype.h])\n\n  dnl File stream functions used in common/file_stream.h\n  AC_CHECK_FUNCS([fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fclose\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fclose],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_feof\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: feof],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fgets\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fgets],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fopen\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fopen],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fread\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fread],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fseeko\" != xyes && test \"x$ac_cv_func_fseeko64\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fseeko and fseeko64],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_fwrite\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fwrite],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_vfprintf\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: vfprintf],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_wide_character_type\" != xno],\n    [AC_CHECK_FUNCS([fgetws])\n\n    AS_IF(\n      [test \"x$ac_cv_func_fgetws\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: fgetws],\n        [1])\n      ])\n    ])\n\n  dnl Memory functions used in common/memory.h\n  AC_CHECK_FUNCS([free malloc memcmp memcpy memset realloc])\n\n  AS_IF(\n    [test \"x$ac_cv_func_free\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: free],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_malloc\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: malloc],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memcmp\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: memcmp],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memcpy\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: memcpy],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memset\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: memset],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_realloc\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: realloc],\n      [1])\n    ])\n\n  dnl Narrow character string functions used in common/narrow_string.h\n  AC_CHECK_FUNCS([memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memchr\" != xyes && test \"x$ac_cv_func_strchr\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: memchr and strchr],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memcmp\" != xyes && test \"x$ac_cv_func_strncmp\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: memcmp and strncmp],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memcpy\" != xyes && test \"x$ac_cv_func_strncpy\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: memcpy and strncpy],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memrchr\" = xyes],\n    [AC_CHECK_DECLS([memrchr])\n\n    AS_IF(\n      [test \"x$ac_cv_decl_memrchr\" != xyes],\n      [ac_cv_func_memrchr=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_memrchr\" != xyes && test \"x$ac_cv_func_strrchr\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: strrchr and memrchr],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_snprintf\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: snprintf],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_sscanf\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: sscanf],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_strlen\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: strlen],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_strcasecmp\" != xyes && test \"x$ac_cv_func_strncasecmp\" != xyes && test \"x$ac_cv_func_strnicmp\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: strncasecmp, strcasecmp and strnicmp],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_strstr\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: strstr],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_vsnprintf\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: vsnprintf],\n      [1])\n    ])\n\n  dnl Wide character string functions used in common/wide_string.h\n  AS_IF(\n    [test \"x$ac_cv_enable_wide_character_type\" != xno],\n    [AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr])\n\n    AS_IF(\n      [test \"x$ac_cv_func_swprintf\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: swprintf],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wmemchr\" != xyes && test \"x$ac_cv_func_wcschr\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: wmemchr and wcschr],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wmemcmp\" != xyes && test \"x$ac_cv_func_wcsncmp\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: wmemcmp and wcsncmp],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wmemcpy\" != xyes && test \"x$ac_cv_func_wcsncpy\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: wmemcpy and wcsncpy],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wmemrchr\" != xyes && test \"x$ac_cv_func_wcsrchr\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: wmemrchr and wcsrchr],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wcslen\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: wcslen],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wcsncasecmp\" != xyes && test \"x$ac_cv_func_wcscasecmp\" != xyes && test \"x$ac_cv_func_wcsnicmp\" != xyes && test \"x$ac_cv_func_towlower\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower],\n        [1])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wcsstr\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: wcsstr],\n        [1])\n      ])\n    ])\n\n  dnl Check for printf conversion specifier support\n  AX_COMMON_CHECK_FUNC_PRINTF_JD\n  AX_COMMON_CHECK_FUNC_PRINTF_ZD\n  ])\n\ndnl Function to test if a library with a specific definition is available\nAC_DEFUN([AX_CHECK_LIB_DEFINITION],\n  [AC_CACHE_CHECK(\n    [if `$2' is defined],\n    [ac_cv_$1_definition_$2],\n    [AC_LANG_PUSH(C)\n    AC_LINK_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <$1.h>]],\n        [[int test = $2;\n\nreturn( 0 ); ]]\n      )],\n      [ac_cv_$1_definition_$2=yes],\n      [ac_cv_$1_definition_$2=no])\n    AC_LANG_POP(C)])\n\n  AS_IF(\n    [test \"x$ac_cv_$1_definition_$2\" != xyes],\n    [ac_cv_$1=no])\n  ])\n\ndnl Function to test if a library with specific definitions is available\nAC_DEFUN([AX_CHECK_LIB_DEFINITIONS],\n  [m4_foreach(\n    [definition],\n    [$2],\n    [AX_CHECK_LIB_DEFINITION(\n      [$1],\n      [definition])\n    ])\n  ])\n\ndnl Function to test if a library with specific functions is available\nAC_DEFUN([AX_CHECK_LIB_FUNCTIONS],\n  [m4_foreach(\n    [function],\n    [$3],\n    [AC_CHECK_LIB(\n      [$2],\n      [function],\n      [ac_cv_$1_dummy=yes],\n      [ac_cv_$1=no])\n    ])\n  ])\n\ndnl Function to check if an user specified library directory exists\nAC_DEFUN([AX_CHECK_LIB_DIRECTORY_EXISTS],\n  [AS_IF(\n    [test -d \"$ac_cv_with_$1\"],\n    [CFLAGS=\"$CFLAGS -I${ac_cv_with_$1}/include\"\n    LDFLAGS=\"$LDFLAGS -L${ac_cv_with_$1}/lib\"],\n    [AC_MSG_FAILURE(\n      [no such directory: $ac_cv_with_$1],\n      [1])\n    ])\n  ])\n\ndnl Function to warn if no supported library was found in an user specified directory\nAC_DEFUN([AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE],\n  [AS_IF(\n    [test \"x$ac_cv_$1\" != xyes && test \"x$ac_cv_with_$1\" != x && test \"x$ac_cv_with_$1\" != xauto-detect && test \"x$ac_cv_with_$1\" != xyes],\n    [AC_MSG_FAILURE(\n      [unable to find supported $1 in directory: $ac_cv_with_$1],\n      [1])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libbfio.m4",
    "content": "dnl Checks for libbfio required headers and functions\ndnl\ndnl Version: 20240518\n\ndnl Function to detect if libbfio is available\ndnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBBFIO_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libbfio\" = xno],\n    [ac_cv_libbfio=no],\n    [ac_cv_libbfio=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libbfio which returns \"yes\" and --with-libbfio= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libbfio\" != x && test \"x$ac_cv_with_libbfio\" != xauto-detect && test \"x$ac_cv_with_libbfio\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libbfio])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libbfio],\n          [libbfio >= 20201125],\n          [ac_cv_libbfio=yes],\n          [ac_cv_libbfio=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libbfio\" = xyes && test \"x$ac_cv_enable_wide_character_type\" != xno],\n        [AC_CACHE_CHECK(\n         [whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1],\n         [ac_cv_header_libbfio_features_h_have_wide_character_type],\n         [AC_LANG_PUSH(C)\n         AC_COMPILE_IFELSE(\n           [AC_LANG_PROGRAM(\n             [[#include <libbfio/features.h>]],\n             [[#if !defined( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE != 1 )\n#error LIBBFIO_HAVE_WIDE_CHARACTER_TYPE not defined\n#endif]] )],\n           [ac_cv_header_libbfio_features_h_have_wide_character_type=yes],\n           [ac_cv_header_libbfio_features_h_have_wide_character_type=no])\n         AC_LANG_POP(C)],\n         [ac_cv_header_libbfio_features_h_have_wide_character_type=no])\n\n        AS_IF(\n          [test \"x$ac_cv_header_libbfio_features_h_have_wide_character_type\" = xno],\n          [ac_cv_libbfio=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libbfio\" = xyes],\n        [ac_cv_libbfio_CPPFLAGS=\"$pkg_cv_libbfio_CFLAGS\"\n        ac_cv_libbfio_LIBADD=\"$pkg_cv_libbfio_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libbfio\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libbfio.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libbfio_h\" = xno],\n        [ac_cv_libbfio=no],\n        [ac_cv_libbfio=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libbfio],\n          [bfio],\n          [[libbfio_get_version],\n           [libbfio_handle_free],\n           [libbfio_handle_open],\n           [libbfio_handle_close],\n           [libbfio_handle_exists],\n           [libbfio_handle_read_buffer],\n           [libbfio_handle_read_buffer_at_offset],\n           [libbfio_handle_write_buffer],\n           [libbfio_handle_write_buffer_at_offset],\n           [libbfio_handle_seek_offset],\n           [libbfio_handle_is_open],\n           [libbfio_handle_get_offset],\n           [libbfio_handle_get_size],\n           [libbfio_handle_set_track_offsets_read],\n           [libbfio_handle_get_number_of_offsets_read],\n           [libbfio_handle_get_offset_read],\n           [libbfio_file_initialize],\n           [libbfio_file_get_name_size],\n           [libbfio_file_get_name],\n           [libbfio_file_set_name],\n           [libbfio_pool_initialize],\n           [libbfio_pool_free],\n           [libbfio_pool_clone],\n           [libbfio_pool_get_number_of_handles],\n           [libbfio_pool_get_handle],\n           [libbfio_pool_set_handle],\n           [libbfio_pool_append_handle],\n           [libbfio_pool_remove_handle],\n           [libbfio_pool_get_maximum_number_of_open_handles],\n           [libbfio_pool_set_maximum_number_of_open_handles],\n           [libbfio_pool_open],\n           [libbfio_pool_reopen],\n           [libbfio_pool_close],\n           [libbfio_pool_close_all],\n           [libbfio_pool_read_buffer],\n           [libbfio_pool_read_buffer_at_offset],\n           [libbfio_pool_write_buffer],\n           [libbfio_pool_write_buffer_at_offset],\n           [libbfio_pool_seek_offset],\n           [libbfio_pool_get_offset],\n           [libbfio_pool_get_size],\n           [libbfio_file_pool_open]])\n\n        AS_IF(\n          [test \"x$ac_cv_enable_wide_character_type\" != xno],\n          [AX_CHECK_LIB_FUNCTIONS(\n            [libbfio],\n            [bfio],\n            [[libbfio_file_get_name_size_wide],\n             [libbfio_file_get_name_wide],\n             [libbfio_file_set_name_wide],\n             [libbfio_file_pool_open_wide]])\n          ])\n\n        ac_cv_libbfio_LIBADD=\"-lbfio\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libbfio])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libbfio\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBBFIO],\n      [1],\n      [Define to 1 if you have the `bfio' library (-lbfio).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libbfio\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBBFIO],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBBFIO],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libbfio dependencies are available\nAC_DEFUN([AX_LIBBFIO_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libbfio_CPPFLAGS=\"-I../libbfio -I\\$(top_srcdir)/libbfio\";\n  ac_cv_libbfio_LIBADD=\"../libbfio/libbfio.la\";\n\n  ac_cv_libbfio=local\n  ])\n\ndnl Function to detect how to enable libbfio\nAC_DEFUN([AX_LIBBFIO_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libbfio],\n    [libbfio],\n    [search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBBFIO_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libbfio\" != xyes],\n    [AX_LIBBFIO_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBBFIO],\n      [1],\n      [Define to 1 if the local version of libbfio is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBBFIO],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBBFIO],\n    [test \"x$ac_cv_libbfio\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libbfio_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBBFIO_CPPFLAGS],\n      [$ac_cv_libbfio_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libbfio_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBBFIO_LIBADD],\n      [$ac_cv_libbfio_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libbfio\" = xyes],\n    [AC_SUBST(\n      [ax_libbfio_pc_libs_private],\n      [-lbfio])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libbfio\" = xyes],\n    [AC_SUBST(\n      [ax_libbfio_spec_requires],\n      [libbfio])\n    AC_SUBST(\n      [ax_libbfio_spec_build_requires],\n      [libbfio-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcdata.m4",
    "content": "dnl Checks for libcdata required headers and functions\ndnl\ndnl Version: 20240514\n\ndnl Function to detect if libcdata is available\ndnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCDATA_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcdata\" = xno],\n    [ac_cv_libcdata=no],\n    [ac_cv_libcdata=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcdata which returns \"yes\" and --with-libcdata= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcdata\" != x && test \"x$ac_cv_with_libcdata\" != xauto-detect && test \"x$ac_cv_with_libcdata\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcdata])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcdata],\n          [libcdata >= 20230108],\n          [ac_cv_libcdata=yes],\n          [ac_cv_libcdata=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcdata\" = xyes],\n        [ac_cv_libcdata_CPPFLAGS=\"$pkg_cv_libcdata_CFLAGS\"\n        ac_cv_libcdata_LIBADD=\"$pkg_cv_libcdata_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcdata\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcdata.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcdata_h\" = xno],\n        [ac_cv_libcdata=no],\n        [ac_cv_libcdata=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcdata],\n          [cdata],\n          [[libcdata_get_version],\n           [libcdata_array_initialize],\n           [libcdata_array_free],\n           [libcdata_array_empty],\n           [libcdata_array_clone],\n           [libcdata_array_resize],\n           [libcdata_array_reverse],\n           [libcdata_array_get_number_of_entries],\n           [libcdata_array_get_entry_by_index],\n           [libcdata_array_get_entry_by_value],\n           [libcdata_array_set_entry_by_index],\n           [libcdata_array_prepend_entry],\n           [libcdata_array_append_entry],\n           [libcdata_array_insert_entry],\n           [libcdata_array_remove_entry],\n           [libcdata_btree_initialize],\n           [libcdata_btree_free],\n           [libcdata_btree_get_number_of_values],\n           [libcdata_btree_get_value_by_index],\n           [libcdata_btree_get_value_by_value],\n           [libcdata_btree_insert_value],\n           [libcdata_btree_replace_value],\n           [libcdata_btree_remove_value],\n           [libcdata_list_initialize],\n           [libcdata_list_free],\n           [libcdata_list_empty],\n           [libcdata_list_clone],\n           [libcdata_list_get_number_of_elements],\n           [libcdata_list_get_first_element],\n           [libcdata_list_get_last_element],\n           [libcdata_list_get_element_by_index],\n           [libcdata_list_get_value_by_index],\n           [libcdata_list_prepend_element],\n           [libcdata_list_prepend_value],\n           [libcdata_list_append_element],\n           [libcdata_list_append_value],\n           [libcdata_list_insert_element],\n           [libcdata_list_insert_element_with_existing],\n           [libcdata_list_insert_value],\n           [libcdata_list_insert_value_with_existing],\n           [libcdata_list_remove_element],\n           [libcdata_list_element_initialize],\n           [libcdata_list_element_free],\n           [libcdata_list_element_get_value],\n           [libcdata_list_element_set_value],\n           [libcdata_list_element_get_previous_element],\n           [libcdata_list_element_set_previous_element],\n           [libcdata_list_element_get_next_element],\n           [libcdata_list_element_get_elements],\n           [libcdata_list_element_set_elements],\n           [libcdata_range_list_initialize],\n           [libcdata_range_list_free],\n           [libcdata_range_list_empty],\n           [libcdata_range_list_clone],\n           [libcdata_range_list_get_number_of_elements],\n           [libcdata_range_list_insert_range],\n           [libcdata_range_list_insert_range_list],\n           [libcdata_range_list_remove_range],\n           [libcdata_range_list_get_range_by_index],\n           [libcdata_range_list_get_range_at_offset],\n           [libcdata_range_list_range_is_present],\n           [libcdata_range_list_range_has_overlapping_range],\n           [libcdata_range_list_get_spanning_range],\n           [libcdata_tree_node_initialize],\n           [libcdata_tree_node_free],\n           [libcdata_tree_node_empty],\n           [libcdata_tree_node_clone],\n           [libcdata_tree_node_get_value],\n           [libcdata_tree_node_set_value],\n           [libcdata_tree_node_get_parent_node],\n           [libcdata_tree_node_set_parent_node],\n           [libcdata_tree_node_get_previous_node],\n           [libcdata_tree_node_set_previous_node],\n           [libcdata_tree_node_get_next_node],\n           [libcdata_tree_node_set_next_node],\n           [libcdata_tree_node_get_nodes],\n           [libcdata_tree_node_set_nodes],\n           [libcdata_tree_node_append_node],\n           [libcdata_tree_node_append_value],\n           [libcdata_tree_node_insert_node],\n           [libcdata_tree_node_insert_value],\n           [libcdata_tree_node_replace_node],\n           [libcdata_tree_node_remove_node],\n           [libcdata_tree_node_get_number_of_sub_nodes],\n           [libcdata_tree_node_get_sub_node_by_index],\n           [libcdata_tree_node_get_leaf_node_list]])\n\n        ac_cv_libcdata_LIBADD=\"-lcdata\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcdata])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcdata\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCDATA],\n      [1],\n      [Define to 1 if you have the `cdata' library (-lcdata).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcdata\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCDATA],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCDATA],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libcdata dependencies are available\nAC_DEFUN([AX_LIBCDATA_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libcdata_CPPFLAGS=\"-I../libcdata -I\\$(top_srcdir)/libcdata\";\n  ac_cv_libcdata_LIBADD=\"../libcdata/libcdata.la\";\n\n  ac_cv_libcdata=local\n  ])\n\ndnl Function to detect how to enable libcdata\nAC_DEFUN([AX_LIBCDATA_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcdata],\n    [libcdata],\n    [search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCDATA_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcdata\" != xyes],\n    [AX_LIBCDATA_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCDATA],\n      [1],\n      [Define to 1 if the local version of libcdata is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCDATA],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCDATA],\n    [test \"x$ac_cv_libcdata\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcdata_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCDATA_CPPFLAGS],\n      [$ac_cv_libcdata_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcdata_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCDATA_LIBADD],\n      [$ac_cv_libcdata_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcdata\" = xyes],\n    [AC_SUBST(\n      [ax_libcdata_pc_libs_private],\n      [-lcdata])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcdata\" = xyes],\n    [AC_SUBST(\n      [ax_libcdata_spec_requires],\n      [libcdata])\n    AC_SUBST(\n      [ax_libcdata_spec_build_requires],\n      [libcdata-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcerror.m4",
    "content": "dnl Checks for libcerror required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libcerror is available\ndnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCERROR_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcerror\" = xno],\n    [ac_cv_libcerror=no],\n    [ac_cv_libcerror=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcerror which returns \"yes\" and --with-libcerror= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcerror\" != x && test \"x$ac_cv_with_libcerror\" != xauto-detect && test \"x$ac_cv_with_libcerror\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcerror])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcerror],\n          [libcerror >= 20120425],\n          [ac_cv_libcerror=yes],\n          [ac_cv_libcerror=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcerror\" = xyes],\n        [ac_cv_libcerror_CPPFLAGS=\"$pkg_cv_libcerror_CFLAGS\"\n        ac_cv_libcerror_LIBADD=\"$pkg_cv_libcerror_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcerror\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcerror.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcerror_h\" = xno],\n        [ac_cv_libcerror=no],\n        [ac_cv_libcerror=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcerror],\n          [cerror],\n          [[libcerror_get_version],\n           [libcerror_error_free],\n           [libcerror_error_set],\n           [libcerror_error_matches],\n           [libcerror_error_fprint],\n           [libcerror_error_sprint],\n           [libcerror_error_backtrace_fprint],\n           [libcerror_error_backtrace_sprint],\n           [libcerror_system_set_error]])\n\n        ac_cv_libcerror_LIBADD=\"-lcerror\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcerror])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcerror\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCERROR],\n      [1],\n      [Define to 1 if you have the `cerror' library (-lcerror).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcerror\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCERROR],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCERROR],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libcerror dependencies are available\nAC_DEFUN([AX_LIBCERROR_CHECK_LOCAL],\n  [dnl Headers included in libcerror/libcerror_error.c\n  AC_CHECK_HEADERS([stdarg.h varargs.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_stdarg_h\" != xyes && test \"x$ac_cv_header_varargs_h\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing headers: stdarg.h and varargs.h],\n      [1])\n    ])\n\n  dnl Wide character string functions used in libcerror/libcerror_error.c\n  AS_IF(\n    [test \"x$ac_cv_enable_wide_character_type\" != xno],\n    [AC_CHECK_FUNCS([wcstombs])\n\n    AS_IF(\n      [test \"x$ac_cv_func_wcstombs\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: wcstombs],\n        [1])\n      ])\n    ])\n\n  dnl Check for error string functions used in libcerror/libcerror_system.c\n  AC_FUNC_STRERROR_R()\n\n  AS_IF(\n    [test \"x$ac_cv_have_decl_strerror_r\" != xyes],\n    [AC_CHECK_FUNCS([strerror])\n\n    AS_IF(\n      [test \"x$ac_cv_func_strerror\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing functions: strerror_r and strerror],\n        [1])\n      ])\n    ])\n\n  ac_cv_libcerror_CPPFLAGS=\"-I../libcerror -I\\$(top_srcdir)/libcerror\";\n  ac_cv_libcerror_LIBADD=\"../libcerror/libcerror.la\";\n\n  ac_cv_libcerror=local\n  ])\n\ndnl Function to detect how to enable libcerror\nAC_DEFUN([AX_LIBCERROR_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcerror],\n    [libcerror],\n    [search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCERROR_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcerror\" != xyes],\n    [AX_LIBCERROR_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCERROR],\n      [1],\n      [Define to 1 if the local version of libcerror is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCERROR],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCERROR],\n    [test \"x$ac_cv_libcerror\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcerror_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCERROR_CPPFLAGS],\n      [$ac_cv_libcerror_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcerror_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCERROR_LIBADD],\n      [$ac_cv_libcerror_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcerror\" = xyes],\n    [AC_SUBST(\n      [ax_libcerror_pc_libs_private],\n      [-lcerror])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcerror\" = xyes],\n    [AC_SUBST(\n      [ax_libcerror_spec_requires],\n      [libcerror])\n    AC_SUBST(\n      [ax_libcerror_spec_build_requires],\n      [libcerror-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcfile.m4",
    "content": "dnl Checks for libcfile required headers and functions\ndnl\ndnl Version: 20240514\n\ndnl Function to detect if libcfile is available\ndnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCFILE_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcfile\" = xno],\n    [ac_cv_libcfile=no],\n    [ac_cv_libcfile=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcfile which returns \"yes\" and --with-libcfile= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcfile\" != x && test \"x$ac_cv_with_libcfile\" != xauto-detect && test \"x$ac_cv_with_libcfile\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcfile])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcfile],\n          [libcfile >= 20160409],\n          [ac_cv_libcfile=yes],\n          [ac_cv_libcfile=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcfile\" = xyes && test \"x$ac_cv_enable_wide_character_type\" != xno],\n        [AC_CACHE_CHECK(\n         [whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1],\n         [ac_cv_header_libcfile_features_h_have_wide_character_type],\n         [AC_LANG_PUSH(C)\n         AC_COMPILE_IFELSE(\n           [AC_LANG_PROGRAM(\n             [[#include <libcfile/features.h>]],\n             [[#if !defined( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE != 1 )\n#error LIBCFILE_HAVE_WIDE_CHARACTER_TYPE not defined\n#endif]] )],\n           [ac_cv_header_libcfile_features_h_have_wide_character_type=yes],\n           [ac_cv_header_libcfile_features_h_have_wide_character_type=no])\n         AC_LANG_POP(C)],\n         [ac_cv_header_libcfile_features_h_have_wide_character_type=no])\n\n        AS_IF(\n          [test \"x$ac_cv_header_libcfile_features_h_have_wide_character_type\" = xno],\n          [ac_cv_libcfile=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcfile\" = xyes],\n        [ac_cv_libcfile_CPPFLAGS=\"$pkg_cv_libcfile_CFLAGS\"\n        ac_cv_libcfile_LIBADD=\"$pkg_cv_libcfile_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcfile\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcfile.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcfile_h\" = xno],\n        [ac_cv_libcfile=no],\n        [ac_cv_libcfile=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcfile],\n          [cfile],\n          [[libcfile_get_version],\n           [libcfile_file_initialize],\n           [libcfile_file_free],\n           [libcfile_file_open],\n           [libcfile_file_open_with_error_code],\n           [libcfile_file_close],\n           [libcfile_file_read_buffer],\n           [libcfile_file_read_buffer_with_error_code],\n           [libcfile_file_write_buffer],\n           [libcfile_file_write_buffer_with_error_code],\n           [libcfile_file_seek_offset],\n           [libcfile_file_resize],\n           [libcfile_file_is_open],\n           [libcfile_file_get_offset],\n           [libcfile_file_get_size],\n           [libcfile_file_is_device],\n           [libcfile_file_io_control_read],\n           [libcfile_file_io_control_read_with_error_code],\n           [libcfile_file_exists],\n           [libcfile_file_remove]])\n\n        AS_IF(\n          [test \"x$ac_cv_enable_wide_character_type\" != xno],\n          [AX_CHECK_LIB_FUNCTIONS(\n            [libcfile],\n            [cfile],\n            [[libcfile_file_open_wide],\n             [libcfile_file_open_wide_with_error_code],\n             [libcfile_file_exists_wide],\n             [libcfile_file_remove_wide]])\n          ])\n\n        ac_cv_libcfile_LIBADD=\"-lcfile\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcfile])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcfile\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCFILE],\n      [1],\n      [Define to 1 if you have the `cfile' library (-lcfile).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcfile\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCFILE],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCFILE],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if posix_fadvise is available\nAC_DEFUN([AX_LIBCFILE_CHECK_FUNC_POSIX_FADVISE],\n  [AC_CHECK_FUNCS([posix_fadvise])\n\n  AS_IF(\n    [test \"x$ac_cv_func_posix_fadvise\" = xyes],\n    [AC_MSG_CHECKING(\n        [whether posix_fadvise can be linked])\n\n      SAVE_CFLAGS=\"$CFLAGS\"\n      CFLAGS=\"$CFLAGS -Wall -Werror\"\n      AC_LANG_PUSH(C)\n\n      AC_LINK_IFELSE(\n        [AC_LANG_PROGRAM(\n          [[#include <fcntl.h>]],\n          [[#if !defined( POSIX_FADV_SEQUENTIAL )\n#define POSIX_FADV_SEQUENTIAL 2\n#endif\nposix_fadvise( 0, 0, 0, POSIX_FADV_SEQUENTIAL )]] )],\n          [ac_cv_func_posix_fadvise=yes],\n          [ac_cv_func_posix_fadvise=no])\n\n      AC_LANG_POP(C)\n      CFLAGS=\"$SAVE_CFLAGS\"\n\n      AS_IF(\n        [test \"x$ac_cv_func_posix_fadvise\" = xyes],\n        [AC_MSG_RESULT(\n          [yes])\n        AC_DEFINE(\n          [HAVE_POSIX_FADVISE],\n          [1],\n          [Define to 1 if you have the posix_fadvise function.]) ],\n        [AC_MSG_RESULT(\n          [no]) ])\n    ])\n  ])\n\ndnl Function to detect if libcfile dependencies are available\nAC_DEFUN([AX_LIBCFILE_CHECK_LOCAL],\n  [dnl Headers included in libcfile/libcfile_file.c and libcfile/libcfile_support.c\n  AC_CHECK_HEADERS([errno.h stdio.h sys/stat.h])\n\n  dnl Headers included in libcfile/libcfile_file.c\n  AC_CHECK_HEADERS([cygwin/fs.h fcntl.h linux/fs.h sys/disk.h sys/disklabel.h sys/ioctl.h unistd.h])\n\n  dnl File input/output functions used in libcfile/libcfile_file.c\n  AC_CHECK_FUNCS([close fstat ftruncate ioctl lseek open read write])\n\n  AS_IF(\n    [test \"x$ac_cv_func_close\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: close],\n      [1])\n    ])\n\n  AX_LIBCFILE_CHECK_FUNC_POSIX_FADVISE\n\n  AS_IF(\n    [test \"x$ac_cv_func_fstat\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: fstat],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_ftruncate\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: ftruncate],\n      [1])\n    ])\n\n  AS_IF(\n    [test x\"$ac_cv_enable_winapi\" = xno],\n    [AS_IF(\n      [test \"x$ac_cv_func_ioctl\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: ioctl],\n        [1])\n      ])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_lseek\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: lseek],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_open\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: open],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_read\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: read],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_write\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: write],\n      [1])\n    ])\n\n  dnl File input/output functions used in libcfile/libcfile_support.c\n  AC_CHECK_FUNCS([stat unlink])\n\n  AS_IF(\n    [test \"x$ac_cv_func_stat\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: stat],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_unlink\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: unlink],\n      [1])\n    ])\n\n  ac_cv_libcfile_CPPFLAGS=\"-I../libcfile -I\\$(top_srcdir)/libcfile\";\n  ac_cv_libcfile_LIBADD=\"../libcfile/libcfile.la\";\n\n  ac_cv_libcfile=local\n  ])\n\ndnl Function to detect how to enable libcfile\nAC_DEFUN([AX_LIBCFILE_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcfile],\n    [libcfile],\n    [search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCFILE_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcfile\" != xyes],\n    [AX_LIBCFILE_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCFILE],\n      [1],\n      [Define to 1 if the local version of libcfile is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCFILE],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCFILE],\n    [test \"x$ac_cv_libcfile\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcfile_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCFILE_CPPFLAGS],\n      [$ac_cv_libcfile_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcfile_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCFILE_LIBADD],\n      [$ac_cv_libcfile_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcfile\" = xyes],\n    [AC_SUBST(\n      [ax_libcfile_pc_libs_private],\n      [-lcfile])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcfile\" = xyes],\n    [AC_SUBST(\n      [ax_libcfile_spec_requires],\n      [libcfile])\n    AC_SUBST(\n      [ax_libcfile_spec_build_requires],\n      [libcfile-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libclocale.m4",
    "content": "dnl Checks for libclocale required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libclocale is available\ndnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCLOCALE_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libclocale\" = xno],\n    [ac_cv_libclocale=no],\n    [ac_cv_libclocale=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libclocale which returns \"yes\" and --with-libclocale= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libclocale\" != x && test \"x$ac_cv_with_libclocale\" != xauto-detect && test \"x$ac_cv_with_libclocale\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libclocale])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libclocale],\n          [libclocale >= 20120425],\n          [ac_cv_libclocale=yes],\n          [ac_cv_libclocale=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libclocale\" = xyes && test \"x$ac_cv_enable_wide_character_type\" != xno],\n        [AC_CACHE_CHECK(\n          [whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1],\n          [ac_cv_header_libclocale_features_h_have_wide_character_type],\n          [AC_LANG_PUSH(C)\n          AC_COMPILE_IFELSE(\n            [AC_LANG_PROGRAM(\n              [[#include <libclocale/features.h>]],\n              [[#if !defined( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE != 1 )\n#error LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE not defined\n#endif]] )],\n            [ac_cv_header_libclocale_features_h_have_wide_character_type=yes],\n            [ac_cv_header_libclocale_features_h_have_wide_character_type=no])\n          AC_LANG_POP(C)],\n          [ac_cv_header_libclocale_features_h_have_wide_character_type=no])\n\n        AS_IF(\n          [test \"x$ac_cv_header_libclocale_features_h_have_wide_character_type\" = xno],\n          [ac_cv_libclocale=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libclocale\" = xyes],\n        [ac_cv_libclocale_CPPFLAGS=\"$pkg_cv_libclocale_CFLAGS\"\n        ac_cv_libclocale_LIBADD=\"$pkg_cv_libclocale_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libclocale\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libclocale.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libclocale_h\" = xno],\n        [ac_cv_libclocale=no],\n        [ac_cv_libclocale=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libclocale],\n          [clocale],\n          [[libclocale_get_version],\n           [libclocale_codepage],\n           [libclocale_codepage_get],\n           [libclocale_codepage_set],\n           [libclocale_codepage_copy_from_string],\n           [libclocale_locale_get_codepage],\n           [libclocale_locale_get_decimal_point],\n           [libclocale_initialize]])\n\n        AS_IF(\n          [test \"x$ac_cv_enable_wide_character_type\" != xno],\n          [AC_CHECK_LIB(\n            clocale,\n            libclocale_codepage_copy_from_string_wide,\n            [ac_cv_libclocale_dummy=yes],\n            [ac_cv_libclocale=no])\n          ])\n\n        ac_cv_libclocale_LIBADD=\"-lclocale\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libclocale])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libclocale\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCLOCALE],\n      [1],\n      [Define to 1 if you have the `clocale' library (-lclocale).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libclocale\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCLOCALE],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCLOCALE],\n      [0])\n    ])\n  ])\n\ndnl Function to detect whether nl_langinfo supports CODESET\nAC_DEFUN([AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET],\n  [AC_CHECK_FUNCS([nl_langinfo])\n\n  AS_IF(\n    [test \"x$ac_cv_func_nl_langinfo\" = xyes],\n    [AC_CACHE_CHECK(\n      [for nl_langinfo CODESET support],\n      [ac_cv_cv_langinfo_codeset],\n      [AC_LANG_PUSH(C)\n      AC_LINK_IFELSE(\n        [AC_LANG_PROGRAM(\n          [[#include <langinfo.h>]],\n          [[char* charset = nl_langinfo( CODESET );]] )],\n        [ac_cv_cv_langinfo_codeset=yes],\n        [ac_cv_cv_langinfo_codeset=no])\n      AC_LANG_POP(C) ]) ],\n    [ac_cv_cv_langinfo_codeset=no])\n\n  AS_IF(\n    [test \"x$ac_cv_cv_langinfo_codeset\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LANGINFO_CODESET],\n      [1],\n      [Define if nl_langinfo has CODESET support.])\n    ])\n  ])\n\ndnl Function to detect if libclocale dependencies are available\nAC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL],\n  [dnl Headers included in libclocale/libclocale_locale.c\n  AC_CHECK_HEADERS([langinfo.h locale.h])\n\n  dnl Check for environment functions in libclocale/libclocale_locale.c\n  AC_CHECK_FUNCS([getenv])\n\n  AS_IF(\n    [test \"x$ac_cv_func_getenv\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: getenv],\n      [1])\n    ])\n\n  dnl Check for localization functions in libclocale/libclocale_locale.c\n  AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xno],\n    [AC_CHECK_FUNCS([localeconv])\n\n    AS_IF(\n      [test \"x$ac_cv_func_localeconv\" != xyes],\n      [AC_MSG_FAILURE(\n        [Missing function: localeconv],\n        [1])\n      ])\n    ])\n\n  AC_CHECK_FUNCS([setlocale])\n\n  AS_IF(\n    [test \"x$ac_cv_func_setlocale\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: setlocale],\n      [1])\n    ])\n\n  AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET\n\n  ac_cv_libclocale_CPPFLAGS=\"-I../libclocale -I\\$(top_srcdir)/libclocale\";\n  ac_cv_libclocale_LIBADD=\"../libclocale/libclocale.la\";\n\n  ac_cv_libclocale=local\n  ])\n\ndnl Function to detect how to enable libclocale\nAC_DEFUN([AX_LIBCLOCALE_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libclocale],\n    [libclocale],\n    [search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCLOCALE_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libclocale\" != xyes],\n    [AX_LIBCLOCALE_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCLOCALE],\n      [1],\n      [Define to 1 if the local version of libclocale is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCLOCALE],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCLOCALE],\n    [test \"x$ac_cv_libclocale\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libclocale_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCLOCALE_CPPFLAGS],\n      [$ac_cv_libclocale_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libclocale_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCLOCALE_LIBADD],\n      [$ac_cv_libclocale_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libclocale\" = xyes],\n    [AC_SUBST(\n      [ax_libclocale_pc_libs_private],\n      [-lclocale])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libclocale\" = xyes],\n    [AC_SUBST(\n      [ax_libclocale_spec_requires],\n      [libclocale])\n    AC_SUBST(\n      [ax_libclocale_spec_build_requires],\n      [libclocale-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcnotify.m4",
    "content": "dnl Checks for libcnotify required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libcnotify is available\ndnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcnotify\" = xno],\n    [ac_cv_libcnotify=no],\n    [ac_cv_libcnotify=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcnotify which returns \"yes\" and --with-libcnotify= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcnotify\" != x && test \"x$ac_cv_with_libcnotify\" != xauto-detect && test \"x$ac_cv_with_libcnotify\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcnotify])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcnotify],\n          [libcnotify >= 20120425],\n          [ac_cv_libcnotify=yes],\n          [ac_cv_libcnotify=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcnotify\" = xyes],\n        [ac_cv_libcnotify_CPPFLAGS=\"$pkg_cv_libcnotify_CFLAGS\"\n        ac_cv_libcnotify_LIBADD=\"$pkg_cv_libcnotify_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcnotify\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcnotify.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcnotify_h\" = xno],\n        [ac_cv_libcnotify=no],\n        [ac_cv_libcnotify=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcnotify],\n          [cnotify],\n          [[libcnotify_get_version],\n           [libcnotify_printf],\n           [libcnotify_print_data],\n           [libcnotify_print_error_backtrace],\n           [libcnotify_stream_set],\n           [libcnotify_stream_open],\n           [libcnotify_stream_close],\n           [libcnotify_verbose_set]])\n\n        ac_cv_libcnotify_LIBADD=\"-lcnotify\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcnotify])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcnotify\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCNOTIFY],\n      [1],\n      [Define to 1 if you have the `cnotify' library (-lcnotify).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcnotify\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCNOTIFY],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCNOTIFY],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libcnotify dependencies are available\nAC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL],\n  [dnl Headers included in libcnotify/libcnotify_print.c\n  AC_CHECK_HEADERS([stdarg.h varargs.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_stdarg_h\" != xyes && test \"x$ac_cv_header_varargs_h\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing headers: stdarg.h and varargs.h],\n      [1])\n    ])\n\n  dnl Headers included in libcnotify/libcnotify_stream.c\n  AC_CHECK_HEADERS([errno.h])\n\n  ac_cv_libcnotify_CPPFLAGS=\"-I../libcnotify -I\\$(top_srcdir)/libcnotify\";\n  ac_cv_libcnotify_LIBADD=\"../libcnotify/libcnotify.la\";\n\n  ac_cv_libcnotify=local\n  ])\n\ndnl Function to detect how to enable libcnotify\nAC_DEFUN([AX_LIBCNOTIFY_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcnotify],\n    [libcnotify],\n    [search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCNOTIFY_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcnotify\" != xyes],\n    [AX_LIBCNOTIFY_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCNOTIFY],\n      [1],\n      [Define to 1 if the local version of libcnotify is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCNOTIFY],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCNOTIFY],\n    [test \"x$ac_cv_libcnotify\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcnotify_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCNOTIFY_CPPFLAGS],\n      [$ac_cv_libcnotify_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcnotify_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCNOTIFY_LIBADD],\n      [$ac_cv_libcnotify_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcnotify\" = xyes],\n    [AC_SUBST(\n      [ax_libcnotify_pc_libs_private],\n      [-lcnotify])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcnotify\" = xyes],\n    [AC_SUBST(\n      [ax_libcnotify_spec_requires],\n      [libcnotify])\n    AC_SUBST(\n      [ax_libcnotify_spec_build_requires],\n      [libcnotify-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcpath.m4",
    "content": "dnl Checks for libcpath required headers and functions\ndnl\ndnl Version: 20240518\n\ndnl Function to detect if libcpath is available\ndnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCPATH_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcpath\" = xno],\n    [ac_cv_libcpath=no],\n    [ac_cv_libcpath=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcpath which returns \"yes\" and --with-libcpath= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcpath\" != x && test \"x$ac_cv_with_libcpath\" != xauto-detect && test \"x$ac_cv_with_libcpath\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcpath])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcpath],\n          [libcpath >= 20180716],\n          [ac_cv_libcpath=yes],\n          [ac_cv_libcpath=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcpath\" = xyes && test \"x$ac_cv_enable_wide_character_type\" != xno],\n        [AC_CACHE_CHECK(\n         [whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1],\n         [ac_cv_header_libcpath_features_h_have_wide_character_type],\n         [AC_LANG_PUSH(C)\n         AC_COMPILE_IFELSE(\n           [AC_LANG_PROGRAM(\n             [[#include <libcpath/features.h>]],\n             [[#if !defined( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE != 1 )\n#error LIBCPATH_HAVE_WIDE_CHARACTER_TYPE not defined\n#endif]] )],\n           [ac_cv_header_libcpath_features_h_have_wide_character_type=yes],\n           [ac_cv_header_libcpath_features_h_have_wide_character_type=no])\n         AC_LANG_POP(C)],\n         [ac_cv_header_libcpath_features_h_have_wide_character_type=no])\n\n        AS_IF(\n          [test \"x$ac_cv_header_libcpath_features_h_have_wide_character_type\" = xno],\n          [ac_cv_libcpath=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcpath\" = xyes],\n        [ac_cv_libcpath_CPPFLAGS=\"$pkg_cv_libcpath_CFLAGS\"\n        ac_cv_libcpath_LIBADD=\"$pkg_cv_libcpath_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcpath\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcpath.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcpath_h\" = xno],\n        [ac_cv_libcpath=no],\n        [ac_cv_libcpath=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcpath],\n          [cpath],\n          [[libcpath_get_version],\n           [libcpath_path_change_directory],\n           [libcpath_path_get_current_working_directory],\n           [libcpath_path_get_full_path],\n           [libcpath_path_get_sanitized_filename],\n           [libcpath_path_get_sanitized_path],\n           [libcpath_path_join],\n           [libcpath_path_make_directory]])\n\n        AS_IF(\n          [test \"x$ac_cv_enable_wide_character_type\" != xno],\n          [AX_CHECK_LIB_FUNCTIONS(\n            [libcpath],\n            [cpath],\n            [[libcpath_path_change_directory_wide],\n             [libcpath_path_get_current_working_directory_wide],\n             [libcpath_path_get_full_path_wide],\n             [libcpath_path_get_sanitized_filename_wide],\n             [libcpath_path_get_sanitized_path_wide],\n             [libcpath_path_join_wide],\n             [libcpath_path_make_directory_wide]])\n          ])\n\n        ac_cv_libcpath_LIBADD=\"-lcpath\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcpath])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcpath\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCPATH],\n      [1],\n      [Define to 1 if you have the `cpath' library (-lcpath).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcpath\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCPATH],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCPATH],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if mkdir is available\ndnl Also checks how to use mkdir\nAC_DEFUN([AX_LIBCPATH_CHECK_FUNC_MKDIR],\n  [AC_CHECK_FUNCS([mkdir])\n\n  AS_IF(\n    [test \"x$ac_cv_func_mkdir\" = xyes],\n    [AC_MSG_CHECKING(\n      [how to use mkdir])\n\n    SAVE_CFLAGS=\"$CFLAGS\"\n    CFLAGS=\"$CFLAGS -Wall -Werror\"\n    AC_LANG_PUSH(C)\n\n    AC_LINK_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <sys/stat.h>\n#include <sys/types.h>]],\n        [[mkdir( \"\", 0 )]] )],\n        [AC_MSG_RESULT(\n          [with additional mode argument])\n        ac_cv_cv_mkdir_mode=yes],\n        [ac_cv_cv_mkdir_mode=no])\n\n    AS_IF(\n      [test \"x$ac_cv_cv_mkdir_mode\" = xno],\n      [AC_LINK_IFELSE(\n        [AC_LANG_PROGRAM(\n          [[#include <io.h>]],\n          [[mkdir( \"\" )]] )],\n        [AC_MSG_RESULT(\n          [with single argument])\n        ac_cv_cv_mkdir=yes],\n        [ac_cv_cv_mkdir=no])\n      ])\n\n    AC_LANG_POP(C)\n    CFLAGS=\"$SAVE_CFLAGS\"\n\n    AS_IF(\n      [test \"x$ac_cv_cv_mkdir_mode\" = xno && test \"x$ac_cv_cv_mkdir\" = xno],\n      [AC_MSG_WARN(\n        [unknown])\n      ac_cv_func_mkdir=no])\n\n    AS_IF(\n      [test \"x$ac_cv_func_mkdir\" = xyes],\n      [AC_DEFINE(\n        [HAVE_MKDIR],\n        [1],\n        [Define to 1 if you have the mkdir function.])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_cv_mkdir_mode\" = xyes],\n      [AC_DEFINE(\n        [HAVE_MKDIR_MODE],\n        [1],\n        [Define to 1 if you have the mkdir function with a second mode argument.])\n      ])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_mkdir\" = xno],\n    [AC_MSG_FAILURE(\n      [Missing function: mkdir],\n      [1])\n    ])\n  ])\n\ndnl Function to detect if libcpath dependencies are available\nAC_DEFUN([AX_LIBCPATH_CHECK_LOCAL],\n  [dnl Headers included in libcpath/libcpath_path.h\n  AC_CHECK_HEADERS([errno.h sys/stat.h sys/syslimits.h])\n\n  dnl Path functions used in libcpath/libcpath_path.h\n  AC_CHECK_FUNCS([chdir getcwd])\n\n  AS_IF(\n    [test \"x$ac_cv_func_chdir\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: chdir],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_func_getcwd\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing functions: getcwd],\n      [1])\n    ])\n\n  AX_LIBCPATH_CHECK_FUNC_MKDIR\n\n  ac_cv_libcpath_CPPFLAGS=\"-I../libcpath -I\\$(top_srcdir)/libcpath\";\n  ac_cv_libcpath_LIBADD=\"../libcpath/libcpath.la\";\n\n  ac_cv_libcpath=local\n  ])\n\ndnl Function to detect how to enable libcpath\nAC_DEFUN([AX_LIBCPATH_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcpath],\n    [libcpath],\n    [search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCPATH_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcpath\" != xyes],\n    [AX_LIBCPATH_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCPATH],\n      [1],\n      [Define to 1 if the local version of libcpath is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCPATH],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCPATH],\n    [test \"x$ac_cv_libcpath\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcpath_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCPATH_CPPFLAGS],\n      [$ac_cv_libcpath_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcpath_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCPATH_LIBADD],\n      [$ac_cv_libcpath_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcpath\" = xyes],\n    [AC_SUBST(\n      [ax_libcpath_pc_libs_private],\n      [-lcpath])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcpath\" = xyes],\n    [AC_SUBST(\n      [ax_libcpath_spec_requires],\n      [libcpath])\n    AC_SUBST(\n      [ax_libcpath_spec_build_requires],\n      [libcpath-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcrypto.m4",
    "content": "dnl Checks for libcrypto required headers and functions\ndnl\ndnl Version: 20251208\n\ndnl Function to detect whether openssl/evp.h can be used in combination with zlib.h\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE],\n  [AC_CACHE_CHECK(\n    [if openssl/evp.h can be used in combination with zlib.h],\n    [ac_cv_openssl_evp_zlib_compatible],\n    [AC_LANG_PUSH(C)\n    AC_LINK_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <zlib.h>\n#include <openssl/evp.h>]],\n        [[ ]] )],\n      [ac_cv_openssl_evp_zlib_compatible=yes],\n      [ac_cv_openssl_evp_zlib_compatible=no])\n    AC_LANG_POP(C)])\n  ])\n\ndnl Function to detect whether EVP_CipherInit_ex can be used with duplicate keys.\nAC_DEFUN([AX_LIBCRYPTO_CHECK_XTS_DUPLICATE_KEYS_SUPPORT],\n  [AC_CACHE_CHECK(\n    [if `EVP_CipherInit_ex' can be used with duplicate keys],\n    [ac_cv_openssl_xts_duplicate_keys],\n    [AC_LANG_PUSH(C)\n    ac_cv_libcrypto_backup_LIBS=\"$LIBS\"\n    LIBS=\"$LIBS $ac_cv_libcrypto_LIBADD\"\n    AC_RUN_IFELSE(\n      [AC_LANG_PROGRAM(\n        [[#include <stdlib.h>\n#include <openssl/err.h>\n#include <openssl/evp.h>]],\n        [[unsigned char key[ 16 ] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };\nint result = 0;\n\n#if defined( HAVE_EVP_CIPHER_CTX_INIT )\nEVP_CIPHER_CTX ctx;\n\nEVP_CIPHER_CTX_init( &ctx );\n#else\nEVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();\n#endif\n\nresult = EVP_CipherInit_ex(ctx, EVP_aes_128_xts(), NULL, key, key, 0);\n\n#if defined( HAVE_EVP_CIPHER_CTX_INIT )\nEVP_CIPHER_CTX_cleanup( &ctx );\n#else\nEVP_CIPHER_CTX_free( ctx );\n#endif\n\nif( result != 1 ) return( EXIT_FAILURE );\n\nreturn( EXIT_SUCCESS ); ]] )],\n      [ac_cv_openssl_xts_duplicate_keys=yes],\n      [ac_cv_openssl_xts_duplicate_keys=no])\n    LIBS=\"$ac_cv_libcrypto_backup_LIBS\"\n    AC_LANG_POP(C)])\n  ])\n\ndnl Function to detect if libcrypto (openssl) EVP functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP],\n  [AC_CHECK_HEADERS([openssl/evp.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_evp_h\" = xno],\n    [ac_cv_libcrypto_evp=no],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE\n\n    AS_IF(\n      [test \"x$ac_cv_openssl_evp_zlib_compatible\" = xyes],\n      [ac_cv_libcrypto_evp=yes],\n      [ac_cv_libcrypto_evp=no])\n    ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcrypto_evp\" = xyes],\n      [AC_DEFINE(\n        [HAVE_OPENSSL_EVP_H],\n        [1],\n        [Define to 1 if you have the <openssl/evp.h> header file.])\n      AC_SUBST(\n        [HAVE_OPENSSL_EVP_H],\n        [1]) ],\n      [AC_SUBST(\n        [HAVE_OPENSSL_EVP_H],\n        [0])\n      ])\n  ])\n\ndnl Function to detect if libcrypto (openssl) EVP MD functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD],\n  [ac_cv_libcrypto_evp_md=yes\n\n  AC_CHECK_LIB(\n    crypto,\n    EVP_MD_CTX_new,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_dummy=no])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_MD_CTX_new\" = xyes],\n    [dnl Check for the new EVP API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_CTX_free,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    ],\n    [dnl Check for the old EVP API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_CTX_init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_CTX_cleanup,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n\n    AC_CHECK_LIB(\n      crypto,\n      ERR_remove_thread_state,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    ])\n\n  AC_CHECK_LIB(\n    crypto,\n    EVP_DigestInit_ex2,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_dummy=no])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_DigestInit_ex2\" = xyes],\n    [dnl Check for OpenSSL 3 API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_CTX_reset,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_fetch,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_MD_free,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    ],\n    [AC_CHECK_LIB(\n      crypto,\n      EVP_DigestInit_ex,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_md=no])\n    ])\n\n  AC_CHECK_LIB(\n    crypto,\n    EVP_DigestUpdate,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_evp_md=no])\n  AC_CHECK_LIB(\n    crypto,\n    EVP_DigestFinal_ex,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_evp_md=no])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_openssl_evp_md\" = xyes && test \"x$ac_cv_libcrypto_evp_md\" = xno],\n    [AC_MSG_FAILURE(\n      [Missing OpenSSL EVP MD support],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_MD_CTX_init\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_MD_CTX_INIT],\n      [1],\n      [Define to 1 if you have the `EVP_MD_CTX_init' function\".])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_MD_CTX_cleanup\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_MD_CTX_CLEANUP],\n      [1],\n      [Define to 1 if you have the `EVP_MD_CTX_cleanup' function\".])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_DigestInit_ex2\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_DIGESTINIT_EX2],\n      [1],\n      [Define to 1 if you have the `EVP_DigestInit_ex2' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl EVP MD5 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD5],\n  [AC_CHECK_LIB(\n    crypto,\n    EVP_md5,\n    [ac_cv_libcrypto_md5=libcrypto_evp],\n    [ac_cv_libcrypto_md5=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_md5\" = xlibcrypto_evp],\n    [AC_DEFINE(\n      [HAVE_EVP_MD5],\n      [1],\n      [Define to 1 if you have the `EVP_md5' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl EVP SHA1 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA1],\n  [AC_CHECK_LIB(\n    crypto,\n    EVP_sha1,\n    [ac_cv_libcrypto_sha1=libcrypto_evp],\n    [ac_cv_libcrypto_sha1=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha1\" = xlibcrypto_evp],\n    [AC_DEFINE(\n      [HAVE_EVP_SHA1],\n      [1],\n      [Define to 1 if you have the `EVP_sha1' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl EVP SHA224 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA224],\n  [AC_CHECK_LIB(\n    crypto,\n    EVP_sha224,\n    [ac_cv_libcrypto_sha224=libcrypto_evp],\n    [ac_cv_libcrypto_sha224=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha224\" = xlibcrypto_evp],\n    [AC_DEFINE(\n      [HAVE_EVP_SHA224],\n      [1],\n      [Define to 1 if you have the `EVP_sha224' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl EVP SHA256 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA256],\n  [AC_CHECK_LIB(\n    crypto,\n    EVP_sha256,\n    [ac_cv_libcrypto_sha256=libcrypto_evp],\n    [ac_cv_libcrypto_sha256=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha256\" = xlibcrypto_evp],\n    [AC_DEFINE(\n      [HAVE_EVP_SHA256],\n      [1],\n      [Define to 1 if you have the `EVP_sha256' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl EVP SHA512 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA512],\n  [AC_CHECK_LIB(\n    crypto,\n    EVP_sha512,\n    [ac_cv_libcrypto_sha512=libcrypto_evp],\n    [ac_cv_libcrypto_sha512=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha512\" = xlibcrypto_evp],\n    [AC_DEFINE(\n      [HAVE_EVP_SHA512],\n      [1],\n      [Define to 1 if you have the `EVP_sha512' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl MD5 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_MD5],\n  [AC_CHECK_HEADERS([openssl/md5.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_md5_h\" = xno],\n    [ac_cv_libcrypto_md5=no],\n    [ac_cv_libcrypto_md5=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      MD5_Init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_md5=no])\n    AC_CHECK_LIB(\n      crypto,\n      MD5_Update,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_md5=no])\n    AC_CHECK_LIB(\n      crypto,\n      MD5_Final,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_md5=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno && test \"x$ac_cv_libcrypto_md5\" = xlibcrypto],\n    [ac_cv_libcrypto=yes])\n  ])\n\ndnl Function to detect if openssl SHA1 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_SHA1],\n  [AC_CHECK_HEADERS([openssl/sha.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_sha_h\" = xno],\n    [ac_cv_libcrypto_sha1=no],\n    [ac_cv_libcrypto_sha1=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      SHA1_Init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha1=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA1_Update,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha1=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA1_Final,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha1=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno && test \"x$ac_cv_libcrypto_sha1\" = xlibcrypto],\n    [ac_cv_libcrypto=yes])\n  ])\n\ndnl Function to detect if openssl SHA224 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_SHA224],\n  [AC_CHECK_HEADERS([openssl/sha.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_sha_h\" = xno],\n    [ac_cv_libcrypto_sha224=no],\n    [ac_cv_libcrypto_sha224=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      SHA224_Init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha224=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA224_Update,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha224=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA224_Final,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha224=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno && test \"x$ac_cv_libcrypto_sha224\" = xlibcrypto],\n    [ac_cv_libcrypto=yes])\n  ])\n\ndnl Function to detect if openssl SHA256 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_SHA256],\n  [AC_CHECK_HEADERS([openssl/sha.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_sha_h\" = xno],\n    [ac_cv_libcrypto_sha256=no],\n    [ac_cv_libcrypto_sha256=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      SHA256_Init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha256=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA256_Update,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha256=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA256_Final,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha256=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno && test \"x$ac_cv_libcrypto_sha256\" = xlibcrypto],\n    [ac_cv_libcrypto=yes])\n  ])\n\ndnl Function to detect if openssl SHA512 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_SHA512],\n  [AC_CHECK_HEADERS([openssl/sha.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_sha_h\" = xno],\n    [ac_cv_libcrypto_sha512=no],\n    [ac_cv_libcrypto_sha512=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      SHA512_Init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha512=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA512_Update,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha512=no])\n    AC_CHECK_LIB(\n      crypto,\n      SHA512_Final,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_sha512=no])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno && test \"x$ac_cv_libcrypto_sha512\" = xlibcrypto],\n    [ac_cv_libcrypto=yes])\n  ])\n\ndnl Function to detect if openssl EVP CIPHER functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_CIPHER],\n  [ac_cv_libcrypto_evp_cipher=yes\n\n  dnl Check if all required libcrypto (openssl) EVP CIPHER functions are available\n  AC_CHECK_LIB(\n    crypto,\n    EVP_CIPHER_CTX_new,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_dummy=no])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new\" = xyes],\n    [dnl Check for the new EVP API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_CTX_free,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    ],\n    [dnl Check for the old EVP API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_CTX_init,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_CTX_cleanup,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n\n    AC_CHECK_LIB(\n      crypto,\n      ERR_remove_thread_state,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    ])\n\n  AC_CHECK_LIB(\n    crypto,\n    EVP_CipherInit_ex2,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_dummy=no])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_CipherInit_ex2\" = xyes],\n    [dnl Check for OpenSSL 3 API functions\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_CTX_reset,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_fetch,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_free,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    ],\n    [AC_CHECK_LIB(\n      crypto,\n      EVP_CipherInit_ex,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_CIPHER_CTX_set_padding,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_evp_cipher=no])\n    ])\n\n  AC_CHECK_LIB(\n    crypto,\n    EVP_CipherUpdate,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_evp_cipher=no])\n  AC_CHECK_LIB(\n    crypto,\n    EVP_CipherFinal_ex,\n    [ac_cv_libcrypto_dummy=yes],\n    [ac_cv_libcrypto_evp_cipher=no])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_openssl_evp_cipher\" = xyes && test \"x$ac_cv_libcrypto_evp_cipher\" = xno],\n    [AC_MSG_FAILURE(\n      [Missing OpenSSL EVP CIPHER support],\n      [1])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_CIPHER_CTX_init\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_CIPHER_CTX_INIT],\n      [1],\n      [Define to 1 if you have the `EVP_CIPHER_CTX_init' function\".])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_CIPHER_CTX_cleanup\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_CIPHER_CTX_CLEANUP],\n      [1],\n      [Define to 1 if you have the `EVP_CIPHER_CTX_cleanup' function\".])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_lib_crypto_EVP_CipherInit_ex2\" = xyes],\n    [AC_DEFINE(\n      [HAVE_EVP_CIPHERINIT_EX2],\n      [1],\n      [Define to 1 if you have the `EVP_CipherInit_ex2' function\".])\n    ])\n  ])\n\ndnl Function to detect if openssl AES-CBC and AES-ECB functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_AES],\n  [AC_CHECK_HEADERS([openssl/aes.h])\n\n  AS_IF(\n    [test \"x$ac_cv_header_openssl_aes_h\" = xno],\n    [ac_cv_libcrypto_aes_cbc=no\n    ac_cv_libcrypto_aes_ecb=no],\n    [ac_cv_libcrypto_aes_cbc=libcrypto\n    ac_cv_libcrypto_aes_ecb=libcrypto\n\n    AC_CHECK_LIB(\n      crypto,\n      AES_set_decrypt_key,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no,\n      ac_cv_libcrypto_aes_ecb=no])\n    AC_CHECK_LIB(\n      crypto,\n      AES_set_encrypt_key,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no,\n      ac_cv_libcrypto_aes_ecb=no])\n\n    AC_CHECK_LIB(\n      crypto,\n      AES_cbc_encrypt,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no])\n\n    AC_CHECK_LIB(\n      crypto,\n      AES_ecb_encrypt,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_ecb=no])\n\n    AS_IF(\n      [test \"x$ac_cv_lib_crypto_AES_cbc_encrypt\" = xyes],\n      [AC_DEFINE(\n        [HAVE_AES_CBC_ENCRYPT],\n        [1],\n        [Define to 1 if you have the `AES_cbc_encrypt' function\".])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_lib_crypto_AES_ecb_encrypt\" = xyes],\n      [AC_DEFINE(\n        [HAVE_AES_ECB_ENCRYPT],\n        [1],\n        [Define to 1 if you have the `AES_ecb_encrypt' function\".])\n      ])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno],\n    [AS_IF(\n      [test \"x$ac_cv_libcrypto_aes_cbc\" = xno || test \"x$ac_cv_libcrypto_aes_ecb\" = xno],\n      [ac_cv_libcrypto=yes])\n    ])\n\n  dnl ac_cv_libcrypto_aes is deprecated but kept for backwards compatibility\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_aes_cbc\" = xno || test \"x$ac_cv_libcrypto_aes_ecb\" = xno],\n    [ac_cv_libcrypto_aes=no],\n    [ac_cv_libcrypto_aes=libcrypto])\n  ])\n\ndnl Function to detect if libcrypto (openssl) dependencies are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_openssl\" = xno],\n    [ac_cv_libcrypto=no],\n    [dnl Check if the directory provided as parameter exists\n    dnl For both --with-openssl which returns \"yes\" and --with-openssl= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_openssl\" != x && test \"x$ac_cv_with_openssl\" != xauto-detect && test \"x$ac_cv_with_openssl\" != xyes],\n      [AS_IF(\n        [test -d \"$ac_cv_with_openssl\"],\n        [CFLAGS=\"$CFLAGS -I${ac_cv_with_openssl}/include\"\n        LDFLAGS=\"$LDFLAGS -L${ac_cv_with_openssl}/lib\"],\n        [AC_MSG_FAILURE(\n          [no such directory: $ac_cv_with_openssl],\n          [1])\n        ])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [openssl],\n          [openssl >= 1.0],\n          [ac_cv_libcrypto=yes\n          ac_cv_libcrypto_evp=yes],\n          [ac_cv_libcrypto=no\n          ac_cv_libcrypto_evp=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcrypto\" = xyes],\n        [ac_cv_libcrypto_CPPFLAGS=\"$pkg_cv_openssl_CFLAGS\"\n        ac_cv_libcrypto_LIBADD=\"$pkg_cv_openssl_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcrypto\" != xyes],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([openssl/opensslv.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_openssl_opensslv\" = xyes],\n        [ac_cv_libcrypto=yes])\n      ])\n    ])\n    AX_LIBCRYPTO_CHECK_OPENSSL_EVP\n\n    AS_IF(\n      [test \"x$ac_cv_libcrypto\" != xno],\n      [AC_DEFINE(\n        [HAVE_LIBCRYPTO],\n        [1],\n        [Define to 1 if you have the 'crypto' library (-lcrypto).])\n\n      ac_cv_libcrypto_CPPFLAGS=\"$openssl_CFLAGS\"\n      ac_cv_libcrypto_LIBADD=\"$openssl_LIBS\"\n\n      AS_IF(\n        [test \"x$ac_cv_libcrypto_LIBADD\" = x],\n        [ac_cv_libcrypto_LIBADD=\"-lcrypto\"])\n\n      dnl On Cygwin also link zlib since libcrypto relies on it\n      AS_CASE(\n        [$host],\n        [*cygwin*],\n        [ac_cv_libcrypto_LIBADD=\"$ac_cv_libcrypto_LIBADD -lz\"])\n\n      dnl Enforce the dynamic loader library to be included if available\n      AC_CHECK_LIB(\n        dl,\n        dlopen,\n        [AC_SUBST(\n          [LIBDL_LIBADD],\n          [\"-ldl\"])],\n        [])\n      ])\n    ])\n  ])\n\ndnl Function to detect if libcrypto MD5 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_MD5],\n  [ac_cv_libcrypto_md5=no\n\n  dnl Check for libcrypto (openssl) EVP MD support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_libcrypto_evp_md\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD])\n\n  dnl Check for libcrypto (openssl) EVP MD5 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_md\" = xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD5])\n\n  dnl Check for libcrypto (openssl) MD5 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_md5\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_MD5])\n  ])\n\ndnl Function to detect if libcrypto SHA1 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_SHA1],\n  [ac_cv_libcrypto_sha1=no\n\n  dnl Check for libcrypto (openssl) EVP MD support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_md\" != xno && test \"x$ac_cv_libcrypto_evp_md\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD])\n\n  dnl Check for libcrypto (openssl) EVP SHA1 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_md\" = xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA1])\n\n  dnl Check for libcrypto (openssl) SHA1 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha1\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_SHA1])\n  ])\n\ndnl Function to detect if libcrypto SHA224 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_SHA224],\n  [ac_cv_libcrypto_sha224=no\n\n  dnl Check for libcrypto (openssl) EVP MD support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_md\" != xno && test \"x$ac_cv_libcrypto_evp_md\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD])\n\n  dnl Check for libcrypto (openssl) EVP SHA224 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_md\" = xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA224])\n\n  dnl Check for libcrypto (openssl) SHA224 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha224\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_SHA224])\n  ])\n\ndnl Function to detect if libcrypto SHA256 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_SHA256],\n  [ac_cv_libcrypto_sha256=no\n\n  dnl Check for libcrypto (openssl) EVP MD support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_md\" != xno && test \"x$ac_cv_libcrypto_evp_md\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD])\n\n  dnl Check for libcrypto (openssl) EVP SHA256 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_md\" = xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA256])\n\n  dnl Check for libcrypto (openssl) SHA256 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha256\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_SHA256])\n  ])\n\ndnl Function to detect if libcrypto SHA512 functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_SHA512],\n  [ac_cv_libcrypto_sha512=no\n\n  dnl Check for libcrypto (openssl) EVP MD support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_md\" != xno && test \"x$ac_cv_libcrypto_evp_md\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_MD])\n\n  dnl Check for libcrypto (openssl) EVP SHA512 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_md\" = xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_SHA512])\n\n  dnl Check for libcrypto (openssl) SHA512 support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_sha512\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_SHA512])\n  ])\n\ndnl Function to detect if libcrypto AES-CBC and AES-ECB functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_AES],\n  [dnl Check for libcrypto (openssl) EVP CIPHER AES-CBC and AES-ECB support\n  AX_LIBCRYPTO_CHECK_AES_CBC\n  AX_LIBCRYPTO_CHECK_AES_ECB\n\n  dnl ac_cv_libcrypto_aes is deprecated but kept for backwards compatibility\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_aes_cbc\" = xno || test \"x$ac_cv_libcrypto_aes_ecb\" = xno],\n    [ac_cv_libcrypto_aes=no],\n    [ac_cv_libcrypto_aes=libcrypto_evp])\n\n  dnl Check for libcrypto (openssl) AES-CBC and AES-ECB support\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_aes_cbc\" = xno || test \"x$ac_cv_libcrypto_aes_ecb\" = xno],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_AES])\n  ])\n\ndnl Function to detect if libcrypto AES-CBC functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_AES_CBC],\n  [AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_cipher\" != xno && test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_CIPHER])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [ac_cv_libcrypto_aes_cbc=no],\n    [ac_cv_libcrypto_aes_cbc=libcrypto_evp\n\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_128_cbc,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_192_cbc,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_256_cbc,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_cbc=no])\n\n    AS_IF(\n      [test \"x$ac_cv_lib_crypto_EVP_aes_128_cbc\" = xyes && test \"x$ac_cv_lib_crypto_EVP_aes_192_cbc\" = xyes && test \"x$ac_cv_lib_crypto_EVP_aes_256_cbc\" = xyes],\n      [AC_DEFINE(\n        [HAVE_EVP_CRYPTO_AES_CBC],\n        [1],\n        [Define to 1 if you have the `EVP_aes_128_cbc', `EVP_aes_192_cbc' and `EVP_aes_256_cbc' functions\".])\n      ])\n    ])\n  ])\n\ndnl Function to detect if libcrypto AES-ECB functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_AES_ECB],\n  [AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_cipher\" != xno && test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_CIPHER])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [ac_cv_libcrypto_aes_ecb=no],\n    [ac_cv_libcrypto_aes_ecb=libcrypto_evp\n\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_128_ecb,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_ecb=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_192_ecb,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_ecb=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_256_ecb,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_ecb=no])\n\n    AS_IF(\n      [test \"x$ac_cv_lib_crypto_EVP_aes_128_ecb\" = xyes && test \"x$ac_cv_lib_crypto_EVP_aes_192_ecb\" = xyes && test \"x$ac_cv_lib_crypto_EVP_aes_256_ecb\" = xyes],\n      [AC_DEFINE(\n        [HAVE_EVP_CRYPTO_AES_ECB],\n        [1],\n        [Define to 1 if you have the `EVP_aes_128_ecb', `EVP_aes_192_ecb' and `EVP_aes_256_ecb' functions\".])\n      ])\n    ])\n  ])\n\ndnl Function to detect if libcrypto AES-XTS functions are available\nAC_DEFUN([AX_LIBCRYPTO_CHECK_AES_XTS],\n  [AS_IF(\n    [test \"x$ac_cv_libcrypto_evp\" = xyes && test \"x$ac_cv_enable_openssl_evp_cipher\" != xno && test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [AX_LIBCRYPTO_CHECK_OPENSSL_EVP_CIPHER])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_evp_cipher\" != xyes],\n    [ac_cv_libcrypto_aes_xts=no],\n    [ac_cv_libcrypto_aes_xts=libcrypto_evp\n\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_128_xts,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_xts=no])\n    AC_CHECK_LIB(\n      crypto,\n      EVP_aes_256_xts,\n      [ac_cv_libcrypto_dummy=yes],\n      [ac_cv_libcrypto_aes_xts=no])\n\n    dnl OpenSSL 1.1.1c will error with \"xts duplicated keys\".\n    AX_LIBCRYPTO_CHECK_XTS_DUPLICATE_KEYS_SUPPORT\n    AS_IF(\n      [test \"x$ac_cv_openssl_xts_duplicate_keys\" = xno],\n      [ac_cv_libcrypto_aes_xts=no],\n      [AS_IF(\n        [test \"x$ac_cv_lib_crypto_EVP_aes_128_xts\" = xyes && test \"x$ac_cv_lib_crypto_EVP_aes_256_xts\" = xyes],\n        [AC_DEFINE(\n          [HAVE_EVP_CRYPTO_AES_XTS],\n          [1],\n          [Define to 1 if you have the `EVP_aes_128_xts' and `EVP_aes_256_xts' functions\".])\n        ])\n      ])\n    ])\n  ])\n\ndnl Function to detect how to enable libcrypto (openssl)\nAC_DEFUN([AX_LIBCRYPTO_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [openssl],\n    [openssl],\n    [search for OpenSSL in includedir and libdir or in the specified DIR, or no if not to use OpenSSL],\n    [auto-detect],\n    [DIR])\n\n  AX_COMMON_ARG_ENABLE(\n    [openssl-evp-cipher],\n    [openssl_evp_cipher],\n    [enable OpenSSL EVP CIPHER support, or no to disable],\n    [auto-detect])\n\n  AX_COMMON_ARG_ENABLE(\n    [openssl-evp-md],\n    [openssl_evp_md],\n    [enable OpenSSL EVP MD support, or no to disable],\n    [auto-detect])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_static_executables\" != xyes],\n    [dnl Check for a shared library version\n    AX_LIBCRYPTO_CHECK_LIB])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCRYPTO_CPPFLAGS],\n      [$ac_cv_libcrypto_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcrypto_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCRYPTO_LIBADD],\n      [$ac_cv_libcrypto_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" != xno],\n    [AC_SUBST(\n      [ax_libcrypto_pc_libs_private],\n      [-lcrypto])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" != xno],\n    [AC_SUBST(\n      [ax_libcrypto_spec_requires],\n      [openssl])\n    AC_SUBST(\n      [ax_libcrypto_spec_build_requires],\n      [openssl-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcsplit.m4",
    "content": "dnl Checks for libcsplit required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libcsplit is available\ndnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCSPLIT_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcsplit\" = xno],\n    [ac_cv_libcsplit=no],\n    [ac_cv_libcsplit=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcsplit which returns \"yes\" and --with-libcsplit= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcsplit\" != x && test \"x$ac_cv_with_libcsplit\" != xauto-detect && test \"x$ac_cv_with_libcsplit\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcsplit])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcsplit],\n          [libcsplit >= 20120701],\n          [ac_cv_libcsplit=yes],\n          [ac_cv_libcsplit=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcsplit\" = xyes && test \"x$ac_cv_enable_wide_character_type\" != xno],\n        [AC_CACHE_CHECK(\n          [whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1],\n          [ac_cv_header_libcsplit_features_h_have_wide_character_type],\n          [AC_LANG_PUSH(C)\n          AC_COMPILE_IFELSE(\n            [AC_LANG_PROGRAM(\n              [[#include <libcsplit/features.h>]],\n              [[#if !defined( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE != 1 )\n#error LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE not defined\n#endif]] )],\n            [ac_cv_header_libcsplit_features_h_have_wide_character_type=yes],\n            [ac_cv_header_libcsplit_features_h_have_wide_character_type=no])\n          AC_LANG_POP(C)],\n          [ac_cv_header_libcsplit_features_h_have_wide_character_type=no])\n\n         AS_IF(\n           [test \"x$ac_cv_header_libcsplit_features_h_have_wide_character_type\" = xno],\n           [ac_cv_libcsplit=no])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcsplit\" = xyes],\n        [ac_cv_libcsplit_CPPFLAGS=\"$pkg_cv_libcsplit_CFLAGS\"\n        ac_cv_libcsplit_LIBADD=\"$pkg_cv_libcsplit_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcsplit\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcsplit.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcsplit_h\" = xno],\n        [ac_cv_libcsplit=no],\n        [ac_cv_libcsplit=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcsplit],\n          [csplit],\n          [[libcsplit_get_version],\n           [libcsplit_narrow_string_split],\n           [libcsplit_narrow_split_string_free],\n           [libcsplit_narrow_split_string_get_string],\n           [libcsplit_narrow_split_string_get_number_of_segments],\n           [libcsplit_narrow_split_string_get_segment_by_index],\n           [libcsplit_narrow_split_string_set_segment_by_index]])\n\n        dnl Wide string functions\n        AS_IF(\n          [test \"x$ac_cv_enable_wide_character_type\" != xno],\n          [AX_CHECK_LIB_FUNCTIONS(\n            [libcsplit],\n            [csplit],\n            [[libcsplit_wide_string_split],\n             [libcsplit_wide_split_string_free],\n             [libcsplit_wide_split_string_get_string],\n             [libcsplit_wide_split_string_get_number_of_segments],\n             [libcsplit_wide_split_string_get_segment_by_index],\n             [libcsplit_wide_split_string_set_segment_by_index]])\n          ])\n\n        ac_cv_libcsplit_LIBADD=\"-lcsplit\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcsplit])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcsplit\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCSPLIT],\n      [1],\n      [Define to 1 if you have the `csplit' library (-lcsplit).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcsplit\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCSPLIT],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCSPLIT],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libcsplit dependencies are available\nAC_DEFUN([AX_LIBCSPLIT_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libcsplit_CPPFLAGS=\"-I../libcsplit -I\\$(top_srcdir)/libcsplit\";\n  ac_cv_libcsplit_LIBADD=\"../libcsplit/libcsplit.la\";\n\n  ac_cv_libcsplit=local\n  ])\n\ndnl Function to detect how to enable libcsplit\nAC_DEFUN([AX_LIBCSPLIT_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libcsplit],\n    [libcsplit],\n    [search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBCSPLIT_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libcsplit\" != xyes],\n    [AX_LIBCSPLIT_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBCSPLIT],\n      [1],\n      [Define to 1 if the local version of libcsplit is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBCSPLIT],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCSPLIT],\n    [test \"x$ac_cv_libcsplit\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcsplit_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCSPLIT_CPPFLAGS],\n      [$ac_cv_libcsplit_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcsplit_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCSPLIT_LIBADD],\n      [$ac_cv_libcsplit_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcsplit\" = xyes],\n    [AC_SUBST(\n      [ax_libcsplit_pc_libs_private],\n      [-lcsplit])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcsplit\" = xyes],\n    [AC_SUBST(\n      [ax_libcsplit_spec_requires],\n      [libcsplit])\n    AC_SUBST(\n      [ax_libcsplit_spec_build_requires],\n      [libcsplit-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libcthreads.m4",
    "content": "dnl Checks for libcthreads required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libcthreads is available\ndnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBCTHREADS_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libcthreads\" = xno],\n    [ac_cv_libcthreads=no],\n    [ac_cv_libcthreads=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libcthreads which returns \"yes\" and --with-libcthreads= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libcthreads\" != x && test \"x$ac_cv_with_libcthreads\" != xauto-detect && test \"x$ac_cv_with_libcthreads\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libcthreads])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libcthreads],\n          [libcthreads >= 20160404],\n          [ac_cv_libcthreads=yes],\n          [ac_cv_libcthreads=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libcthreads\" = xyes],\n        [ac_cv_libcthreads_CPPFLAGS=\"$pkg_cv_libcthreads_CFLAGS\"\n        ac_cv_libcthreads_LIBADD=\"$pkg_cv_libcthreads_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libcthreads\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libcthreads.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libcthreads_h\" = xno],\n        [ac_cv_libcthreads=no],\n        [ac_cv_libcthreads=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libcthreads],\n          [cthreads],\n          [[libcthreads_get_version],\n           [libcthreads_thread_create],\n           [libcthreads_thread_join],\n           [libcthreads_thread_attributes_initialize],\n           [libcthreads_thread_attributes_free],\n           [libcthreads_condition_initialize],\n           [libcthreads_condition_free],\n           [libcthreads_condition_broadcast],\n           [libcthreads_condition_signal],\n           [libcthreads_condition_wait],\n           [libcthreads_lock_initialize],\n           [libcthreads_lock_free],\n           [libcthreads_lock_grab],\n           [libcthreads_lock_release],\n           [libcthreads_mutex_initialize],\n           [libcthreads_mutex_free],\n           [libcthreads_mutex_grab],\n           [libcthreads_mutex_try_grab],\n           [libcthreads_mutex_release],\n           [libcthreads_read_write_lock_initialize],\n           [libcthreads_read_write_lock_free],\n           [libcthreads_read_write_lock_grab_for_read],\n           [libcthreads_read_write_lock_grab_for_write],\n           [libcthreads_read_write_lock_release_for_read],\n           [libcthreads_read_write_lock_release_for_write],\n           [libcthreads_queue_initialize],\n           [libcthreads_queue_free],\n           [libcthreads_queue_type_pop],\n           [libcthreads_queue_pop],\n           [libcthreads_queue_try_push],\n           [libcthreads_queue_push],\n           [libcthreads_queue_push_sorted],\n           [libcthreads_thread_pool_create],\n           [libcthreads_thread_pool_push],\n           [libcthreads_thread_pool_push_sorted],\n           [libcthreads_thread_pool_join]])\n\n        ac_cv_libcthreads_LIBADD=\"-lcthreads\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libcthreads])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBCTHREADS],\n      [1],\n      [Define to 1 if you have the `cthreads' library (-lcthreads).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" = xyes],\n    [ac_cv_libcthreads_multi_threading=libcthreads],\n    [ac_cv_libcthreads_multi_threading=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBCTHREADS],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBCTHREADS],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libcthreads dependencies are available\nAC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL],\n  [AS_IF(\n    [test \"x$ac_cv_enable_winapi\" = xno],\n    [dnl Check for enabling pthread support\n    AX_PTHREAD_CHECK_ENABLE\n      ac_cv_libcthreads_multi_threading=$ac_cv_pthread],\n    [ac_cv_libcthreads_multi_threading=\"winapi\"])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads_multi_threading\" != xno],\n    [ac_cv_libcthreads_CPPFLAGS=\"-I../libcthreads -I\\$(top_srcdir)/libcthreads\";\n    ac_cv_libcthreads_LIBADD=\"../libcthreads/libcthreads.la\";\n\n    ac_cv_libcthreads=local],\n    [ac_cv_libcthreads=no])\n  ])\n\ndnl Function to detect how to enable libcthreads\nAC_DEFUN([AX_LIBCTHREADS_CHECK_ENABLE],\n  [AX_COMMON_ARG_ENABLE(\n    [multi-threading-support],\n    [multi_threading_support],\n    [enable multi-threading support],\n    [yes])\n  AX_COMMON_ARG_WITH(\n    [libcthreads],\n    [libcthreads],\n    [search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  AS_IF(\n    [test \"x$ac_cv_enable_multi_threading_support\" = xno],\n    [ac_cv_libcthreads=\"no\"\n    ac_cv_libcthreads_multi_threading=\"no\"],\n    [dnl Check for a shared library version\n    AX_LIBCTHREADS_CHECK_LIB\n\n    dnl Check if the dependencies for the local library version\n    AS_IF(\n      [test \"x$ac_cv_libcthreads\" != xyes],\n      [AX_LIBCTHREADS_CHECK_LOCAL\n\n      AC_DEFINE(\n        [HAVE_LOCAL_LIBCTHREADS],\n        [1],\n        [Define to 1 if the local version of libcthreads is used.])\n      AC_SUBST(\n        [HAVE_LOCAL_LIBCTHREADS],\n        [1])\n      ])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBCTHREADS],\n    [test \"x$ac_cv_libcthreads\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libcthreads_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBCTHREADS_CPPFLAGS],\n      [$ac_cv_libcthreads_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libcthreads_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBCTHREADS_LIBADD],\n      [$ac_cv_libcthreads_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" != xno],\n    [AC_DEFINE(\n      [HAVE_MULTI_THREAD_SUPPORT],\n      [1],\n      [Define to 1 if multi thread support should be used.])\n    AC_SUBST(\n      [HAVE_MULTI_THREAD_SUPPORT],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_MULTI_THREAD_SUPPORT],\n      [0])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" = xyes],\n    [AC_SUBST(\n      [ax_libcthreads_pc_libs_private],\n      [-lcthreads])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libcthreads\" = xyes],\n    [AC_SUBST(\n      [ax_libcthreads_spec_requires],\n      [libcthreads])\n    AC_SUBST(\n      [ax_libcthreads_spec_build_requires],\n      [libcthreads-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libfcache.m4",
    "content": "dnl Checks for libfcache required headers and functions\ndnl\ndnl Version: 20240514\n\ndnl Function to detect if libfcache is available\ndnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFCACHE_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfcache\" = xno],\n    [ac_cv_libfcache=no],\n    [ac_cv_libfcache=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfcache which returns \"yes\" and --with-libfcache= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfcache\" != x && test \"x$ac_cv_with_libfcache\" != xauto-detect && test \"x$ac_cv_with_libfcache\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfcache])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfcache],\n          [libfcache >= 20191109],\n          [ac_cv_libfcache=yes],\n          [ac_cv_libfcache=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfcache\" = xyes],\n        [ac_cv_libfcache_CPPFLAGS=\"$pkg_cv_libfcache_CFLAGS\"\n        ac_cv_libfcache_LIBADD=\"$pkg_cv_libfcache_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfcache\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfcache.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfcache_h\" = xno],\n        [ac_cv_libfcache=no],\n        [ac_cv_libfcache=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfcache],\n          [fcache],\n          [[libfcache_get_version],\n           [libfcache_cache_initialize],\n           [libfcache_cache_free],\n           [libfcache_cache_clone],\n           [libfcache_cache_clear],\n           [libfcache_cache_get_number_of_entries],\n           [libfcache_cache_get_number_of_cache_values],\n           [libfcache_cache_clear_value_by_index],\n           [libfcache_cache_get_value_by_identifier],\n           [libfcache_cache_get_value_by_index],\n           [libfcache_cache_set_value_by_identifier],\n           [libfcache_cache_set_value_by_index],\n           [libfcache_cache_value_free],\n           [libfcache_cache_value_clear],\n           [libfcache_cache_value_get_identifier],\n           [libfcache_cache_value_set_identifier],\n           [libfcache_cache_value_get_value],\n           [libfcache_cache_value_set_value],\n           [libfcache_date_time_get_timestamp]])\n\n        ac_cv_libfcache_LIBADD=\"-lfcache\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfcache])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfcache\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFCACHE],\n      [1],\n      [Define to 1 if you have the `fcache' library (-lfcache).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfcache\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFCACHE],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFCACHE],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfcache dependencies are available\nAC_DEFUN([AX_LIBFCACHE_CHECK_LOCAL],\n  [dnl Types used in libfcache/libfcache_date_time.h\n  AC_STRUCT_TM\n\n  dnl Headers included in libfcache/libfcache_date_time.h\n  AC_CHECK_HEADERS([sys/time.h])\n\n  dnl Date and time functions used in libfcache/libfcache_date_time.h\n  AC_CHECK_FUNCS([clock_gettime time])\n\n  AS_IF(\n    [test \"x$ac_cv_func_time\" != xyes],\n    [AC_MSG_FAILURE(\n      [Missing function: time],\n      [1])\n    ])\n\n  ac_cv_libfcache_CPPFLAGS=\"-I../libfcache -I\\$(top_srcdir)/libfcache\";\n  ac_cv_libfcache_LIBADD=\"../libfcache/libfcache.la\";\n\n  ac_cv_libfcache=local\n  ])\n\ndnl Function to detect how to enable libfcache\nAC_DEFUN([AX_LIBFCACHE_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfcache],\n    [libfcache],\n    [search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFCACHE_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfcache\" != xyes],\n    [AX_LIBFCACHE_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFCACHE],\n      [1],\n      [Define to 1 if the local version of libfcache is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFCACHE],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFCACHE],\n    [test \"x$ac_cv_libfcache\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfcache_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFCACHE_CPPFLAGS],\n      [$ac_cv_libfcache_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfcache_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFCACHE_LIBADD],\n      [$ac_cv_libfcache_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfcache\" = xyes],\n    [AC_SUBST(\n      [ax_libfcache_pc_libs_private],\n      [-lfcache])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfcache\" = xyes],\n    [AC_SUBST(\n      [ax_libfcache_spec_requires],\n      [libfcache])\n    AC_SUBST(\n      [ax_libfcache_spec_build_requires],\n      [libfcache-devel])\n    ])\n  ])\n"
  },
  {
    "path": "m4/libfdata.m4",
    "content": "dnl Functions for libfdata\ndnl\ndnl Version: 20240520\n\ndnl Function to detect if libfdata is available\ndnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFDATA_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfdata\" = xno],\n    [ac_cv_libfdata=no],\n    [ac_cv_libfdata=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfdata which returns \"yes\" and --with-libfdata= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfdata\" != x && test \"x$ac_cv_with_libfdata\" != xauto-detect && test \"x$ac_cv_with_libfdata\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfdata])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfdata],\n          [libfdata >= 20201129],\n          [ac_cv_libfdata=yes],\n          [ac_cv_libfdata=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfdata\" = xyes],\n        [ac_cv_libfdata_CPPFLAGS=\"$pkg_cv_libfdata_CFLAGS\"\n        ac_cv_libfdata_LIBADD=\"$pkg_cv_libfdata_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfdata\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfdata.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfdata_h\" = xno],\n        [ac_cv_libfdata=no],\n        [ac_cv_libfdata=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfdata],\n          [fdata],\n          [[libfdata_get_version],\n           [libfdata_area_initialize],\n           [libfdata_area_free],\n           [libfdata_area_clone],\n           [libfdata_area_empty],\n           [libfdata_area_resize],\n           [libfdata_area_get_number_of_segments],\n           [libfdata_area_get_segment_by_index],\n           [libfdata_area_set_segment_by_index],\n           [libfdata_area_prepend_segment],\n           [libfdata_area_append_segment],\n           [libfdata_area_get_element_data_size],\n           [libfdata_area_get_element_value_at_offset],\n           [libfdata_area_set_element_value_at_offset],\n           [libfdata_area_get_size],\n           [libfdata_list_initialize],\n           [libfdata_list_free],\n           [libfdata_list_clone],\n           [libfdata_list_empty],\n           [libfdata_list_resize],\n           [libfdata_list_reverse],\n           [libfdata_list_get_number_of_elements],\n           [libfdata_list_get_list_element_by_index],\n           [libfdata_list_get_element_by_index],\n           [libfdata_list_set_element_by_index],\n           [libfdata_list_prepend_element],\n           [libfdata_list_append_element],\n           [libfdata_list_append_list],\n           [libfdata_list_is_element_set],\n           [libfdata_list_get_element_mapped_range],\n           [libfdata_list_get_mapped_offset],\n           [libfdata_list_set_mapped_offset],\n           [libfdata_list_get_mapped_size_by_index],\n           [libfdata_list_set_mapped_size_by_index],\n           [libfdata_list_get_element_by_index_with_mapped_size],\n           [libfdata_list_set_element_by_index_with_mapped_size],\n           [libfdata_list_append_element_with_mapped_size],\n           [libfdata_list_get_element_index_at_offset],\n           [libfdata_list_get_list_element_at_offset],\n           [libfdata_list_get_element_at_offset],\n           [libfdata_list_cache_element_value],\n           [libfdata_list_get_element_value_by_index],\n           [libfdata_list_get_element_value_at_offset],\n           [libfdata_list_set_element_value_by_index],\n           [libfdata_list_set_element_value_at_offset],\n           [libfdata_list_get_size],\n           [libfdata_list_element_get_mapped_size],\n           [libfdata_list_element_set_mapped_size],\n           [libfdata_list_element_get_element_value],\n           [libfdata_list_element_set_element_value],\n           [libfdata_list_element_get_mapped_size],\n           [libfdata_list_element_set_mapped_size],\n           [libfdata_list_element_get_element_value],\n           [libfdata_list_element_set_element_value],\n           [libfdata_stream_initialize],\n           [libfdata_stream_free],\n           [libfdata_stream_clone],\n           [libfdata_stream_empty],\n           [libfdata_stream_resize],\n           [libfdata_stream_reverse],\n           [libfdata_stream_get_number_of_segments],\n           [libfdata_stream_get_segment_by_index],\n           [libfdata_stream_set_segment_by_index],\n           [libfdata_stream_prepend_segment],\n           [libfdata_stream_append_segment],\n           [libfdata_stream_set_mapped_size],\n           [libfdata_stream_get_segment_mapped_range],\n           [libfdata_stream_get_segment_index_at_offset],\n           [libfdata_stream_get_segment_at_offset],\n           [libfdata_stream_read_buffer],\n           [libfdata_stream_read_buffer_at_offset],\n           [libfdata_stream_write_buffer],\n           [libfdata_stream_seek_offset],\n           [libfdata_stream_get_offset],\n           [libfdata_stream_get_size],\n           [libfdata_range_list_initialize],\n           [libfdata_range_list_free],\n           [libfdata_range_list_clone],\n           [libfdata_range_list_empty],\n           [libfdata_range_list_get_list_element_at_offset],\n           [libfdata_range_list_get_element_at_offset],\n           [libfdata_range_list_insert_element],\n           [libfdata_range_list_get_element_value_at_offset],\n           [libfdata_range_list_set_element_value_at_offset],\n           [libfdata_vector_initialize],\n           [libfdata_vector_free],\n           [libfdata_vector_clone],\n           [libfdata_vector_empty],\n           [libfdata_vector_resize],\n           [libfdata_vector_get_number_of_segments],\n           [libfdata_vector_get_segment_by_index],\n           [libfdata_vector_set_segment_by_index],\n           [libfdata_vector_prepend_segment],\n           [libfdata_vector_append_segment],\n           [libfdata_vector_get_element_data_size],\n           [libfdata_vector_get_number_of_elements],\n           [libfdata_vector_get_element_index_at_offset],\n           [libfdata_vector_get_element_value_by_index],\n           [libfdata_vector_get_element_value_at_offset],\n           [libfdata_vector_set_element_value_by_index],\n           [libfdata_vector_get_size]])\n\n        ac_cv_libfdata_LIBADD=\"-lfdata\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfdata])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdata\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFDATA],\n      [1],\n      [Define to 1 if you have the `fdata' library (-lfdata).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdata\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFDATA],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFDATA],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfdata dependencies are available\nAC_DEFUN([AX_LIBFDATA_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libfdata_CPPFLAGS=\"-I../libfdata -I\\$(top_srcdir)/libfdata\";\n  ac_cv_libfdata_LIBADD=\"../libfdata/libfdata.la\";\n\n  ac_cv_libfdata=local\n  ])\n\ndnl Function to detect how to enable libfdata\nAC_DEFUN([AX_LIBFDATA_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfdata],\n    [libfdata],\n    [search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFDATA_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfdata\" != xyes],\n    [AX_LIBFDATA_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFDATA],\n      [1],\n      [Define to 1 if the local version of libfdata is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFDATA],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFDATA],\n    [test \"x$ac_cv_libfdata\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfdata_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFDATA_CPPFLAGS],\n      [$ac_cv_libfdata_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfdata_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFDATA_LIBADD],\n      [$ac_cv_libfdata_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdata\" = xyes],\n    [AC_SUBST(\n      [ax_libfdata_pc_libs_private],\n      [-lfdata])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdata\" = xyes],\n    [AC_SUBST(\n      [ax_libfdata_spec_requires],\n      [libfdata])\n    AC_SUBST(\n      [ax_libfdata_spec_build_requires],\n      [libfdata-devel])\n    ])\n  ])\n"
  },
  {
    "path": "m4/libfdatetime.m4",
    "content": "dnl Checks for libfdatetime required headers and functions\ndnl\ndnl Version: 20240518\n\ndnl Function to detect if libfdatetime is available\ndnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFDATETIME_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfdatetime\" = xno],\n    [ac_cv_libfdatetime=no],\n    [ac_cv_libfdatetime=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfdatetime which returns \"yes\" and --with-libfdatetime= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfdatetime\" != x && test \"x$ac_cv_with_libfdatetime\" != xauto-detect && test \"x$ac_cv_with_libfdatetime\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfdatetime])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfdatetime],\n          [libfdatetime >= 20180910],\n          [ac_cv_libfdatetime=yes],\n          [ac_cv_libfdatetime=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfdatetime\" = xyes],\n        [ac_cv_libfdatetime_CPPFLAGS=\"$pkg_cv_libfdatetime_CFLAGS\"\n        ac_cv_libfdatetime_LIBADD=\"$pkg_cv_libfdatetime_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfdatetime\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfdatetime.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfdatetime_h\" = xno],\n        [ac_cv_libfdatetime=no],\n        [ac_cv_libfdatetime=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfdatetime],\n          [fdatetime],\n          [[libfdatetime_get_version],\n           [libfdatetime_fat_date_time_initialize],\n           [libfdatetime_fat_date_time_free],\n           [libfdatetime_fat_date_time_copy_from_byte_stream],\n           [libfdatetime_fat_date_time_copy_from_32bit],\n           [libfdatetime_fat_date_time_copy_to_32bit],\n           [libfdatetime_fat_date_time_copy_to_utf8_string],\n           [libfdatetime_fat_date_time_copy_to_utf8_string_with_index],\n           [libfdatetime_fat_date_time_copy_to_utf16_string],\n           [libfdatetime_fat_date_time_copy_to_utf16_string_with_index],\n           [libfdatetime_fat_date_time_copy_to_utf32_string],\n           [libfdatetime_fat_date_time_copy_to_utf32_string_with_index],\n           [libfdatetime_filetime_initialize],\n           [libfdatetime_filetime_free],\n           [libfdatetime_filetime_copy_from_byte_stream],\n           [libfdatetime_filetime_copy_from_64bit],\n           [libfdatetime_filetime_copy_to_64bit],\n           [libfdatetime_filetime_copy_to_utf8_string],\n           [libfdatetime_filetime_copy_to_utf8_string_with_index],\n           [libfdatetime_filetime_copy_to_utf16_string],\n           [libfdatetime_filetime_copy_to_utf16_string_with_index],\n           [libfdatetime_filetime_copy_to_utf32_string],\n           [libfdatetime_filetime_copy_to_utf32_string_with_index],\n           [libfdatetime_filetime_add],\n           [libfdatetime_floatingtime_initialize],\n           [libfdatetime_floatingtime_free],\n           [libfdatetime_floatingtime_copy_from_byte_stream],\n           [libfdatetime_floatingtime_copy_from_64bit],\n           [libfdatetime_floatingtime_copy_to_64bit],\n           [libfdatetime_floatingtime_copy_to_utf8_string],\n           [libfdatetime_floatingtime_copy_to_utf8_string_with_index],\n           [libfdatetime_floatingtime_copy_to_utf16_string],\n           [libfdatetime_floatingtime_copy_to_utf16_string_with_index],\n           [libfdatetime_floatingtime_copy_to_utf32_string],\n           [libfdatetime_floatingtime_copy_to_utf32_string_with_index],\n           [libfdatetime_hfs_time_initialize],\n           [libfdatetime_hfs_time_free],\n           [libfdatetime_hfs_time_copy_from_byte_stream],\n           [libfdatetime_hfs_time_copy_from_32bit],\n           [libfdatetime_hfs_time_copy_to_32bit],\n           [libfdatetime_hfs_time_copy_to_utf8_string],\n           [libfdatetime_hfs_time_copy_to_utf8_string_with_index],\n           [libfdatetime_hfs_time_copy_to_utf16_string],\n           [libfdatetime_hfs_time_copy_to_utf16_string_with_index],\n           [libfdatetime_hfs_time_copy_to_utf32_string],\n           [libfdatetime_hfs_time_copy_to_utf32_string_with_index],\n           [libfdatetime_nsf_timedate_initialize],\n           [libfdatetime_nsf_timedate_free],\n           [libfdatetime_nsf_timedate_copy_from_byte_stream],\n           [libfdatetime_nsf_timedate_copy_from_64bit],\n           [libfdatetime_nsf_timedate_copy_to_64bit],\n           [libfdatetime_nsf_timedate_copy_to_utf8_string],\n           [libfdatetime_nsf_timedate_copy_to_utf8_string_with_index],\n           [libfdatetime_nsf_timedate_copy_to_utf16_string],\n           [libfdatetime_nsf_timedate_copy_to_utf16_string_with_index],\n           [libfdatetime_nsf_timedate_copy_to_utf32_string],\n           [libfdatetime_nsf_timedate_copy_to_utf32_string_with_index],\n           [libfdatetime_posix_time_initialize],\n           [libfdatetime_posix_time_free],\n           [libfdatetime_posix_time_copy_from_byte_stream],\n           [libfdatetime_posix_time_copy_from_32bit],\n           [libfdatetime_posix_time_copy_to_32bit],\n           [libfdatetime_posix_time_copy_from_64bit],\n           [libfdatetime_posix_time_copy_to_64bit],\n           [libfdatetime_posix_time_copy_to_utf8_string],\n           [libfdatetime_posix_time_copy_to_utf8_string_with_index],\n           [libfdatetime_posix_time_copy_to_utf16_string],\n           [libfdatetime_posix_time_copy_to_utf16_string_with_index],\n           [libfdatetime_posix_time_copy_to_utf32_string],\n           [libfdatetime_posix_time_copy_to_utf32_string_with_index],\n           [libfdatetime_systemetime_initialize],\n           [libfdatetime_systemetime_free],\n           [libfdatetime_systemetime_copy_from_byte_stream],\n           [libfdatetime_systemetime_copy_to_utf8_string],\n           [libfdatetime_systemetime_copy_to_utf8_string_with_index],\n           [libfdatetime_systemetime_copy_to_utf16_string],\n           [libfdatetime_systemetime_copy_to_utf16_string_with_index],\n           [libfdatetime_systemetime_copy_to_utf32_string],\n           [libfdatetime_systemetime_copy_to_utf32_string_with_index]])\n\n        ac_cv_libfdatetime_LIBADD=\"-lfdatetime\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfdatetime])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFDATETIME],\n      [1],\n      [Define to 1 if you have the `fdatetime' library (-lfdatetime).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFDATETIME],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFDATETIME],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfdatetime dependencies are available\nAC_DEFUN([AX_LIBFDATETIME_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libfdatetime_CPPFLAGS=\"-I../libfdatetime -I\\$(top_srcdir)/libfdatetime\";\n  ac_cv_libfdatetime_LIBADD=\"../libfdatetime/libfdatetime.la\";\n\n  ac_cv_libfdatetime=local\n  ])\n\ndnl Function to detect how to enable libfdatetime\nAC_DEFUN([AX_LIBFDATETIME_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfdatetime],\n    [libfdatetime],\n    [search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  AX_LIBFDATETIME_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime\" != xyes],\n    [AX_LIBFDATETIME_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFDATETIME],\n      [1],\n      [Define to 1 if the local version of libfdatetime is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFDATETIME],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFDATETIME],\n    [test \"x$ac_cv_libfdatetime\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFDATETIME_CPPFLAGS],\n      [$ac_cv_libfdatetime_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFDATETIME_LIBADD],\n      [$ac_cv_libfdatetime_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime\" = xyes],\n    [AC_SUBST(\n      [ax_libfdatetime_pc_libs_private],\n      [-lfdatetime])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfdatetime\" = xyes],\n    [AC_SUBST(\n      [ax_libfdatetime_spec_requires],\n      [libfdatetime])\n    AC_SUBST(\n      [ax_libfdatetime_spec_build_requires],\n      [libfdatetime-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libfguid.m4",
    "content": "dnl Checks for libfguid required headers and functions\ndnl\ndnl Version: 20240519\n\ndnl Function to detect if libfguid is available\ndnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFGUID_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfguid\" = xno],\n    [ac_cv_libfguid=no],\n    [ac_cv_libfguid=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfguid which returns \"yes\" and --with-libfguid= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfguid\" != x && test \"x$ac_cv_with_libfguid\" != xauto-detect && test \"x$ac_cv_with_libfguid\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfguid])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfguid],\n          [libfguid >= 20120426],\n          [ac_cv_libfguid=yes],\n          [ac_cv_libfguid=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfguid\" = xyes],\n        [ac_cv_libfguid_CPPFLAGS=\"$pkg_cv_libfguid_CFLAGS\"\n        ac_cv_libfguid_LIBADD=\"$pkg_cv_libfguid_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfguid\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfguid.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfguid_h\" = xno],\n        [ac_cv_libfguid=no],\n        [ac_cv_libfguid=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfguid],\n          [fguid],\n          [[libfguid_get_version],\n           [libfguid_identifier_initialize],\n           [libfguid_identifier_free],\n           [libfguid_identifier_copy_from_byte_stream],\n           [libfguid_identifier_get_string_size],\n           [libfguid_identifier_copy_to_utf8_string],\n           [libfguid_identifier_copy_to_utf8_string_with_index],\n           [libfguid_identifier_copy_to_utf16_string],\n           [libfguid_identifier_copy_to_utf16_string_with_index],\n           [libfguid_identifier_copy_to_utf32_string],\n           [libfguid_identifier_copy_to_utf32_string_with_index]])\n\n        ac_cv_libfguid_LIBADD=\"-lfguid\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfguid])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfguid\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFGUID],\n      [1],\n      [Define to 1 if you have the `fguid' library (-lfguid).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfguid\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFGUID],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFGUID],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfguid dependencies are available\nAC_DEFUN([AX_LIBFGUID_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libfguid_CPPFLAGS=\"-I../libfguid -I\\$(top_srcdir)/libfguid\";\n  ac_cv_libfguid_LIBADD=\"../libfguid/libfguid.la\";\n\n  ac_cv_libfguid=local\n  ])\n\n\ndnl Function to detect how to enable libfguid\nAC_DEFUN([AX_LIBFGUID_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfguid],\n    [libfguid],\n    [search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFGUID_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfguid\" != xyes],\n    [AX_LIBFGUID_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFGUID],\n      [1],\n      [Define to 1 if the local version of libfguid is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFGUID],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFGUID],\n    [test \"x$ac_cv_libfguid\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfguid_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFGUID_CPPFLAGS],\n      [$ac_cv_libfguid_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfguid_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFGUID_LIBADD],\n      [$ac_cv_libfguid_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfguid\" = xyes],\n    [AC_SUBST(\n      [ax_libfguid_pc_libs_private],\n      [-lfguid])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfguid\" = xyes],\n    [AC_SUBST(\n      [ax_libfguid_spec_requires],\n      [libfguid])\n    AC_SUBST(\n      [ax_libfguid_spec_build_requires],\n      [libfguid-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libfuse.m4",
    "content": "dnl Checks for libfuse required headers and functions\ndnl\ndnl Version: 20240413\n\ndnl Function to detect if libfuse is available\ndnl ac_libfuse_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFUSE_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfuse\" = xno],\n    [ac_cv_libfuse=no],\n    [dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfuse which returns \"yes\" and --with-libfuse= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfuse\" != x && test \"x$ac_cv_with_libfuse\" != xauto-detect && test \"x$ac_cv_with_libfuse\" != xyes],\n      [AS_IF(\n        [test -d \"$ac_cv_with_libfuse\"],\n        [CFLAGS=\"$CFLAGS -I${ac_cv_with_libfuse}/include\"\n        LDFLAGS=\"$LDFLAGS -L${ac_cv_with_libfuse}/lib\"],\n        [AC_MSG_FAILURE(\n          [no such directory: $ac_cv_with_libfuse],\n          [1])\n        ])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [fuse3],\n          [fuse3 >= 3.0],\n          [ac_cv_libfuse=libfuse3],\n          [ac_cv_libfuse=no])\n\n        AS_IF(\n          [test \"x$ac_cv_libfuse\" = xno],\n          [PKG_CHECK_MODULES(\n            [fuse],\n            [fuse >= 2.6],\n            [ac_cv_libfuse=libfuse],\n            [ac_cv_libfuse=no])\n          ])\n\n        AS_IF(\n          [test \"x$ac_cv_libfuse\" = xlibfuse3],\n          [ac_cv_libfuse_CPPFLAGS=\"$pkg_cv_fuse3_CFLAGS -D_FILE_OFFSET_BITS=64\"\n          ac_cv_libfuse_LIBADD=\"$pkg_cv_fuse3_LIBS\"])\n\n        AS_IF(\n          [test \"x$ac_cv_libfuse\" = xlibfuse],\n          [ac_cv_libfuse_CPPFLAGS=\"$pkg_cv_fuse_CFLAGS -D_FILE_OFFSET_BITS=64\"\n          ac_cv_libfuse_LIBADD=\"$pkg_cv_fuse_LIBS\"])\n        ])\n      ])\n\n    backup_CPPFLAGS=\"$CPPFLAGS\"\n\n    dnl Check for libfuse and libfuse3\n    AS_IF(\n      [test \"x$ac_cv_libfuse\" != xlibfuse && test \"x$ac_cv_libfuse\" != xlibfuse3],\n      [dnl Check for headers\n\n      CPPFLAGS=\"$backup_CPPFLAGS -DFUSE_USE_VERSION=30\"\n      AC_CHECK_HEADERS([fuse.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_fuse_h\" = xyes],\n        [ac_cv_libfuse=libfuse3],\n        [CPPFLAGS=\"$backup_CPPFLAGS -DFUSE_USE_VERSION=26\"\n        AC_CHECK_HEADERS([fuse.h])\n\n        AS_IF(\n          [test \"x$ac_cv_header_fuse_h\" = xyes],\n          [ac_cv_libfuse=libfuse])\n        ])\n\n      AS_IF(\n        [test \"x$ac_cv_header_fuse_h\" = xno],\n        [ac_cv_libfuse=no],\n        [dnl Check for the individual functions\n        AC_CHECK_LIB(\n          fuse,\n          fuse_invalidate,\n          [ac_cv_libfuse=libfuse],\n          [ac_cv_libfuse=libfuse3])\n\n        AC_CHECK_LIB(\n          fuse,\n          fuse_daemonize,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          fuse,\n          fuse_destroy,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          fuse,\n          fuse_mount,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          fuse,\n          fuse_new,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n\n        dnl libfuse and libfuse3 require -D_FILE_OFFSET_BITS=64 to be set\n        ac_cv_libfuse_CPPFLAGS=\"-D_FILE_OFFSET_BITS=64\"\n\n        AS_IF(\n          [test \"x$ac_cv_libfuse\" = xlibfuse3],\n          [ac_cv_libfuse_LIBADD=\"-lfuse3\"],\n          [ac_cv_libfuse_LIBADD=\"-lfuse\"])\n        ])\n      ])\n\n    dnl Check for libosxfuse\n    AS_IF(\n      [test \"x$ac_cv_with_libfuse\" != xno && test \"x$ac_cv_header_fuse_h\" = xno],\n      [CPPFLAGS=\"$backup_CPPFLAGS -DFUSE_USE_VERSION=26\"\n      AC_CHECK_HEADERS([osxfuse/fuse.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_osxfuse_fuse_h\" = xno],\n        [ac_cv_libfuse=no],\n        [dnl Check for the individual functions\n        ac_cv_libfuse=libosxfuse\n\n        AC_CHECK_LIB(\n          osxfuse,\n          fuse_daemonize,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          osxfuse,\n          fuse_destroy,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          osxfuse,\n          fuse_mount,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n        AC_CHECK_LIB(\n          osxfuse,\n          fuse_new,\n          [ac_cv_libfuse_dummy=yes],\n          [ac_cv_libfuse=no])\n\n        dnl libosxfuse requires -D_FILE_OFFSET_BITS=64 to be set\n        ac_cv_libfuse_CPPFLAGS=\"-D_FILE_OFFSET_BITS=64\"\n\n        ac_cv_libfuse_LIBADD=\"-losxfuse\";\n        ])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfuse\" != xyes && test \"x$ac_cv_with_libfuse\" != x && test \"x$ac_cv_with_libfuse\" != xauto-detect && test \"x$ac_cv_with_libfuse\" != xyes],\n      [AC_MSG_FAILURE(\n        [unable to find supported libfuse in directory: $ac_cv_with_libfuse],\n        [1])\n      ])\n\n    CPPFLAGS=\"$backup_CPPFLAGS\"\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse],\n    [AC_DEFINE(\n      [HAVE_LIBFUSE],\n      [1],\n      [Define to 1 if you have the 'fuse' library (-lfuse).])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse3],\n    [AC_DEFINE(\n      [HAVE_LIBFUSE3],\n      [1],\n      [Define to 1 if you have the 'fuse3' library (-lfuse3).])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibosxfuse],\n    [AC_DEFINE(\n      [HAVE_LIBOSXFUSE],\n      [1],\n      [Define to 1 if you have the 'osxfuse' library (-losxfuse).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" != xno],\n    [AC_SUBST(\n      [HAVE_LIBFUSE],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFUSE],\n      [0])\n    ])\n  ])\n\ndnl Function to detect how to enable libfuse\nAC_DEFUN([AX_LIBFUSE_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfuse],\n    [libfuse],\n    [search for libfuse in includedir and libdir or in the specified DIR, or no if not to use libfuse],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFUSE_CHECK_LIB\n\n  AS_IF(\n    [test \"x$ac_cv_libfuse_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFUSE_CPPFLAGS],\n      [$ac_cv_libfuse_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFUSE_LIBADD],\n      [$ac_cv_libfuse_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse],\n    [AC_SUBST(\n      [ax_libfuse_pc_libs_private],\n      [-lfuse])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse3],\n    [AC_SUBST(\n      [ax_libfuse_pc_libs_private],\n      [-lfuse3])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibosxfuse],\n    [AC_SUBST(\n      [ax_libfuse_pc_libs_private],\n      [-losxfuse])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse],\n    [AC_SUBST(\n      [ax_libfuse_spec_requires],\n      [fuse-libs])\n    AC_SUBST(\n      [ax_libfuse_spec_build_requires],\n      [fuse-devel])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfuse\" = xlibfuse3],\n    [AC_SUBST(\n      [ax_libfuse_spec_requires],\n      [fuse3-libs])\n    AC_SUBST(\n      [ax_libfuse_spec_build_requires],\n      [fuse3-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libfusn.m4",
    "content": "dnl Checks for libfusn required headers and functions\ndnl\ndnl Version: 20240521\n\ndnl Function to detect if libfusn is available\ndnl ac_libfusn_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFUSN_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfusn\" = xno],\n    [ac_cv_libfusn=no],\n    [ac_cv_libfusn=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfusn which returns \"yes\" and --with-libfusn= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfusn\" != x && test \"x$ac_cv_with_libfusn\" != xauto-detect && test \"x$ac_cv_with_libfusn\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfusn])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfusn],\n          [libfusn >= 20180611],\n          [ac_cv_libfusn=yes],\n          [ac_cv_libfusn=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfusn\" = xyes],\n        [ac_cv_libfusn_CPPFLAGS=\"$pkg_cv_libfusn_CFLAGS\"\n        ac_cv_libfusn_LIBADD=\"$pkg_cv_libfusn_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfusn\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfusn.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfusn_h\" = xno],\n        [ac_cv_libfusn=no],\n        [ac_cv_libfusn=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfusn],\n          [fusn],\n          [[libfusn_get_version],\n           [libfusn_record_initialize],\n           [libfusn_record_free],\n           [libfusn_record_copy_from_byte_stream],\n           [libfusn_record_get_size],\n           [libfusn_record_get_update_time],\n           [libfusn_record_get_file_reference],\n           [libfusn_record_get_parent_file_reference],\n           [libfusn_record_get_update_sequence_number],\n           [libfusn_record_get_update_reason_flags],\n           [libfusn_record_get_update_source_flags],\n           [libfusn_record_get_file_attribute_flags],\n           [libfusn_record_get_utf8_name_size],\n           [libfusn_record_get_utf8_name],\n           [libfusn_record_get_utf16_name_size],\n           [libfusn_record_get_utf16_name]])\n\n        ac_cv_libfusn_LIBADD=\"-lfusn\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfusn])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfusn\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFUSN],\n      [1],\n      [Define to 1 if you have the `fusn' library (-lfusn).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfusn\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFUSN],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFUSN],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfusn dependencies are available\nAC_DEFUN([AX_LIBFUSN_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libfusn_CPPFLAGS=\"-I../libfusn -I\\$(top_srcdir)/libfusn\";\n  ac_cv_libfusn_LIBADD=\"../libfusn/libfusn.la\";\n\n  ac_cv_libfusn=local\n  ])\n\ndnl Function to detect how to enable libfusn\nAC_DEFUN([AX_LIBFUSN_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfusn],\n    [libfusn],\n    [search for libfusn in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFUSN_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfusn\" != xyes],\n    [AX_LIBFUSN_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFUSN],\n      [1],\n      [Define to 1 if the local version of libfusn is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFUSN],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFUSN],\n    [test \"x$ac_cv_libfusn\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfusn_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFUSN_CPPFLAGS],\n      [$ac_cv_libfusn_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfusn_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFUSN_LIBADD],\n      [$ac_cv_libfusn_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfusn\" = xyes],\n    [AC_SUBST(\n      [ax_libfusn_pc_libs_private],\n      [-lfusn])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfusn\" = xyes],\n    [AC_SUBST(\n      [ax_libfusn_spec_requires],\n      [libfusn])\n    AC_SUBST(\n      [ax_libfusn_spec_build_requires],\n      [libfusn-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libfwnt.m4",
    "content": "dnl Checks for libfwnt required headers and functions\ndnl\ndnl Version: 20240519\n\ndnl Function to detect if libfwnt is available\ndnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBFWNT_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libfwnt\" = xno],\n    [ac_cv_libfwnt=no],\n    [ac_cv_libfwnt=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libfwnt which returns \"yes\" and --with-libfwnt= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libfwnt\" != x && test \"x$ac_cv_with_libfwnt\" != xauto-detect && test \"x$ac_cv_with_libfwnt\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libfwnt])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libfwnt],\n          [libfwnt >= 20191217],\n          [ac_cv_libfwnt=yes],\n          [ac_cv_libfwnt=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libfwnt\" = xyes],\n        [ac_cv_libfwnt_CPPFLAGS=\"$pkg_cv_libfwnt_CFLAGS\"\n        ac_cv_libfwnt_LIBADD=\"$pkg_cv_libfwnt_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libfwnt\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libfwnt.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libfwnt_h\" = xno],\n        [ac_cv_libfwnt=no],\n        [ac_cv_libfwnt=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libfwnt],\n          [fwnt],\n          [[libfwnt_get_version],\n           [libfwnt_array_initialize],\n           [libfwnt_security_descriptor_initialize],\n           [libfwnt_security_descriptor_free],\n           [libfwnt_security_descriptor_copy_from_byte_stream],\n           [libfwnt_security_descriptor_get_owner],\n           [libfwnt_security_descriptor_get_group],\n           [libfwnt_security_descriptor_get_discretionary_acl],\n           [libfwnt_security_descriptor_get_system_acl],\n           [libfwnt_security_identifier_initialize],\n           [libfwnt_security_identifier_free],\n           [libfwnt_security_identifier_copy_from_byte_stream],\n           [libfwnt_security_identifier_get_string_size],\n           [libfwnt_security_identifier_copy_to_utf8_string],\n           [libfwnt_security_identifier_copy_to_utf8_string_with_index],\n           [libfwnt_security_identifier_copy_to_utf16_string],\n           [libfwnt_security_identifier_copy_to_utf16_string_with_index],\n           [libfwnt_security_identifier_copy_to_utf32_string],\n           [libfwnt_security_identifier_copy_to_utf32_string_with_index],\n           [libfwnt_access_control_list_free],\n           [libfwnt_access_control_list_get_number_of_entries],\n           [libfwnt_access_control_list_get_entry_by_index],\n           [libfwnt_access_control_entry_free],\n           [libfwnt_access_control_entry_get_type],\n           [libfwnt_access_control_entry_get_flags],\n           [libfwnt_access_control_entry_get_access_mask],\n           [libfwnt_access_control_entry_get_security_identifier],\n           [libfwnt_lznt1_decompress],\n           [libfwnt_lzx_decompress],\n           [libfwnt_lzxpress_decompress],\n           [libfwnt_lzxpress_huffman_decompress]])\n\n        ac_cv_libfwnt_LIBADD=\"-lfwnt\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libfwnt])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfwnt\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBFWNT],\n      [1],\n      [Define to 1 if you have the `fwnt' library (-lfwnt).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfwnt\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBFWNT],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBFWNT],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libfwnt dependencies are available\nAC_DEFUN([AX_LIBFWNT_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libfwnt_CPPFLAGS=\"-I../libfwnt -I\\$(top_srcdir)/libfwnt\";\n  ac_cv_libfwnt_LIBADD=\"../libfwnt/libfwnt.la\";\n\n  ac_cv_libfwnt=local\n  ])\n\ndnl Function to detect how to enable libfwnt\nAC_DEFUN([AX_LIBFWNT_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libfwnt],\n    [libfwnt],\n    [search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBFWNT_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libfwnt\" != xyes],\n    [AX_LIBFWNT_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBFWNT],\n      [1],\n      [Define to 1 if the local version of libfwnt is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBFWNT],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBFWNT],\n    [test \"x$ac_cv_libfwnt\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libfwnt_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBFWNT_CPPFLAGS],\n      [$ac_cv_libfwnt_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libfwnt_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBFWNT_LIBADD],\n      [$ac_cv_libfwnt_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfwnt\" = xyes],\n    [AC_SUBST(\n      [ax_libfwnt_pc_libs_private],\n      [-lfwnt])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libfwnt\" = xyes],\n    [AC_SUBST(\n      [ax_libfwnt_spec_requires],\n      [libfwnt])\n    AC_SUBST(\n      [ax_libfwnt_spec_build_requires],\n      [libfwnt-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libhmac.m4",
    "content": "dnl Checks for libhmac required headers and functions\ndnl\ndnl Version: 20240520\n\ndnl Function to detect if libhmac is available\ndnl ac_libhmac_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBHMAC_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libhmac\" = xno],\n    [ac_cv_libhmac=no],\n    [ac_cv_libhmac=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libhmac which returns \"yes\" and --with-libhmac= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libhmac\" != x && test \"x$ac_cv_with_libhmac\" != xauto-detect && test \"x$ac_cv_with_libhmac\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libhmac])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libhmac],\n          [libhmac >= 20200104],\n          [ac_cv_libhmac=yes],\n          [ac_cv_libhmac=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libhmac\" = xyes],\n        [ac_cv_libhmac_CPPFLAGS=\"$pkg_cv_libhmac_CFLAGS\"\n        ac_cv_libhmac_LIBADD=\"$pkg_cv_libhmac_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libhmac\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libhmac.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libhmac_h\" = xno],\n        [ac_cv_libhmac=no],\n        [ac_cv_libhmac=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libhmac],\n          [hmac],\n          [[libhmac_get_version],\n           [libhmac_md5_initialize],\n           [libhmac_md5_update],\n           [libhmac_md5_finalize],\n           [libhmac_md5_free],\n           [libhmac_sha1_initialize],\n           [libhmac_sha1_update],\n           [libhmac_sha1_finalize],\n           [libhmac_sha1_free],\n           [libhmac_sha224_initialize],\n           [libhmac_sha224_update],\n           [libhmac_sha224_finalize],\n           [libhmac_sha224_free],\n           [libhmac_sha256_initialize],\n           [libhmac_sha256_update],\n           [libhmac_sha256_finalize],\n           [libhmac_sha256_free],\n           [libhmac_sha512_initialize],\n           [libhmac_sha512_update],\n           [libhmac_sha512_finalize],\n           [libhmac_sha512_free]])\n\n        ac_cv_libhmac_LIBADD=\"-lhmac\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libhmac])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBHMAC],\n      [1],\n      [Define to 1 if you have the `hmac' library (-lhmac).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" = xyes],\n    [ac_cv_libhmac_md5=libhmac\n    ac_cv_libhmac_sha1=libhmac\n    ac_cv_libhmac_sha224=libhmac\n    ac_cv_libhmac_sha256=libhmac\n    ac_cv_libhmac_sha512=libhmac],\n    [ac_cv_libhmac_md5=no\n    ac_cv_libhmac_sha1=no\n    ac_cv_libhmac_sha224=no\n    ac_cv_libhmac_sha256=no\n    ac_cv_libhmac_sha512=no])\n\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBHMAC],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBHMAC],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libhmac dependencies are available\nAC_DEFUN([AX_LIBHMAC_CHECK_LOCAL],\n  [dnl Check for libcrypto (openssl) support\n  AX_LIBCRYPTO_CHECK_ENABLE\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" != xno],\n    [AX_LIBCRYPTO_CHECK_MD5\n    AX_LIBCRYPTO_CHECK_SHA1\n    AX_LIBCRYPTO_CHECK_SHA224\n    AX_LIBCRYPTO_CHECK_SHA256\n    AX_LIBCRYPTO_CHECK_SHA512])\n\n  dnl Fallback to local versions if necessary\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno || test \"x$ac_cv_libcrypto_md5\" = xno],\n    [ac_cv_libhmac_md5=local],\n    [ac_cv_libhmac_md5=$ac_cv_libcrypto_md5])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno || test \"x$ac_cv_libcrypto_sha1\" = xno],\n    [ac_cv_libhmac_sha1=local],\n    [ac_cv_libhmac_sha1=$ac_cv_libcrypto_sha1])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno || test \"x$ac_cv_libcrypto_sha224\" = xno],\n    [ac_cv_libhmac_sha224=local],\n    [ac_cv_libhmac_sha224=$ac_cv_libcrypto_sha224])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno || test \"x$ac_cv_libcrypto_sha256\" = xno],\n    [ac_cv_libhmac_sha256=local],\n    [ac_cv_libhmac_sha256=$ac_cv_libcrypto_sha256])\n\n  AS_IF(\n    [test \"x$ac_cv_libcrypto\" = xno || test \"x$ac_cv_libcrypto_sha512\" = xno],\n    [ac_cv_libhmac_sha512=local],\n    [ac_cv_libhmac_sha512=$ac_cv_libcrypto_sha512])\n\n  ac_cv_libhmac_CPPFLAGS=\"-I../libhmac -I\\$(top_srcdir)/libhmac\";\n  ac_cv_libhmac_LIBADD=\"../libhmac/libhmac.la\";\n\n  ac_cv_libhmac=local\n  ])\n\ndnl Function to detect how to enable libhmac\nAC_DEFUN([AX_LIBHMAC_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libhmac],\n    [libhmac],\n    [search for libhmac in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBHMAC_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" != xyes],\n    [AX_LIBHMAC_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBHMAC],\n      [1],\n      [Define to 1 if the local version of libhmac is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBHMAC],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBHMAC],\n    [test \"x$ac_cv_libhmac\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libhmac_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBHMAC_CPPFLAGS],\n      [$ac_cv_libhmac_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libhmac_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBHMAC_LIBADD],\n      [$ac_cv_libhmac_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" = xyes],\n    [AC_SUBST(\n      [ax_libhmac_pc_libs_private],\n      [-lhmac])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libhmac\" = xyes],\n    [AC_SUBST(\n      [ax_libhmac_spec_requires],\n      [libhmac])\n    AC_SUBST(\n      [ax_libhmac_spec_build_requires],\n      [libhmac-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/libuna.m4",
    "content": "dnl Checks for libuna or required headers and functions\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if libuna is available\ndnl ac_libuna_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments\nAC_DEFUN([AX_LIBUNA_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_libuna\" = xno],\n    [ac_cv_libuna=no],\n    [ac_cv_libuna=check\n    dnl Check if the directory provided as parameter exists\n    dnl For both --with-libuna which returns \"yes\" and --with-libuna= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_libuna\" != x && test \"x$ac_cv_with_libuna\" != xauto-detect && test \"x$ac_cv_with_libuna\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([libuna])],\n      [dnl Check for a pkg-config file\n      AS_IF(\n        [test \"x$cross_compiling\" != \"xyes\" && test \"x$PKGCONFIG\" != \"x\"],\n        [PKG_CHECK_MODULES(\n          [libuna],\n          [libuna >= 20230702],\n          [ac_cv_libuna=yes],\n          [ac_cv_libuna=check])\n        ])\n      AS_IF(\n        [test \"x$ac_cv_libuna\" = xyes],\n        [ac_cv_libuna_CPPFLAGS=\"$pkg_cv_libuna_CFLAGS\"\n        ac_cv_libuna_LIBADD=\"$pkg_cv_libuna_LIBS\"])\n      ])\n\n    AS_IF(\n      [test \"x$ac_cv_libuna\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([libuna.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_libuna_h\" = xno],\n        [ac_cv_libuna=no],\n        [ac_cv_libuna=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [libuna],\n          [una],\n          [[libuna_get_version],\n           [libuna_base16_stream_size_to_byte_stream],\n           [libuna_base16_stream_copy_to_byte_stream],\n           [libuna_base16_stream_size_from_byte_stream],\n           [libuna_base16_stream_copy_from_byte_stream],\n           [libuna_base16_stream_with_index_copy_from_byte_stream],\n           [libuna_base32_quintuplet_copy_from_base32_stream],\n           [libuna_base32_quintuplet_copy_to_base32_stream],\n           [libuna_base32_quintuplet_copy_from_byte_stream],\n           [libuna_base32_quintuplet_copy_to_byte_stream],\n           [libuna_base32_stream_size_to_byte_stream],\n           [libuna_base32_stream_copy_to_byte_stream],\n           [libuna_base32_stream_size_from_byte_stream],\n           [libuna_base32_stream_copy_from_byte_stream],\n           [libuna_base32_stream_with_index_copy_from_byte_stream],\n           [libuna_base64_triplet_copy_from_base64_stream],\n           [libuna_base64_triplet_copy_to_base64_stream],\n           [libuna_base64_triplet_copy_from_byte_stream],\n           [libuna_base64_triplet_copy_to_byte_stream],\n           [libuna_base64_stream_size_to_byte_stream],\n           [libuna_base64_stream_copy_to_byte_stream],\n           [libuna_base64_stream_size_from_byte_stream],\n           [libuna_base64_stream_copy_from_byte_stream],\n           [libuna_base64_stream_with_index_copy_from_byte_stream],\n           [libuna_byte_stream_size_from_utf8],\n           [libuna_byte_stream_copy_from_utf8],\n           [libuna_byte_stream_size_from_utf16],\n           [libuna_byte_stream_copy_from_utf16],\n           [libuna_byte_stream_size_from_utf32],\n           [libuna_byte_stream_copy_from_utf32],\n           [libuna_unicode_character_size_to_byte_stream],\n           [libuna_unicode_character_copy_from_byte_stream],\n           [libuna_unicode_character_copy_to_byte_stream],\n           [libuna_unicode_character_size_to_ucs2],\n           [libuna_unicode_character_copy_from_ucs2],\n           [libuna_unicode_character_copy_to_ucs2],\n           [libuna_unicode_character_size_to_ucs4],\n           [libuna_unicode_character_copy_from_ucs4],\n           [libuna_unicode_character_copy_to_ucs4],\n           [libuna_unicode_character_copy_from_utf7_stream],\n           [libuna_unicode_character_copy_to_utf7_stream],\n           [libuna_unicode_character_size_to_utf8],\n           [libuna_unicode_character_copy_from_utf8],\n           [libuna_unicode_character_copy_to_utf8],\n           [libuna_unicode_character_size_to_utf8_rfc2279],\n           [libuna_unicode_character_copy_from_utf8_rfc2279],\n           [libuna_unicode_character_copy_to_utf8_rfc2279],\n           [libuna_unicode_character_size_to_utf16],\n           [libuna_unicode_character_copy_from_utf16],\n           [libuna_unicode_character_copy_to_utf16],\n           [libuna_unicode_character_copy_from_utf16_stream],\n           [libuna_unicode_character_copy_to_utf16_stream],\n           [libuna_unicode_character_copy_from_utf32],\n           [libuna_unicode_character_copy_to_utf32],\n           [libuna_unicode_character_copy_from_utf32_stream],\n           [libuna_unicode_character_copy_to_utf32_stream],\n           [libuna_utf8_stream_size_from_utf8],\n           [libuna_utf8_stream_copy_from_utf8],\n           [libuna_utf8_stream_size_from_utf16],\n           [libuna_utf8_stream_copy_from_utf16],\n           [libuna_utf8_stream_size_from_utf32],\n           [libuna_utf8_stream_copy_from_utf32],\n           [libuna_utf16_stream_size_from_utf8],\n           [libuna_utf16_stream_copy_from_utf8],\n           [libuna_utf16_stream_size_from_utf16],\n           [libuna_utf16_stream_copy_from_utf16],\n           [libuna_utf16_stream_size_from_utf32],\n           [libuna_utf16_stream_copy_from_utf32],\n           [libuna_utf32_stream_size_from_utf8],\n           [libuna_utf32_stream_copy_from_utf8],\n           [libuna_utf32_stream_size_from_utf16],\n           [libuna_utf32_stream_copy_from_utf16],\n           [libuna_utf32_stream_size_from_utf32],\n           [libuna_utf32_stream_copy_from_utf32],\n           [libuna_utf8_string_size_from_byte_stream],\n           [libuna_utf8_string_copy_from_byte_stream],\n           [libuna_utf8_string_with_index_copy_from_byte_stream],\n           [libuna_utf8_string_compare_with_byte_stream],\n           [libuna_utf8_string_size_from_utf7_stream],\n           [libuna_utf8_string_copy_from_utf7_stream],\n           [libuna_utf8_string_with_index_copy_from_utf7_stream],\n           [libuna_utf8_string_compare_with_utf7_stream],\n           [libuna_utf8_string_size_from_utf8_stream],\n           [libuna_utf8_string_copy_from_utf8_stream],\n           [libuna_utf8_string_with_index_copy_from_utf8_stream],\n           [libuna_utf8_string_compare_with_utf8_stream],\n           [libuna_utf8_string_size_from_utf16],\n           [libuna_utf8_string_copy_from_utf16],\n           [libuna_utf8_string_with_index_copy_from_utf16],\n           [libuna_utf8_string_compare_with_utf16],\n           [libuna_utf8_string_size_from_utf16_stream],\n           [libuna_utf8_string_copy_from_utf16_stream],\n           [libuna_utf8_string_with_index_copy_from_utf16_stream],\n           [libuna_utf8_string_compare_with_utf16_stream],\n           [libuna_utf8_string_size_from_utf32],\n           [libuna_utf8_string_copy_from_utf32],\n           [libuna_utf8_string_with_index_copy_from_utf32],\n           [libuna_utf8_string_compare_with_utf32],\n           [libuna_utf8_string_size_from_utf32_stream],\n           [libuna_utf8_string_copy_from_utf32_stream],\n           [libuna_utf8_string_with_index_copy_from_utf32_stream],\n           [libuna_utf8_string_compare_with_utf32_stream],\n           [libuna_utf8_string_size_from_scsu_stream],\n           [libuna_utf8_string_copy_from_scsu_stream],\n           [libuna_utf8_string_with_index_copy_from_scsu_stream],\n           [libuna_utf16_string_size_from_byte_stream],\n           [libuna_utf16_string_copy_from_byte_stream],\n           [libuna_utf16_string_with_index_copy_from_byte_stream],\n           [libuna_utf16_string_compare_with_byte_stream],\n           [libuna_utf16_string_size_from_utf7_stream],\n           [libuna_utf16_string_copy_from_utf7_stream],\n           [libuna_utf16_string_with_index_copy_from_utf7_stream],\n           [libuna_utf16_string_compare_with_utf7_stream],\n           [libuna_utf16_string_size_from_utf8],\n           [libuna_utf16_string_copy_from_utf8],\n           [libuna_utf16_string_with_index_copy_from_utf8],\n           [libuna_utf16_string_size_from_utf8_stream],\n           [libuna_utf16_string_copy_from_utf8_stream],\n           [libuna_utf16_string_with_index_copy_from_utf8_stream],\n           [libuna_utf16_string_compare_with_utf8_stream],\n           [libuna_utf16_string_size_from_utf16_stream],\n           [libuna_utf16_string_copy_from_utf16_stream],\n           [libuna_utf16_string_with_index_copy_from_utf16_stream],\n           [libuna_utf16_string_compare_with_utf16_stream],\n           [libuna_utf16_string_size_from_utf32],\n           [libuna_utf16_string_copy_from_utf32],\n           [libuna_utf16_string_with_index_copy_from_utf32],\n           [libuna_utf16_string_compare_with_utf32],\n           [libuna_utf16_string_size_from_utf32_stream],\n           [libuna_utf16_string_copy_from_utf32_stream],\n           [libuna_utf16_string_with_index_copy_from_utf32_stream],\n           [libuna_utf16_string_compare_with_utf32_stream],\n           [libuna_utf16_string_size_from_scsu_stream],\n           [libuna_utf16_string_copy_from_scsu_stream],\n           [libuna_utf16_string_with_index_copy_from_scsu_stream],\n           [libuna_utf32_string_size_from_byte_stream],\n           [libuna_utf32_string_copy_from_byte_stream],\n           [libuna_utf32_string_with_index_copy_from_byte_stream],\n           [libuna_utf32_string_compare_with_byte_stream],\n           [libuna_utf32_string_size_from_utf7_stream],\n           [libuna_utf32_string_copy_from_utf7_stream],\n           [libuna_utf32_string_with_index_copy_from_utf7_stream],\n           [libuna_utf32_string_compare_with_utf7_stream],\n           [libuna_utf32_string_size_from_utf8_stream],\n           [libuna_utf32_string_size_from_utf8],\n           [libuna_utf32_string_copy_from_utf8],\n           [libuna_utf32_string_copy_from_utf8_stream],\n           [libuna_utf32_string_with_index_copy_from_utf8_stream],\n           [libuna_utf32_string_compare_with_utf8_stream],\n           [libuna_utf32_string_size_from_utf16],\n           [libuna_utf32_string_copy_from_utf16],\n           [libuna_utf32_string_with_index_copy_from_utf16],\n           [libuna_utf32_string_size_from_utf16_stream],\n           [libuna_utf32_string_copy_from_utf16_stream],\n           [libuna_utf32_string_with_index_copy_from_utf16_stream],\n           [libuna_utf32_string_compare_with_utf16_stream],\n           [libuna_utf32_string_size_from_utf32_stream],\n           [libuna_utf32_string_copy_from_utf32_stream],\n           [libuna_utf32_string_with_index_copy_from_utf32_stream],\n           [libuna_utf32_string_compare_with_utf32_stream],\n           [libuna_utf32_string_size_from_scsu_stream],\n           [libuna_utf32_string_copy_from_scsu_stream],\n           [libuna_utf32_string_with_index_copy_from_scsu_stream]])\n\n        AX_CHECK_LIB_DEFINITIONS(\n          [libuna],\n          [[LIBUNA_COMPARE_LESS],\n           [LIBUNA_COMPARE_EQUAL],\n           [LIBUNA_COMPARE_GREATER],\n           [LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE]])\n\n        ac_cv_libuna_LIBADD=\"-luna\"])\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([libuna])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libuna\" = xyes],\n    [AC_DEFINE(\n      [HAVE_LIBUNA],\n      [1],\n      [Define to 1 if you have the `una' library (-luna).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libuna\" = xyes],\n    [AC_SUBST(\n      [HAVE_LIBUNA],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_LIBUNA],\n      [0])\n    ])\n  ])\n\ndnl Function to detect if libuna dependencies are available\nAC_DEFUN([AX_LIBUNA_CHECK_LOCAL],\n  [dnl No additional checks.\n\n  ac_cv_libuna_CPPFLAGS=\"-I../libuna -I\\$(top_srcdir)/libuna\";\n  ac_cv_libuna_LIBADD=\"../libuna/libuna.la\";\n\n  ac_cv_libuna=local\n  ])\n\ndnl Function to detect how to enable libuna\nAC_DEFUN([AX_LIBUNA_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [libuna],\n    [libuna],\n    [search for libuna in includedir and libdir or in the specified DIR, or no if to use local version],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_LIBUNA_CHECK_LIB\n\n  dnl Check if the dependencies for the local library version\n  AS_IF(\n    [test \"x$ac_cv_libuna\" != xyes],\n    [AX_LIBUNA_CHECK_LOCAL\n\n    AC_DEFINE(\n      [HAVE_LOCAL_LIBUNA],\n      [1],\n      [Define to 1 if the local version of libuna is used.])\n    AC_SUBST(\n      [HAVE_LOCAL_LIBUNA],\n      [1])\n    ])\n\n  AM_CONDITIONAL(\n    [HAVE_LOCAL_LIBUNA],\n    [test \"x$ac_cv_libuna\" = xlocal])\n  AS_IF(\n    [test \"x$ac_cv_libuna_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [LIBUNA_CPPFLAGS],\n      [$ac_cv_libuna_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_libuna_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [LIBUNA_LIBADD],\n      [$ac_cv_libuna_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libuna\" = xyes],\n    [AC_SUBST(\n      [ax_libuna_pc_libs_private],\n      [-luna])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_libuna\" = xyes],\n    [AC_SUBST(\n      [ax_libuna_spec_requires],\n      [libuna])\n    AC_SUBST(\n      [ax_libuna_spec_build_requires],\n      [libuna-devel])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/pthread.m4",
    "content": "dnl Functions for pthread\ndnl\ndnl Version: 20240513\n\ndnl Function to detect if pthread is available\nAC_DEFUN([AX_PTHREAD_CHECK_LIB],\n  [AS_IF(\n    [test \"x$ac_cv_enable_shared_libs\" = xno || test \"x$ac_cv_with_pthread\" = xno],\n    [ac_cv_pthread=no],\n    [ac_cv_pthread=check\n    dnl Check if parameters were provided\n    dnl For both --with-pthread which returns \"yes\" and --with-pthread= which returns \"\"\n    dnl treat them as auto-detection.\n    AS_IF(\n      [test \"x$ac_cv_with_pthread\" != x && test \"x$ac_cv_with_pthread\" != xauto-detect && test \"x$ac_cv_with_pthread\" != xyes],\n      [AX_CHECK_LIB_DIRECTORY_EXISTS([pthread])])\n    ])\n\n    AS_IF(\n      [test \"x$ac_cv_pthread\" = xcheck],\n      [dnl Check for headers\n      AC_CHECK_HEADERS([pthread.h])\n\n      AS_IF(\n        [test \"x$ac_cv_header_pthread_h\" = xno],\n        [ac_cv_pthread=no],\n        [ac_cv_pthread=yes\n\n        AX_CHECK_LIB_FUNCTIONS(\n          [pthread],\n          [pthread],\n          [[pthread_create],\n          [pthread_exit],\n          [pthread_join],\n          [pthread_cond_init],\n          [pthread_cond_destroy],\n          [pthread_cond_broadcast],\n          [pthread_cond_signal],\n          [pthread_cond_wait],\n          [pthread_mutex_init],\n          [pthread_mutex_destroy],\n          [pthread_mutex_lock],\n          [pthread_mutex_trylock],\n          [pthread_mutex_unlock],\n          [pthread_rwlock_init],\n          [pthread_rwlock_destroy],\n          [pthread_rwlock_rdlock],\n          [pthread_rwlock_wrlock],\n          [pthread_rwlock_unlock]])\n\n        ac_cv_pthread_LIBADD=\"-lpthread\"\n      ])\n\n    AX_CHECK_LIB_DIRECTORY_MSG_ON_FAILURE([pthread])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_pthread\" = xpthread],\n    [AC_DEFINE(\n      [HAVE_PTHREAD],\n      [1],\n      [Define to 1 if you have the 'pthread' library (-lpthread).])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_pthread\" != xno],\n    [AC_SUBST(\n      [HAVE_PTHREAD],\n      [1]) ],\n    [AC_SUBST(\n      [HAVE_PTHREAD],\n      [0])\n    ])\n  ])\n\ndnl Function to detect how to enable pthread\nAC_DEFUN([AX_PTHREAD_CHECK_ENABLE],\n  [AX_COMMON_ARG_WITH(\n    [pthread],\n    [pthread],\n    [search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread],\n    [auto-detect],\n    [DIR])\n\n  dnl Check for a shared library version\n  AX_PTHREAD_CHECK_LIB\n\n  AS_IF(\n    [test \"x$ac_cv_pthread_CPPFLAGS\" != \"x\"],\n    [AC_SUBST(\n      [PTHREAD_CPPFLAGS],\n      [$ac_cv_pthread_CPPFLAGS])\n    ])\n  AS_IF(\n    [test \"x$ac_cv_pthread_LIBADD\" != \"x\"],\n    [AC_SUBST(\n      [PTHREAD_LIBADD],\n      [$ac_cv_pthread_LIBADD])\n    ])\n\n  AS_IF(\n    [test \"x$ac_cv_pthread\" = xpthread],\n    [AC_SUBST(\n      [ax_pthread_pc_libs_private],\n      [-lpthread])\n    ])\n  ])\n\n"
  },
  {
    "path": "m4/python.m4",
    "content": "dnl Functions for Python bindings\ndnl\ndnl Version: 20251125\n\ndnl Function to check if the python binary is available\ndnl \"python${PYTHON_VERSION} python python# python#.#\"\nAC_DEFUN([AX_PROG_PYTHON],\n  [AS_IF(\n    [test \"x${PYTHON_VERSION}\" != x],\n    [ax_python_progs=\"python${PYTHON_VERSION}\"],\n    [ax_python_progs=\"python python3 python3.15 python3.14 python3.14 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5\"])\n  AC_CHECK_PROGS(\n    [PYTHON],\n    [$ax_python_progs])\n  AS_IF(\n    [test \"x${PYTHON}\" != x],\n    [ax_prog_python_version=`${PYTHON} -c \"import sys; sys.stdout.write('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))\" 2>/dev/null`;\n    ax_prog_python_platform=`${PYTHON} -c \"import sys; sys.stdout.write(sys.platform)\" 2>/dev/null`;\n    AC_SUBST(\n      [PYTHON_PLATFORM],\n      [$ax_prog_python_platform])\n    ],\n    [AC_MSG_ERROR(\n      [Unable to find python])\n    ])\n  AC_SUBST(\n    [PYTHON],\n    [$PYTHON])\n  ])\n\ndnl Function to check if the python-config binary is available\ndnl \"python${PYTHON_VERSION}-config python-config\"\nAC_DEFUN([AX_PROG_PYTHON_CONFIG],\n  [AS_IF(\n    [test \"x${PYTHON_CONFIG}\" = x && test \"x${PYTHON_VERSION}\" != x],\n    [AC_CHECK_PROGS(\n      [PYTHON_CONFIG],\n      [python${PYTHON_VERSION}-config])\n    ])\n  AS_IF(\n    [test \"x${PYTHON_CONFIG}\" = x],\n    [AC_CHECK_PROGS(\n      [PYTHON_CONFIG],\n      [python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config])\n    ])\n  AS_IF(\n    [test \"x${PYTHON_CONFIG}\" = x],\n    [AC_MSG_ERROR(\n      [Unable to find python-config])\n    ])\n  AC_SUBST(\n    [PYTHON_CONFIG],\n    [$PYTHON_CONFIG])\n  ])\n\ndnl Function to detect if a Python build environment is available\nAC_DEFUN([AX_PYTHON_CHECK],\n  [AX_PROG_PYTHON\n  AX_PROG_PYTHON_CONFIG\n\n  AS_IF(\n    [test \"x${PYTHON_CONFIG}\" != x],\n    [dnl Check for Python includes\n    PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2>/dev/null`;\n\n    AC_MSG_CHECKING(\n      [for Python includes])\n    AC_MSG_RESULT(\n      [$PYTHON_INCLUDES])\n\n    dnl Check for Python libraries\n    PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`;\n\n    AC_MSG_CHECKING(\n      [for Python libraries])\n    AC_MSG_RESULT(\n      [$PYTHON_LDFLAGS])\n\n    dnl For CygWin and MinGW add the -no-undefined linker flag\n    AS_CASE(\n      [$build],\n      [*-*-cygwin*],[PYTHON_LDFLAGS=\"${PYTHON_LDFLAGS} -no-undefined\"],\n      [*-*-mingw*],[PYTHON_LDFLAGS=\"${PYTHON_LDFLAGS} -no-undefined\"],\n      [*-*-msys*],[PYTHON_LDFLAGS=\"${PYTHON_LDFLAGS} -no-undefined\"],\n      [*],[])\n\n    dnl Check for the existence of Python.h\n    BACKUP_CPPFLAGS=\"${CPPFLAGS}\"\n    CPPFLAGS=\"${CPPFLAGS} ${PYTHON_INCLUDES}\"\n\n    AC_CHECK_HEADERS(\n      [Python.h],\n      [ac_cv_header_python_h=yes],\n      [ac_cv_header_python_h=no])\n\n    CPPFLAGS=\"${BACKUP_CPPFLAGS}\"\n  ])\n\n  AS_IF(\n    [test \"x${ac_cv_header_python_h}\" != xyes],\n    [ac_cv_enable_python=no],\n    [ac_cv_enable_python=${ax_prog_python_version}\n    AC_SUBST(\n      [PYTHON_CPPFLAGS],\n      [$PYTHON_INCLUDES])\n\n    AC_SUBST(\n      [PYTHON_LDFLAGS],\n      [$PYTHON_LDFLAGS])\n\n    dnl Check for Python prefix\n    AS_IF(\n      [test \"x${ac_cv_with_pyprefix}\" = x || test \"x${ac_cv_with_pyprefix}\" = xno],\n      [ax_python_prefix=\"\\${prefix}\"],\n      [ax_python_prefix=`${PYTHON_CONFIG} --prefix 2>/dev/null`])\n\n    AC_SUBST(\n      [PYTHON_PREFIX],\n      [$ax_python_prefix])\n\n    dnl Check for Python exec-prefix\n    AS_IF(\n      [test \"x${ac_cv_with_pyprefix}\" = x || test \"x${ac_cv_with_pyprefix}\" = xno],\n      [ax_python_exec_prefix=\"\\${exec_prefix}\"],\n      [ax_python_exec_prefix=`${PYTHON_CONFIG} --exec-prefix 2>/dev/null`])\n\n    AC_SUBST(\n      [PYTHON_EXEC_PREFIX],\n      [$ax_python_exec_prefix])\n\n    dnl Check for Python library directory\n    ax_python_pythondir_suffix=`${PYTHON} -c \"import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))\" 2>/dev/null`;\n\n    AS_IF(\n      [test \"x${ac_cv_with_pythondir}\" = x || test \"x${ac_cv_with_pythondir}\" = xno],\n      [AS_IF(\n        [test \"x${ac_cv_with_pyprefix}\" = x || test \"x${ac_cv_with_pyprefix}\" = xno],\n        [ax_python_pythondir=\"${ax_python_prefix}/${ax_python_pythondir_suffix}\"],\n        [ax_python_pythondir=`${PYTHON} -c \"import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) \" 2>/dev/null`])],\n      [ax_python_pythondir=$ac_cv_with_pythondir])\n\n    AC_SUBST(\n      [pythondir],\n      [$ax_python_pythondir])\n\n    dnl Check for Python platform specific library directory\n    ax_python_pyexecdir_suffix=`${PYTHON} -c \"import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))\" 2>/dev/null`;\n    ax_python_library_dir=`${PYTHON} -c \"import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) \" 2>/dev/null`;\n\n    AS_IF(\n      [test \"x${ac_cv_with_pyprefix}\" = x || test \"x${ac_cv_with_pyprefix}\" = xno],\n      [ax_python_pyexecdir=\"${ax_python_exec_prefix}/${ax_python_pyexecdir_suffix}\"],\n      [ax_python_pyexecdir=$ax_python_library_dir])\n\n    AC_SUBST(\n      [pyexecdir],\n      [$ax_python_pyexecdir])\n\n    AC_SUBST(\n      [PYTHON_LIBRARY_DIR],\n      [$ax_python_pyexecdir_suffix])\n\n    AC_SUBST(\n      [PYTHON_PACKAGE_DIR],\n      [$ax_python_library_dir])\n    ])\n  ])\n\ndnl Function to determine the prefix of pythondir\nAC_DEFUN([AX_PYTHON_CHECK_PYPREFIX],\n  [AX_COMMON_ARG_WITH(\n    [pyprefix],\n    [pyprefix],\n    [use `python-config --prefix' to determine the prefix of pythondir instead of --prefix],\n    [no],\n    [no])\n])\n\ndnl Function to detect if to enable Python\nAC_DEFUN([AX_PYTHON_CHECK_ENABLE],\n  [AX_PYTHON_CHECK_PYPREFIX\n\n  AX_COMMON_ARG_ENABLE(\n    [python],\n    [python],\n    [build Python bindings],\n    [no])\n  AX_COMMON_ARG_WITH(\n    [pythondir],\n    [pythondir],\n    [use to specify the Python directory (pythondir)],\n    [no],\n    [no])\n\n  AS_IF(\n    [test \"x${ac_cv_enable_python}\" != xno],\n    [AX_PYTHON_CHECK])\n\n  AM_CONDITIONAL(\n    HAVE_PYTHON,\n    [test \"x${ac_cv_enable_python}\" != xno])\n\n  AM_CONDITIONAL(\n    HAVE_PYTHON_TESTS,\n    [test \"x${ac_cv_enable_python}\" != xno])\n  ])\n])\n\n"
  },
  {
    "path": "m4/tests.m4",
    "content": "dnl Functions for testing\ndnl\ndnl Version: 20200712\n\ndnl Function to detect if tests dependencies are available\nAC_DEFUN([AX_TESTS_CHECK_LOCAL],\n  [AC_CHECK_HEADERS([dlfcn.h])\n\n  AC_CHECK_FUNCS([fmemopen getopt mkstemp setenv tzset unlink])\n\n  AC_CHECK_LIB(\n    dl,\n    dlsym)\n\n  AS_IF(\n    [test \"x$lt_cv_prog_gnu_ld\" = xyes && test \"x$ac_cv_lib_dl_dlsym\" = xyes],\n    [AC_DEFINE(\n      [HAVE_GNU_DL_DLSYM],\n      [1],\n      [Define to 1 if dlsym function is available in GNU dl.])\n  ])\n])\n\ndnl Function to detect if OSS-Fuzz build environment is available\nAC_DEFUN([AX_TESTS_CHECK_OSSFUZZ],\n  [AM_CONDITIONAL(\n    HAVE_LIB_FUZZING_ENGINE,\n    [test \"x${LIB_FUZZING_ENGINE}\" != x])\n  AC_SUBST(\n    [LIB_FUZZING_ENGINE],\n    [\"${LIB_FUZZING_ENGINE}\"])\n])\n\n"
  },
  {
    "path": "m4/types.m4",
    "content": "dnl Functions for type definitions\ndnl\ndnl Version: 20180727\n\ndnl Function to detect if type definitions are available\nAC_DEFUN([AX_TYPES_CHECK_LOCAL],\n [AS_IF(\n  [test \"x$ac_cv_enable_winapi\" = xyes],\n  [ac_cv_enable_wide_character_type=yes])\n\n AS_IF(\n  [test \"x$ac_cv_enable_wide_character_type\" = xyes],\n  [AC_DEFINE(\n   [HAVE_WIDE_CHARACTER_TYPE],\n   [1],\n   [Define to 1 if wide character type should be used.])\n  AC_SUBST(\n   [HAVE_WIDE_CHARACTER_TYPE],\n   [1]) ],\n  [AC_SUBST(\n   [HAVE_WIDE_CHARACTER_TYPE],\n   [0])\n  ])\n\n AC_CHECK_HEADERS([sys/types.h inttypes.h stdint.h wchar.h])\n\n AS_IF(\n  [test \"x$ac_cv_header_sys_types_h\" = xyes],\n  [AC_SUBST(\n   [HAVE_SYS_TYPES_H],\n   [1])],\n  [AC_SUBST(\n   [HAVE_SYS_TYPES_H],\n   [0])\n  ])\n\n AS_IF(\n  [test \"x$ac_cv_header_inttypes_h\" = xyes],\n  [AC_SUBST(\n   [HAVE_INTTYPES_H],\n   [1])],\n  [AC_SUBST(\n   [HAVE_INTTYPES_H],\n   [0])\n  ])\n\n AS_IF(\n  [test \"x$ac_cv_header_stdint_h\" = xyes],\n  [AC_SUBST(\n   [HAVE_STDINT_H],\n   [1])],\n  [AC_SUBST(\n   [HAVE_STDINT_H],\n   [0])\n  ])\n\n AS_IF(\n  [test \"x$ac_cv_header_wchar_h\" = xyes],\n  [AC_SUBST(\n   [HAVE_WCHAR_H],\n   [1]) ],\n  [AC_SUBST(\n   [HAVE_WCHAR_H],\n   [0])\n  ])\n\n AC_TYPE_MODE_T\n AC_TYPE_OFF_T\n AC_TYPE_SIZE_T\n\n AC_CHECK_TYPE(\n  [size32_t],\n  [AC_SUBST(\n   [HAVE_SIZE32_T],\n   [1])],\n  [AC_SUBST(\n   [HAVE_SIZE32_T],\n   [0])\n  ])\n\n AC_CHECK_TYPE(\n  [ssize32_t],\n  [AC_SUBST(\n   [HAVE_SSIZE32_T],\n   [1])],\n  [AC_SUBST(\n   [HAVE_SSIZE32_T],\n   [0])\n  ])\n\n AC_CHECK_TYPE(\n  [size64_t],\n  [AC_SUBST(\n   [HAVE_SIZE64_T],\n   [1])],\n  [AC_SUBST(\n   [HAVE_SIZE64_T],\n   [0])\n  ])\n\n AC_CHECK_TYPE(\n  [ssize64_t],\n  [AC_SUBST(\n   [HAVE_SSIZE64_T],\n   [1])],\n  [AC_SUBST(\n   [HAVE_SSIZE64_T],\n   [0])\n  ])\n\n AC_CHECK_TYPE(\n  [off64_t],\n  [AC_SUBST(\n   [HAVE_OFF64_T],\n   [1])],\n  [AC_SUBST(\n   [HAVE_OFF64_T],\n   [0])\n  ])\n\n AC_CHECK_TYPE([ssize_t])\n AC_CHECK_TYPE([u64])\n\n AC_CHECK_SIZEOF([int])\n AC_CHECK_SIZEOF([long])\n AC_CHECK_SIZEOF([off_t])\n AC_CHECK_SIZEOF([size_t])\n\n AS_IF(\n  [test \"x$ac_cv_header_wchar_h\" = xyes],\n  [AC_CHECK_SIZEOF([wchar_t])])\n ])\n\n"
  },
  {
    "path": "manuals/Makefile.am",
    "content": "man_MANS = \\\n\tfsntfsinfo.1 \\\n\tlibfsntfs.3\n\nEXTRA_DIST = \\\n\tfsntfsinfo.1 \\\n\tlibfsntfs.3\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in\n\n"
  },
  {
    "path": "manuals/fsntfsinfo.1",
    "content": ".Dd May 21, 2024\n.Dt fsntfsinfo\n.Os libfsntfs\n.Sh NAME\n.Nm fsntfsinfo\n.Nd determines information about a New Technology File System (NTFS) volume\n.Sh SYNOPSIS\n.Nm fsntfsinfo\n.Op Fl B Ar bodyfile\n.Op Fl E Ar mft_entry_index\n.Op Fl F Ar file_entry\n.Op Fl o Ar offset\n.Op Fl dhHUvV\n.Ar source\n.Sh DESCRIPTION\n.Nm fsntfsinfo\nis a utility to determine information about a New Technology File System (NTFS) volume\n.Pp\n.Nm fsntfsinfo\nis part of the\n.Nm libfsntfs\npackage.\n.Nm libfsntfs\nis a library to access the New Technology File System (NTFS) format\n.Pp\n.Ar source\nis the source file.\n.Pp\nThe options are as follows:\n.Bl -tag -width Ds\n.It Fl B Ar bodyfile\noutput file system hierarchy as a bodyfile\n.It Fl d\ncalculate a MD5 hash of a file entry to include in the bodyfile\n.It Fl E Ar mft_entry_index\nshow information about a specific MFT entry index or \"all\"\n.It Fl F Ar file_entry\nshow information about a specific file entry path\n.It Fl h\nshows this help\n.It Fl H\nshows the file system hierarcy\n.It Fl o Ar offset\nspecify the volume offset\n.It Fl U\nshows information from the USN change journal ($UsnJrnl)\n.It Fl v\nverbose output to stderr\n.It Fl V\nprint version\n.El\n.Sh ENVIRONMENT\nNone\n.Sh FILES\nNone\n.Sh EXAMPLES\n.Bd -literal\n# fsntfsinfo ntfs-img-kw-1.dd\nfsntfsinfo 20240521\n.sp\nNew Technology File System information:\n.sp\nVolume information:\n\tName\t\t\t\t: KW-SRCH-1\n\tVersion\t\t\t\t: 3.1\n\tSerial number\t\t\t: ba50ed9250ed5623\n\tCluster block size\t\t: 512\n\tMFT entry size\t\t\t: 1024\n\tIndex entry size\t\t: 4096\n.sp\n.Ed\n.Sh DIAGNOSTICS\nErrors, verbose and debug output are printed to stderr when verbose output \\-v is enabled.\nVerbose and debug output are only printed when enabled at compilation.\n.Sh BUGS\nPlease report bugs of any kind to <joachim.metz@gmail.com> or on the project website:\nhttps://github.com/libyal/libfsntfs/\n.Sh AUTHOR\nThese man pages were written by Joachim Metz.\n.Sh COPYRIGHT\nCopyright 2010-2024, Joachim Metz <joachim.metz@gmail.com>.\nThis is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n.Sh SEE ALSO\n"
  },
  {
    "path": "manuals/libfsntfs.3",
    "content": ".Dd February  8, 2026\n.Dt libfsntfs 3\n.Os libfsntfs\n.Sh NAME\n.Nm libfsntfs.h\n.Nd Library to access the New Technology File System (NTFS) format\n.Sh SYNOPSIS\n.In libfsntfs.h\n.Pp\nSupport functions\n.Ft const char *\n.Fn libfsntfs_get_version \"void\"\n.Ft int\n.Fn libfsntfs_get_access_flags_read \"void\"\n.Ft int\n.Fn libfsntfs_get_codepage \"int *codepage\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_set_codepage \"int codepage\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_check_volume_signature \"const char *filename\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_check_mft_metadata_file_signature \"const char *filename\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with wide character string support:\n.Ft int\n.Fn libfsntfs_check_volume_signature_wide \"const wchar_t *filename\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_check_mft_metadata_file_signature_wide \"const wchar_t *filename\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with libbfio support:\n.Ft int\n.Fn libfsntfs_check_volume_signature_file_io_handle \"libbfio_handle_t *file_io_handle\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_check_mft_metadata_file_signature_file_io_handle \"libbfio_handle_t *file_io_handle\" \"libfsntfs_error_t **error\"\n.Pp\nNotify functions\n.Ft void\n.Fn libfsntfs_notify_set_verbose \"int verbose\"\n.Ft int\n.Fn libfsntfs_notify_set_stream \"FILE *stream\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_notify_stream_open \"const char *filename\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_notify_stream_close \"libfsntfs_error_t **error\"\n.Pp\nError functions\n.Ft void\n.Fn libfsntfs_error_free \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_error_fprint \"libfsntfs_error_t *error\" \"FILE *stream\"\n.Ft int\n.Fn libfsntfs_error_sprint \"libfsntfs_error_t *error\" \"char *string\" \"size_t size\"\n.Ft int\n.Fn libfsntfs_error_backtrace_fprint \"libfsntfs_error_t *error\" \"FILE *stream\"\n.Ft int\n.Fn libfsntfs_error_backtrace_sprint \"libfsntfs_error_t *error\" \"char *string\" \"size_t size\"\n.Pp\nVolume functions\n.Ft int\n.Fn libfsntfs_volume_initialize \"libfsntfs_volume_t **volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_free \"libfsntfs_volume_t **volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_signal_abort \"libfsntfs_volume_t *volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_open \"libfsntfs_volume_t *volume\" \"const char *filename\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_close \"libfsntfs_volume_t *volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_has_bitlocker_drive_encryption \"libfsntfs_volume_t *volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_has_volume_shadow_snapshots \"libfsntfs_volume_t *volume\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_bytes_per_sector \"libfsntfs_volume_t *volume\" \"uint16_t *bytes_per_sector\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_cluster_block_size \"libfsntfs_volume_t *volume\" \"size32_t *cluster_block_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_mft_entry_size \"libfsntfs_volume_t *volume\" \"size32_t *mft_entry_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_index_entry_size \"libfsntfs_volume_t *volume\" \"size32_t *index_entry_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_utf8_name_size \"libfsntfs_volume_t *volume\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_utf8_name \"libfsntfs_volume_t *volume\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_utf16_name_size \"libfsntfs_volume_t *volume\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_utf16_name \"libfsntfs_volume_t *volume\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_version \"libfsntfs_volume_t *volume\" \"uint8_t *major_version\" \"uint8_t *minor_version\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_flags \"libfsntfs_volume_t *volume\" \"uint16_t *flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_serial_number \"libfsntfs_volume_t *volume\" \"uint64_t *serial_number\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_root_directory \"libfsntfs_volume_t *volume\" \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_number_of_file_entries \"libfsntfs_volume_t *volume\" \"uint64_t *number_of_file_entries\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_file_entry_by_index \"libfsntfs_volume_t *volume\" \"uint64_t mft_entry_index\" \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_file_entry_by_utf8_path \"libfsntfs_volume_t *volume\" \"const uint8_t *utf8_string\" \"size_t utf8_string_length\" \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_file_entry_by_utf16_path \"libfsntfs_volume_t *volume\" \"const uint16_t *utf16_string\" \"size_t utf16_string_length\" \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_get_usn_change_journal \"libfsntfs_volume_t *volume\" \"libfsntfs_usn_change_journal_t **usn_change_journal\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with wide character string support:\n.Ft int\n.Fn libfsntfs_volume_open_wide \"libfsntfs_volume_t *volume\" \"const wchar_t *filename\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with libbfio support:\n.Ft int\n.Fn libfsntfs_volume_open_file_io_handle \"libfsntfs_volume_t *volume\" \"libbfio_handle_t *file_io_handle\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Pp\nFile entry functions\n.Ft int\n.Fn libfsntfs_file_entry_free \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_is_empty \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_is_allocated \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_is_corrupted \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_file_reference \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_base_record_file_reference \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_parent_file_reference \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *parent_file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_parent_file_reference_by_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"uint64_t *parent_file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_journal_sequence_number \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *journal_sequence_number\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_creation_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_modification_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_access_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_entry_modification_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_file_attribute_flags \"libfsntfs_file_entry_t *file_entry\" \"uint32_t *file_attribute_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_file_reference \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_creation_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_modification_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_access_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_entry_modification_time \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_size \"libfsntfs_file_entry_t *file_entry\" \"uint64_t *size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_i30_file_attribute_flags \"libfsntfs_file_entry_t *file_entry\" \"uint32_t *file_attribute_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_name_size \"libfsntfs_file_entry_t *file_entry\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_name \"libfsntfs_file_entry_t *file_entry\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_name_size \"libfsntfs_file_entry_t *file_entry\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_name \"libfsntfs_file_entry_t *file_entry\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_name_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int *attribute_index\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_name_size_by_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_name_by_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_name_size_by_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_name_by_attribute_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_path_hint_size \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_path_hint \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_path_hint_size \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_path_hint \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_symbolic_link_target_size \"libfsntfs_file_entry_t *file_entry\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf8_symbolic_link_target \"libfsntfs_file_entry_t *file_entry\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_symbolic_link_target_size \"libfsntfs_file_entry_t *file_entry\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_utf16_symbolic_link_target \"libfsntfs_file_entry_t *file_entry\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_security_descriptor_size \"libfsntfs_file_entry_t *file_entry\" \"size_t *data_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_security_descriptor \"libfsntfs_file_entry_t *file_entry\" \"uint8_t *data\" \"size_t data_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_number_of_attributes \"libfsntfs_file_entry_t *file_entry\" \"int *number_of_attributes\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_attribute_by_index \"libfsntfs_file_entry_t *file_entry\" \"int attribute_index\" \"libfsntfs_attribute_t **attribute\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_has_directory_entries_index \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_has_default_data_stream \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_has_i30_entry \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_is_symbolic_link \"libfsntfs_file_entry_t *file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_number_of_alternate_data_streams \"libfsntfs_file_entry_t *file_entry\" \"int *number_of_alternate_data_streams\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_alternate_data_stream_by_index \"libfsntfs_file_entry_t *file_entry\" \"int alternate_data_stream_index\" \"libfsntfs_data_stream_t **alternate_data_stream\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name \"libfsntfs_file_entry_t *file_entry\" \"const uint8_t *utf8_string\" \"size_t utf8_string_length\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name \"libfsntfs_file_entry_t *file_entry\" \"const uint16_t *utf16_string\" \"size_t utf16_string_length\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name \"libfsntfs_file_entry_t *file_entry\" \"const uint8_t *utf8_string\" \"size_t utf8_string_length\" \"libfsntfs_data_stream_t **alternate_data_stream\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name \"libfsntfs_file_entry_t *file_entry\" \"const uint16_t *utf16_string\" \"size_t utf16_string_length\" \"libfsntfs_data_stream_t **alternate_data_stream\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_number_of_sub_file_entries \"libfsntfs_file_entry_t *file_entry\" \"int *number_of_sub_file_entries\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_sub_file_entry_by_index \"libfsntfs_file_entry_t *file_entry\" \"int sub_file_entry_index\" \"libfsntfs_file_entry_t **sub_file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_sub_file_entry_by_utf8_name \"libfsntfs_file_entry_t *file_entry\" \"const uint8_t *utf8_string\" \"size_t utf8_string_length\" \"libfsntfs_file_entry_t **sub_file_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_sub_file_entry_by_utf16_name \"libfsntfs_file_entry_t *file_entry\" \"const uint16_t *utf16_string\" \"size_t utf16_string_length\" \"libfsntfs_file_entry_t **sub_file_entry\" \"libfsntfs_error_t **error\"\n.Ft ssize_t\n.Fn libfsntfs_file_entry_read_buffer \"libfsntfs_file_entry_t *file_entry\" \"void *buffer\" \"size_t buffer_size\" \"libfsntfs_error_t **error\"\n.Ft ssize_t\n.Fn libfsntfs_file_entry_read_buffer_at_offset \"libfsntfs_file_entry_t *file_entry\" \"void *buffer\" \"size_t buffer_size\" \"off64_t offset\" \"libfsntfs_error_t **error\"\n.Ft off64_t\n.Fn libfsntfs_file_entry_seek_offset \"libfsntfs_file_entry_t *file_entry\" \"off64_t offset\" \"int whence\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_offset \"libfsntfs_file_entry_t *file_entry\" \"off64_t *offset\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_size \"libfsntfs_file_entry_t *file_entry\" \"size64_t *size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_number_of_extents \"libfsntfs_file_entry_t *file_entry\" \"int *number_of_extents\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_entry_get_extent_by_index \"libfsntfs_file_entry_t *file_entry\" \"int extent_index\" \"off64_t *extent_offset\" \"size64_t *extent_size\" \"uint32_t *extent_flags\" \"libfsntfs_error_t **error\"\n.Pp\nAttribute functions\n.Ft int\n.Fn libfsntfs_attribute_free \"libfsntfs_attribute_t **attribute\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_type \"libfsntfs_attribute_t *attribute\" \"uint32_t *type\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_data_flags \"libfsntfs_attribute_t *attribute\" \"uint16_t *data_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_utf8_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_utf8_name \"libfsntfs_attribute_t *attribute\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_utf16_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_utf16_name \"libfsntfs_attribute_t *attribute\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_data_vcn_range \"libfsntfs_attribute_t *attribute\" \"uint64_t *data_first_vcn\" \"uint64_t *data_last_vcn\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_data_size \"libfsntfs_attribute_t *attribute\" \"size64_t *data_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_get_valid_data_size \"libfsntfs_attribute_t *attribute\" \"size64_t *valid_data_size\" \"libfsntfs_error_t **error\"\n.Pp\n$ATTRIBUTE_LIST attribute functions\n.Ft int\n.Fn libfsntfs_attribute_list_attribute_get_number_of_entries \"libfsntfs_attribute_t *attribute\" \"int *number_of_entries\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_attribute_get_entry_by_index \"libfsntfs_attribute_t *attribute\" \"int entry_index\" \"libfsntfs_attribute_list_entry_t **entry\" \"libfsntfs_error_t **error\"\n.Pp\nAttribute list entry functions\n.Ft int\n.Fn libfsntfs_attribute_list_entry_free \"libfsntfs_attribute_list_entry_t **attribute_list_entry\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_attribute_type \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"uint32_t *attribute_type\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_file_reference \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"uint64_t *file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_utf8_name_size \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_utf8_name \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_utf16_name_size \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_attribute_list_entry_get_utf16_name \"libfsntfs_attribute_list_entry_t *attribute_list_entry\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Pp\n$FILE_NAME attribute functions\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_parent_file_reference \"libfsntfs_attribute_t *attribute\" \"uint64_t *parent_file_reference\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_creation_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_modification_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_access_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_entry_modification_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_file_attribute_flags \"libfsntfs_attribute_t *attribute\" \"uint32_t *file_attribute_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_name_space \"libfsntfs_attribute_t *attribute\" \"uint8_t *name_space\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_utf8_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_utf8_name \"libfsntfs_attribute_t *attribute\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_utf16_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_file_name_attribute_get_utf16_name \"libfsntfs_attribute_t *attribute\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Pp\n$OBJECT_ID attribute functions\n.Ft int\n.Fn libfsntfs_object_identifier_attribute_get_droid_file_identifier \"libfsntfs_attribute_t *attribute\" \"uint8_t *guid\" \"size_t size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier \"libfsntfs_attribute_t *attribute\" \"uint8_t *guid\" \"size_t size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier \"libfsntfs_attribute_t *attribute\" \"uint8_t *guid\" \"size_t size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier \"libfsntfs_attribute_t *attribute\" \"uint8_t *guid\" \"size_t size\" \"libfsntfs_error_t **error\"\n.Pp\n$REPARSE_POINT attribute functions\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_tag \"libfsntfs_attribute_t *attribute\" \"uint32_t *tag\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_compression_method \"libfsntfs_attribute_t *attribute\" \"uint32_t *compression_method\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf8_substitute_name \"libfsntfs_attribute_t *attribute\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf16_substitute_name \"libfsntfs_attribute_t *attribute\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf8_print_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf8_print_name \"libfsntfs_attribute_t *attribute\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf16_print_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_reparse_point_attribute_get_utf16_print_name \"libfsntfs_attribute_t *attribute\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Pp\n$SECURITY_DESCRIPTOR attribute functions\n.Ft int\n.Fn libfsntfs_security_descriptor_attribute_get_security_descriptor_size \"libfsntfs_attribute_t *attribute\" \"size_t *data_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_security_descriptor_attribute_get_security_descriptor \"libfsntfs_attribute_t *attribute\" \"uint8_t *data\" \"size_t data_size\" \"libfsntfs_error_t **error\"\n.Pp\n$STANDARD_INFORMATION attribute functions\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_creation_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_modification_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_access_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_entry_modification_time \"libfsntfs_attribute_t *attribute\" \"uint64_t *filetime\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_file_attribute_flags \"libfsntfs_attribute_t *attribute\" \"uint32_t *file_attribute_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_owner_identifier \"libfsntfs_attribute_t *attribute\" \"uint32_t *owner_identifier\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_security_descriptor_identifier \"libfsntfs_attribute_t *attribute\" \"uint32_t *security_descriptor_identifier\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_standard_information_attribute_get_update_sequence_number \"libfsntfs_attribute_t *attribute\" \"uint64_t *update_sequence_number\" \"libfsntfs_error_t **error\"\n.Pp\n$VOLUME_INFORMATION attribute functions\n.Ft int\n.Fn libfsntfs_volume_information_attribute_get_version \"libfsntfs_attribute_t *attribute\" \"uint8_t *major_version\" \"uint8_t *minor_version\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_information_attribute_get_flags \"libfsntfs_attribute_t *attribute\" \"uint16_t *flags\" \"libfsntfs_error_t **error\"\n.Pp\n$VOLUME_NAME attribute functions\n.Ft int\n.Fn libfsntfs_volume_name_attribute_get_utf8_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_name_attribute_get_utf8_name \"libfsntfs_attribute_t *attribute\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_name_attribute_get_utf16_name_size \"libfsntfs_attribute_t *attribute\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_volume_name_attribute_get_utf16_name \"libfsntfs_attribute_t *attribute\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Pp\nData stream functions\n.Ft int\n.Fn libfsntfs_data_stream_free \"libfsntfs_data_stream_t **data_stream\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_utf8_name_size \"libfsntfs_data_stream_t *data_stream\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_utf8_name \"libfsntfs_data_stream_t *data_stream\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_utf16_name_size \"libfsntfs_data_stream_t *data_stream\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_utf16_name \"libfsntfs_data_stream_t *data_stream\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft ssize_t\n.Fn libfsntfs_data_stream_read_buffer \"libfsntfs_data_stream_t *data_stream\" \"void *buffer\" \"size_t buffer_size\" \"libfsntfs_error_t **error\"\n.Ft ssize_t\n.Fn libfsntfs_data_stream_read_buffer_at_offset \"libfsntfs_data_stream_t *data_stream\" \"void *buffer\" \"size_t buffer_size\" \"off64_t offset\" \"libfsntfs_error_t **error\"\n.Ft off64_t\n.Fn libfsntfs_data_stream_seek_offset \"libfsntfs_data_stream_t *data_stream\" \"off64_t offset\" \"int whence\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_offset \"libfsntfs_data_stream_t *data_stream\" \"off64_t *offset\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_size \"libfsntfs_data_stream_t *data_stream\" \"size64_t *size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_number_of_extents \"libfsntfs_data_stream_t *data_stream\" \"int *number_of_extents\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_data_stream_get_extent_by_index \"libfsntfs_data_stream_t *data_stream\" \"int extent_index\" \"off64_t *extent_offset\" \"size64_t *extent_size\" \"uint32_t *extent_flags\" \"libfsntfs_error_t **error\"\n.Pp\nMFT metadata file functions\n.Ft int\n.Fn libfsntfs_mft_metadata_file_initialize \"libfsntfs_mft_metadata_file_t **mft_metadata_file\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_free \"libfsntfs_mft_metadata_file_t **mft_metadata_file\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_open \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"const char *filename\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_close \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_utf8_volume_name_size \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"size_t *utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_utf8_volume_name \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint8_t *utf8_string\" \"size_t utf8_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_utf16_volume_name_size \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"size_t *utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_utf16_volume_name \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint16_t *utf16_string\" \"size_t utf16_string_size\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_volume_version \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint8_t *major_version\" \"uint8_t *minor_version\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_volume_flags \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint16_t *flags\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_number_of_file_entries \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint64_t *number_of_file_entries\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_mft_metadata_file_get_file_entry_by_index \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"uint64_t mft_entry_index\" \"libfsntfs_file_entry_t **file_entry\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with wide character string support:\n.Ft int\n.Fn libfsntfs_mft_metadata_file_open_wide \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"const wchar_t *filename\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Pp\nAvailable when compiled with libbfio support:\n.Ft int\n.Fn libfsntfs_mft_metadata_file_open_file_io_handle \"libfsntfs_mft_metadata_file_t *mft_metadata_file\" \"libbfio_handle_t *file_io_handle\" \"int access_flags\" \"libfsntfs_error_t **error\"\n.Pp\nUSN change journal functions\n.Ft int\n.Fn libfsntfs_usn_change_journal_free \"libfsntfs_usn_change_journal_t **usn_change_journal\" \"libfsntfs_error_t **error\"\n.Ft int\n.Fn libfsntfs_usn_change_journal_get_offset \"libfsntfs_usn_change_journal_t *usn_change_journal\" \"off64_t *offset\" \"libfsntfs_error_t **error\"\n.Ft ssize_t\n.Fn libfsntfs_usn_change_journal_read_usn_record \"libfsntfs_usn_change_journal_t *usn_change_journal\" \"uint8_t *usn_record_data\" \"size_t usn_record_data_size\" \"libfsntfs_error_t **error\"\n.Sh DESCRIPTION\nThe\n.Fn libfsntfs_get_version\nfunction is used to retrieve the library version.\n.Sh RETURN VALUES\nMost of the functions return NULL or \\-1 on error, dependent on the return type.\nFor the actual return values see \"libfsntfs.h\".\n.Sh ENVIRONMENT\nNone\n.Sh FILES\nNone\n.Sh NOTES\nlibfsntfs can be compiled with wide character support (wchar_t).\n.sp\nTo compile libfsntfs with wide character support use:\n.Ar ./configure --enable-wide-character-type=yes\n or define:\n.Ar _UNICODE\n or\n.Ar UNICODE\n during compilation.\n.sp\n.Ar LIBFSNTFS_WIDE_CHARACTER_TYPE\n in libfsntfs/features.h can be used to determine if libfsntfs was compiled with wide character support.\n.Sh BUGS\nPlease report bugs of any kind on the project issue tracker: https://github.com/libyal/libfsntfs/issues\n.Sh AUTHOR\nThese man pages are generated from \"libfsntfs.h\".\n.Sh COPYRIGHT\nCopyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>.\n.sp\nThis is free software; see the source for copying conditions.\nThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n.Sh SEE ALSO\nthe libfsntfs.h include file\n"
  },
  {
    "path": "msvscpp/Makefile.am",
    "content": "MSVSCPP_FILES = \\\n\tfsntfs_test_attribute/fsntfs_test_attribute.vcproj \\\n\tfsntfs_test_attribute_list_entry/fsntfs_test_attribute_list_entry.vcproj \\\n\tfsntfs_test_bitmap_values/fsntfs_test_bitmap_values.vcproj \\\n\tfsntfs_test_buffer_data_handle/fsntfs_test_buffer_data_handle.vcproj \\\n\tfsntfs_test_cluster_block/fsntfs_test_cluster_block.vcproj \\\n\tfsntfs_test_cluster_block_data/fsntfs_test_cluster_block_data.vcproj \\\n\tfsntfs_test_cluster_block_stream/fsntfs_test_cluster_block_stream.vcproj \\\n\tfsntfs_test_cluster_block_vector/fsntfs_test_cluster_block_vector.vcproj \\\n\tfsntfs_test_compressed_block/fsntfs_test_compressed_block.vcproj \\\n\tfsntfs_test_compressed_block_data_handle/fsntfs_test_compressed_block_data_handle.vcproj \\\n\tfsntfs_test_compressed_block_vector/fsntfs_test_compressed_block_vector.vcproj \\\n\tfsntfs_test_compressed_data_handle/fsntfs_test_compressed_data_handle.vcproj \\\n\tfsntfs_test_compression/fsntfs_test_compression.vcproj \\\n\tfsntfs_test_compression_unit_data_handle/fsntfs_test_compression_unit_data_handle.vcproj \\\n\tfsntfs_test_compression_unit_descriptor/fsntfs_test_compression_unit_descriptor.vcproj \\\n\tfsntfs_test_data_run/fsntfs_test_data_run.vcproj \\\n\tfsntfs_test_data_stream/fsntfs_test_data_stream.vcproj \\\n\tfsntfs_test_directory_entries_tree/fsntfs_test_directory_entries_tree.vcproj \\\n\tfsntfs_test_directory_entry/fsntfs_test_directory_entry.vcproj \\\n\tfsntfs_test_error/fsntfs_test_error.vcproj \\\n\tfsntfs_test_extent/fsntfs_test_extent.vcproj \\\n\tfsntfs_test_file_entry/fsntfs_test_file_entry.vcproj \\\n\tfsntfs_test_file_name_attribute/fsntfs_test_file_name_attribute.vcproj \\\n\tfsntfs_test_file_name_values/fsntfs_test_file_name_values.vcproj \\\n\tfsntfs_test_file_system/fsntfs_test_file_system.vcproj \\\n\tfsntfs_test_fixup_values/fsntfs_test_fixup_values.vcproj \\\n\tfsntfs_test_index/fsntfs_test_index.vcproj \\\n\tfsntfs_test_index_entry/fsntfs_test_index_entry.vcproj \\\n\tfsntfs_test_index_entry_header/fsntfs_test_index_entry_header.vcproj \\\n\tfsntfs_test_index_entry_vector/fsntfs_test_index_entry_vector.vcproj \\\n\tfsntfs_test_index_node/fsntfs_test_index_node.vcproj \\\n\tfsntfs_test_index_node_header/fsntfs_test_index_node_header.vcproj \\\n\tfsntfs_test_index_root_header/fsntfs_test_index_root_header.vcproj \\\n\tfsntfs_test_index_value/fsntfs_test_index_value.vcproj \\\n\tfsntfs_test_io_handle/fsntfs_test_io_handle.vcproj \\\n\tfsntfs_test_logged_utility_stream_values/fsntfs_test_logged_utility_stream_values.vcproj \\\n\tfsntfs_test_mft/fsntfs_test_mft.vcproj \\\n\tfsntfs_test_mft_attribute/fsntfs_test_mft_attribute.vcproj \\\n\tfsntfs_test_mft_attribute_list/fsntfs_test_mft_attribute_list.vcproj \\\n\tfsntfs_test_mft_attribute_list_entry/fsntfs_test_mft_attribute_list_entry.vcproj \\\n\tfsntfs_test_mft_entry/fsntfs_test_mft_entry.vcproj \\\n\tfsntfs_test_mft_entry_header/fsntfs_test_mft_entry_header.vcproj \\\n\tfsntfs_test_mft_metadata_file/fsntfs_test_mft_metadata_file.vcproj \\\n\tfsntfs_test_name/fsntfs_test_name.vcproj \\\n\tfsntfs_test_notify/fsntfs_test_notify.vcproj \\\n\tfsntfs_test_object_identifier_values/fsntfs_test_object_identifier_values.vcproj \\\n\tfsntfs_test_path_hint/fsntfs_test_path_hint.vcproj \\\n\tfsntfs_test_profiler/fsntfs_test_profiler.vcproj \\\n\tfsntfs_test_reparse_point_attribute/fsntfs_test_reparse_point_attribute.vcproj \\\n\tfsntfs_test_reparse_point_values/fsntfs_test_reparse_point_values.vcproj \\\n\tfsntfs_test_sds_index_value/fsntfs_test_sds_index_value.vcproj \\\n\tfsntfs_test_security_descriptor_index/fsntfs_test_security_descriptor_index.vcproj \\\n\tfsntfs_test_security_descriptor_index_value/fsntfs_test_security_descriptor_index_value.vcproj \\\n\tfsntfs_test_security_descriptor_values/fsntfs_test_security_descriptor_values.vcproj \\\n\tfsntfs_test_standard_information_values/fsntfs_test_standard_information_values.vcproj \\\n\tfsntfs_test_support/fsntfs_test_support.vcproj \\\n\tfsntfs_test_tools_bodyfile/fsntfs_test_tools_bodyfile.vcproj \\\n\tfsntfs_test_tools_digest_hash/fsntfs_test_tools_digest_hash.vcproj \\\n\tfsntfs_test_tools_info_handle/fsntfs_test_tools_info_handle.vcproj \\\n\tfsntfs_test_tools_mount_path_string/fsntfs_test_tools_mount_path_string.vcproj \\\n\tfsntfs_test_tools_output/fsntfs_test_tools_output.vcproj \\\n\tfsntfs_test_tools_path_string/fsntfs_test_tools_path_string.vcproj \\\n\tfsntfs_test_tools_signal/fsntfs_test_tools_signal.vcproj \\\n\tfsntfs_test_txf_data_values/fsntfs_test_txf_data_values.vcproj \\\n\tfsntfs_test_usn_change_journal/fsntfs_test_usn_change_journal.vcproj \\\n\tfsntfs_test_volume/fsntfs_test_volume.vcproj \\\n\tfsntfs_test_volume_header/fsntfs_test_volume_header.vcproj \\\n\tfsntfs_test_volume_information_attribute/fsntfs_test_volume_information_attribute.vcproj \\\n\tfsntfs_test_volume_information_values/fsntfs_test_volume_information_values.vcproj \\\n\tfsntfs_test_volume_name_attribute/fsntfs_test_volume_name_attribute.vcproj \\\n\tfsntfs_test_volume_name_values/fsntfs_test_volume_name_values.vcproj \\\n\tfsntfsinfo/fsntfsinfo.vcproj \\\n\tfsntfsmount/fsntfsmount.vcproj \\\n\tlibbfio/libbfio.vcproj \\\n\tlibcdata/libcdata.vcproj \\\n\tlibcerror/libcerror.vcproj \\\n\tlibcfile/libcfile.vcproj \\\n\tlibclocale/libclocale.vcproj \\\n\tlibcnotify/libcnotify.vcproj \\\n\tlibcpath/libcpath.vcproj \\\n\tlibcsplit/libcsplit.vcproj \\\n\tlibcthreads/libcthreads.vcproj \\\n\tlibfcache/libfcache.vcproj \\\n\tlibfdata/libfdata.vcproj \\\n\tlibfdatetime/libfdatetime.vcproj \\\n\tlibfguid/libfguid.vcproj \\\n\tlibfsntfs/libfsntfs.vcproj \\\n\tlibfusn/libfusn.vcproj \\\n\tlibfwnt/libfwnt.vcproj \\\n\tlibhmac/libhmac.vcproj \\\n\tlibuna/libuna.vcproj \\\n\tpyfsntfs/pyfsntfs.vcproj \\\n\tlibfsntfs.sln\n\nEXTRA_DIST = \\\n\t$(MSVSCPP_FILES)\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in\n\n"
  },
  {
    "path": "msvscpp/fsntfs_test_attribute/fsntfs_test_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_attribute\"\r\n\tProjectGUID=\"{14362056-DE51-456D-A0BA-1D4C346D8DF5}\"\r\n\tRootNamespace=\"fsntfs_test_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_attribute_list_entry/fsntfs_test_attribute_list_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_attribute_list_entry\"\r\n\tProjectGUID=\"{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}\"\r\n\tRootNamespace=\"fsntfs_test_attribute_list_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_attribute_list_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_bitmap_values/fsntfs_test_bitmap_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_bitmap_values\"\r\n\tProjectGUID=\"{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}\"\r\n\tRootNamespace=\"fsntfs_test_bitmap_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_bitmap_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_buffer_data_handle/fsntfs_test_buffer_data_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_buffer_data_handle\"\r\n\tProjectGUID=\"{9F4E16E9-E314-4807-B923-4E1B5DD97275}\"\r\n\tRootNamespace=\"fsntfs_test_buffer_data_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_buffer_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_cluster_block/fsntfs_test_cluster_block.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_cluster_block\"\r\n\tProjectGUID=\"{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}\"\r\n\tRootNamespace=\"fsntfs_test_cluster_block\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_cluster_block.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_cluster_block_data/fsntfs_test_cluster_block_data.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_cluster_block_data\"\r\n\tProjectGUID=\"{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}\"\r\n\tRootNamespace=\"fsntfs_test_cluster_block_data\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_cluster_block_data.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_cluster_block_stream/fsntfs_test_cluster_block_stream.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_cluster_block_stream\"\r\n\tProjectGUID=\"{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}\"\r\n\tRootNamespace=\"fsntfs_test_cluster_block_stream\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_cluster_block_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_cluster_block_vector/fsntfs_test_cluster_block_vector.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_cluster_block_vector\"\r\n\tProjectGUID=\"{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}\"\r\n\tRootNamespace=\"fsntfs_test_cluster_block_vector\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_cluster_block_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compressed_block/fsntfs_test_compressed_block.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compressed_block\"\r\n\tProjectGUID=\"{86801698-77FD-435B-8E13-1648210DEB78}\"\r\n\tRootNamespace=\"fsntfs_test_compressed_block\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compressed_block.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compressed_block_data_handle/fsntfs_test_compressed_block_data_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compressed_block_data_handle\"\r\n\tProjectGUID=\"{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}\"\r\n\tRootNamespace=\"fsntfs_test_compressed_block_data_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compressed_block_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compressed_block_vector/fsntfs_test_compressed_block_vector.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compressed_block_vector\"\r\n\tProjectGUID=\"{CF9B84E8-2B48-44DF-8669-EFC0E3449277}\"\r\n\tRootNamespace=\"fsntfs_test_compressed_block_vector\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compressed_block_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compressed_data_handle/fsntfs_test_compressed_data_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compressed_data_handle\"\r\n\tProjectGUID=\"{B54DE37F-756A-4AA6-B433-37EE73615DC8}\"\r\n\tRootNamespace=\"fsntfs_test_compressed_data_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compressed_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compression/fsntfs_test_compression.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compression\"\r\n\tProjectGUID=\"{0D77DCAA-02A7-4D35-8823-96BA88A7B132}\"\r\n\tRootNamespace=\"fsntfs_test_compression\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compression.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compression_unit_data_handle/fsntfs_test_compression_unit_data_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compression_unit_data_handle\"\r\n\tProjectGUID=\"{5D487897-C716-451D-839D-F9822EF149F4}\"\r\n\tRootNamespace=\"fsntfs_test_compression_unit_data_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compression_unit_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_compression_unit_descriptor/fsntfs_test_compression_unit_descriptor.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_compression_unit_descriptor\"\r\n\tProjectGUID=\"{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}\"\r\n\tRootNamespace=\"fsntfs_test_compression_unit_descriptor\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_compression_unit_descriptor.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_data_run/fsntfs_test_data_run.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_data_run\"\r\n\tProjectGUID=\"{897B0517-4405-4BE7-960B-8FD8CFC1F632}\"\r\n\tRootNamespace=\"fsntfs_test_data_run\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_data_run.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_data_stream/fsntfs_test_data_stream.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_data_stream\"\r\n\tProjectGUID=\"{366722BE-D632-4011-A62D-21DA660F5266}\"\r\n\tRootNamespace=\"fsntfs_test_data_stream\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_data_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_directory_entries_tree/fsntfs_test_directory_entries_tree.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_directory_entries_tree\"\r\n\tProjectGUID=\"{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}\"\r\n\tRootNamespace=\"fsntfs_test_directory_entries_tree\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_directory_entries_tree.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_directory_entry/fsntfs_test_directory_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_directory_entry\"\r\n\tProjectGUID=\"{872A52AC-56B8-4A03-998A-E991ABBB16CD}\"\r\n\tRootNamespace=\"fsntfs_test_directory_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_directory_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_error/fsntfs_test_error.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_error\"\r\n\tProjectGUID=\"{E70D7EBE-951C-4C94-845E-44766CED4367}\"\r\n\tRootNamespace=\"fsntfs_test_error\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_extent/fsntfs_test_extent.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_extent\"\r\n\tProjectGUID=\"{CEDB7153-D51D-4A20-B268-816AC7F79D85}\"\r\n\tRootNamespace=\"fsntfs_test_extent\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_extent.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_file_entry/fsntfs_test_file_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_file_entry\"\r\n\tProjectGUID=\"{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}\"\r\n\tRootNamespace=\"fsntfs_test_file_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_file_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_file_name_attribute/fsntfs_test_file_name_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_file_name_attribute\"\r\n\tProjectGUID=\"{2BB976E5-C6A6-4EFA-9112-C11FB1088136}\"\r\n\tRootNamespace=\"fsntfs_test_file_name_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_file_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_file_name_values/fsntfs_test_file_name_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_file_name_values\"\r\n\tProjectGUID=\"{4E267E4B-4F7C-4031-B8A3-D023803D6822}\"\r\n\tRootNamespace=\"fsntfs_test_file_name_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_file_name_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_file_system/fsntfs_test_file_system.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_file_system\"\r\n\tProjectGUID=\"{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}\"\r\n\tRootNamespace=\"fsntfs_test_file_system\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_file_system.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_fixup_values/fsntfs_test_fixup_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_fixup_values\"\r\n\tProjectGUID=\"{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}\"\r\n\tRootNamespace=\"fsntfs_test_fixup_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_fixup_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index/fsntfs_test_index.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index\"\r\n\tProjectGUID=\"{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}\"\r\n\tRootNamespace=\"fsntfs_test_index\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_entry/fsntfs_test_index_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_entry\"\r\n\tProjectGUID=\"{5F5EFDC4-BB68-493C-B4CB-44C82892090C}\"\r\n\tRootNamespace=\"fsntfs_test_index_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_entry_header/fsntfs_test_index_entry_header.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_entry_header\"\r\n\tProjectGUID=\"{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}\"\r\n\tRootNamespace=\"fsntfs_test_index_entry_header\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_entry_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_entry_vector/fsntfs_test_index_entry_vector.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_entry_vector\"\r\n\tProjectGUID=\"{60828C47-8A89-42DA-98CB-6775272A2FDC}\"\r\n\tRootNamespace=\"fsntfs_test_index_entry_vector\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_entry_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_node/fsntfs_test_index_node.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_node\"\r\n\tProjectGUID=\"{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}\"\r\n\tRootNamespace=\"fsntfs_test_index_node\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_node.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_node_header/fsntfs_test_index_node_header.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_node_header\"\r\n\tProjectGUID=\"{83A76DAD-2982-4A72-84B8-A355112A4A23}\"\r\n\tRootNamespace=\"fsntfs_test_index_node_header\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_node_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_root_header/fsntfs_test_index_root_header.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_root_header\"\r\n\tProjectGUID=\"{E6F1AE28-F1A0-423C-8810-0B5051E27384}\"\r\n\tRootNamespace=\"fsntfs_test_index_root_header\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_root_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_index_value/fsntfs_test_index_value.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_index_value\"\r\n\tProjectGUID=\"{A62A34CD-C110-49D8-A4D6-9047A82856CE}\"\r\n\tRootNamespace=\"fsntfs_test_index_value\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_io_handle/fsntfs_test_io_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_io_handle\"\r\n\tProjectGUID=\"{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}\"\r\n\tRootNamespace=\"fsntfs_test_io_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_logged_utility_stream_values/fsntfs_test_logged_utility_stream_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_logged_utility_stream_values\"\r\n\tProjectGUID=\"{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}\"\r\n\tRootNamespace=\"fsntfs_test_logged_utility_stream_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_logged_utility_stream_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft/fsntfs_test_mft.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft\"\r\n\tProjectGUID=\"{A3F12C14-08FF-412C-806B-8258A444B134}\"\r\n\tRootNamespace=\"fsntfs_test_mft\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_attribute/fsntfs_test_mft_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_attribute\"\r\n\tProjectGUID=\"{33B72873-D87D-480A-8371-3334AEE49B6C}\"\r\n\tRootNamespace=\"fsntfs_test_mft_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_attribute_list/fsntfs_test_mft_attribute_list.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_attribute_list\"\r\n\tProjectGUID=\"{160C2657-FEEE-45BC-959F-D68E6B07F619}\"\r\n\tRootNamespace=\"fsntfs_test_mft_attribute_list\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_attribute_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_attribute_list_entry/fsntfs_test_mft_attribute_list_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_attribute_list_entry\"\r\n\tProjectGUID=\"{4D7E70CE-57AD-430F-8387-BB518D767BD2}\"\r\n\tRootNamespace=\"fsntfs_test_mft_attribute_list_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_attribute_list_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_entry/fsntfs_test_mft_entry.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_entry\"\r\n\tProjectGUID=\"{59700D23-BA81-4639-8F02-3F609FAB22EF}\"\r\n\tRootNamespace=\"fsntfs_test_mft_entry\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_entry_header/fsntfs_test_mft_entry_header.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_entry_header\"\r\n\tProjectGUID=\"{66977E3C-C885-454C-B1D7-67A232096535}\"\r\n\tRootNamespace=\"fsntfs_test_mft_entry_header\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_entry_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_mft_metadata_file/fsntfs_test_mft_metadata_file.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_mft_metadata_file\"\r\n\tProjectGUID=\"{69500ADF-371A-43DE-B73E-8A4CA34CB16C}\"\r\n\tRootNamespace=\"fsntfs_test_mft_metadata_file\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_mft_metadata_file.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_name/fsntfs_test_name.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_name\"\r\n\tProjectGUID=\"{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}\"\r\n\tRootNamespace=\"fsntfs_test_name\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_name.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_notify/fsntfs_test_notify.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_notify\"\r\n\tProjectGUID=\"{3C380B85-EC36-457F-A07A-05C9B56AD5F6}\"\r\n\tRootNamespace=\"fsntfs_test_notify\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_notify.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_object_identifier_values/fsntfs_test_object_identifier_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_object_identifier_values\"\r\n\tProjectGUID=\"{38C14533-3620-463E-9476-CCB8D224DCF6}\"\r\n\tRootNamespace=\"fsntfs_test_object_identifier_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_object_identifier_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_path_hint/fsntfs_test_path_hint.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_path_hint\"\r\n\tProjectGUID=\"{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}\"\r\n\tRootNamespace=\"fsntfs_test_path_hint\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_path_hint.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_profiler/fsntfs_test_profiler.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_profiler\"\r\n\tProjectGUID=\"{BEB36450-DEDD-4262-AC86-ACBE007581F6}\"\r\n\tRootNamespace=\"fsntfs_test_profiler\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_profiler.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_reparse_point_attribute/fsntfs_test_reparse_point_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_reparse_point_attribute\"\r\n\tProjectGUID=\"{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}\"\r\n\tRootNamespace=\"fsntfs_test_reparse_point_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_reparse_point_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_reparse_point_values/fsntfs_test_reparse_point_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_reparse_point_values\"\r\n\tProjectGUID=\"{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}\"\r\n\tRootNamespace=\"fsntfs_test_reparse_point_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_reparse_point_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_sds_index_value/fsntfs_test_sds_index_value.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_sds_index_value\"\r\n\tProjectGUID=\"{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}\"\r\n\tRootNamespace=\"fsntfs_test_sds_index_value\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_sds_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_security_descriptor_index/fsntfs_test_security_descriptor_index.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_security_descriptor_index\"\r\n\tProjectGUID=\"{AF956C6B-4E27-487E-B795-7F8503A4B5AB}\"\r\n\tRootNamespace=\"fsntfs_test_security_descriptor_index\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_security_descriptor_index.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_security_descriptor_index_value/fsntfs_test_security_descriptor_index_value.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_security_descriptor_index_value\"\r\n\tProjectGUID=\"{B6B3A52D-BD01-4831-8F40-080721E5F3B8}\"\r\n\tRootNamespace=\"fsntfs_test_security_descriptor_index_value\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_security_descriptor_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_security_descriptor_values/fsntfs_test_security_descriptor_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_security_descriptor_values\"\r\n\tProjectGUID=\"{23AA7603-07B4-42EF-9535-8BA4C156504E}\"\r\n\tRootNamespace=\"fsntfs_test_security_descriptor_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_security_descriptor_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_standard_information_values/fsntfs_test_standard_information_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_standard_information_values\"\r\n\tProjectGUID=\"{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}\"\r\n\tRootNamespace=\"fsntfs_test_standard_information_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_standard_information_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_support/fsntfs_test_support.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_support\"\r\n\tProjectGUID=\"{A3CAA91B-F202-4B5E-B11B-367E05C097DC}\"\r\n\tRootNamespace=\"fsntfs_test_support\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_bodyfile/fsntfs_test_tools_bodyfile.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_bodyfile\"\r\n\tProjectGUID=\"{92D81AA9-3090-4B66-966F-EE4CAA062A18}\"\r\n\tRootNamespace=\"fsntfs_test_tools_bodyfile\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_bodyfile.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcpath.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_digest_hash/fsntfs_test_tools_digest_hash.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_digest_hash\"\r\n\tProjectGUID=\"{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}\"\r\n\tRootNamespace=\"fsntfs_test_tools_digest_hash\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_digest_hash.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_info_handle/fsntfs_test_tools_info_handle.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_info_handle\"\r\n\tProjectGUID=\"{60D0DC49-FB23-4356-B93B-3083D6C7870F}\"\r\n\tRootNamespace=\"fsntfs_test_tools_info_handle\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\info_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_info_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\info_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_mount_path_string/fsntfs_test_tools_mount_path_string.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_mount_path_string\"\r\n\tProjectGUID=\"{3F48737B-A8D7-418A-A448-40AFBAEA1733}\"\r\n\tRootNamespace=\"fsntfs_test_tools_mount_path_string\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_mount_path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_path_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_output/fsntfs_test_tools_output.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_output\"\r\n\tProjectGUID=\"{71D59C5D-6E61-4132-B33D-F52524422CB1}\"\r\n\tRootNamespace=\"fsntfs_test_tools_output\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_output.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_path_string/fsntfs_test_tools_path_string.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_path_string\"\r\n\tProjectGUID=\"{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}\"\r\n\tRootNamespace=\"fsntfs_test_tools_path_string\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcpath.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_tools_signal/fsntfs_test_tools_signal.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_tools_signal\"\r\n\tProjectGUID=\"{DC6AD8F6-542A-48AC-8960-E62927C907FB}\"\r\n\tRootNamespace=\"fsntfs_test_tools_signal\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_tools_signal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_txf_data_values/fsntfs_test_txf_data_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_txf_data_values\"\r\n\tProjectGUID=\"{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}\"\r\n\tRootNamespace=\"fsntfs_test_txf_data_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_txf_data_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_usn_change_journal/fsntfs_test_usn_change_journal.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_usn_change_journal\"\r\n\tProjectGUID=\"{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}\"\r\n\tRootNamespace=\"fsntfs_test_usn_change_journal\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_usn_change_journal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume/fsntfs_test_volume.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume\"\r\n\tProjectGUID=\"{B15D7487-46E8-4134-B095-DC601DD7F6C5}\"\r\n\tRootNamespace=\"fsntfs_test_volume\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_getopt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_rwlock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume_header/fsntfs_test_volume_header.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume_header\"\r\n\tProjectGUID=\"{568C781B-991A-4713-B035-C15BA84C13D1}\"\r\n\tRootNamespace=\"fsntfs_test_volume_header\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_functions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume_information_attribute/fsntfs_test_volume_information_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume_information_attribute\"\r\n\tProjectGUID=\"{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}\"\r\n\tRootNamespace=\"fsntfs_test_volume_information_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume_information_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume_information_values/fsntfs_test_volume_information_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume_information_values\"\r\n\tProjectGUID=\"{04F1B6AF-0358-4FD2-88F9-E609356E7097}\"\r\n\tRootNamespace=\"fsntfs_test_volume_information_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume_information_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume_name_attribute/fsntfs_test_volume_name_attribute.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume_name_attribute\"\r\n\tProjectGUID=\"{C5627F45-9745-4015-9E82-4CC28EE7278B}\"\r\n\tRootNamespace=\"fsntfs_test_volume_name_attribute\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfs_test_volume_name_values/fsntfs_test_volume_name_values.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfs_test_volume_name_values\"\r\n\tProjectGUID=\"{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}\"\r\n\tRootNamespace=\"fsntfs_test_volume_name_values\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_volume_name_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_macros.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_memory.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\tests\\fsntfs_test_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfsinfo/fsntfsinfo.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfsinfo\"\r\n\tProjectGUID=\"{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}\"\r\n\tRootNamespace=\"fsntfsinfo\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfsinfo.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_getopt.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\info_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\bodyfile.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\digest_hash.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_getopt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_i18n.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfdatetime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfguid.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfusn.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfwnt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libhmac.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\info_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\path_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/fsntfsmount/fsntfsmount.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"fsntfsmount\"\r\n\tProjectGUID=\"{48BE6463-9726-40DA-AF2A-7F9E590C4B20}\"\r\n\tRootNamespace=\"fsntfsmount\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac;..\\..\\..\\dokan\\dokan\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;HAVE_LIBDOKAN;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"..\\..\\..\\dokan\\msvscpp\\$(ConfigurationName)\\dokan.lib\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfusn;..\\..\\libfwnt;..\\..\\libhmac;..\\..\\..\\dokan\\dokan\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFUSN;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBHMAC;HAVE_LIBDOKAN;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"..\\..\\..\\dokan\\msvscpp\\$(ConfigurationName)\\dokan.lib\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfsmount.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_getopt.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_dokan.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_file_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_file_system.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_fuse.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_path_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_getopt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_i18n.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libcpath.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_output.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_signal.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\fsntfstools_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_dokan.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_file_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_file_system.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_fuse.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\fsntfstools\\mount_path_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libbfio/libbfio.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libbfio\"\r\n\tProjectGUID=\"{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\"\r\n\tRootNamespace=\"libbfio\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcdata;..\\..\\libcsplit;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcdata;..\\..\\libcsplit;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_pool.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_range.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_range_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_memory_range.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_memory_range_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_pool.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_system_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_codepage.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_io_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_pool.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_range.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_file_range_io_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libcfile.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libcpath.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libcthreads.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_memory_range.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_memory_range_io_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_pool.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_system_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libbfio\\libbfio_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcdata/libcdata.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcdata\"\r\n\tProjectGUID=\"{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\"\r\n\tRootNamespace=\"libcdata\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_array.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree_node.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree_values_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_list_element.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_range_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_range_list_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_tree_node.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_array.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree_node.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_btree_values_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_libcthreads.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_list_element.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_range_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_range_list_value.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_tree_node.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcdata\\libcdata_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcerror/libcerror.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcerror\"\r\n\tProjectGUID=\"{4C79D798-FB54-4CD5-9067-9BDC8678478A}\"\r\n\tRootNamespace=\"libcerror\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_system.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_system.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcerror\\libcerror_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcfile/libcfile.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcfile\"\r\n\tProjectGUID=\"{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\"\r\n\tRootNamespace=\"libcfile\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_file.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_notify.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_system_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_winapi.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_file.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_notify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_system_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcfile\\libcfile_winapi.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libclocale/libclocale.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libclocale\"\r\n\tProjectGUID=\"{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\"\r\n\tRootNamespace=\"libclocale\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_codepage.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_locale.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_wide_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_codepage.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_locale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libclocale\\libclocale_wide_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcnotify/libcnotify.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcnotify\"\r\n\tProjectGUID=\"{5641B37B-7AE7-450A-A433-7B83C73BC878}\"\r\n\tRootNamespace=\"libcnotify\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_print.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_verbose.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_print.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcnotify\\libcnotify_verbose.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcpath/libcpath.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcpath\"\r\n\tProjectGUID=\"{5C1834B6-0BA9-4541-8770-D65A78F33958}\"\r\n\tRootNamespace=\"libcpath\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libclocale;..\\..\\libcsplit;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libclocale;..\\..\\libcsplit;..\\..\\libuna\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_path.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_system_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_libcsplit.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_path.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_system_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcpath\\libcpath_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcsplit/libcsplit.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcsplit\"\r\n\tProjectGUID=\"{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\"\r\n\tRootNamespace=\"libcsplit\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_narrow_split_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_narrow_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_wide_split_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_wide_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_narrow_split_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_narrow_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_wide_split_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcsplit\\libcsplit_wide_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libcthreads/libcthreads.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libcthreads\"\r\n\tProjectGUID=\"{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\"\r\n\tRootNamespace=\"libcthreads\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_condition.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_lock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_mutex.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_queue.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_read_write_lock.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_repeating_thread.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread_attributes.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread_pool.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_condition.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_lock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_mutex.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_queue.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_read_write_lock.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_repeating_thread.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread_attributes.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_thread_pool.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libcthreads\\libcthreads_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfcache/libfcache.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfcache\"\r\n\tProjectGUID=\"{D46D1213-A541-465A-B75B-B5BE4DF98CDB}\"\r\n\tRootNamespace=\"libfcache\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_cache.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_cache_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_date_time.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_cache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_cache_value.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_date_time.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfcache\\libfcache_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfdata/libfdata.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfdata\"\r\n\tProjectGUID=\"{D9725AED-6124-4225-AC2B-306A97F90607}\"\r\n\tRootNamespace=\"libfdata\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libcnotify;..\\..\\libfcache\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libcnotify;..\\..\\libfcache\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_area.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_cache.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_list_element.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_mapped_range.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_notify.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_range.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_range_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_segments_array.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_area.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_cache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_list_element.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_mapped_range.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_notify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_range.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_range_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_segments_array.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdata\\libfdata_vector.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfdatetime/libfdatetime.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfdatetime\"\r\n\tProjectGUID=\"{A95C47C2-8CFA-4BBB-BD66-3B198323B409}\"\r\n\tRootNamespace=\"libfdatetime\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_date_time_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_fat_date_time.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_filetime.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_floatingtime.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_hfs_time.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_nsf_timedate.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_posix_time.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_systemtime.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_date_time_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_fat_date_time.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_filetime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_floatingtime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_hfs_time.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_nsf_timedate.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_posix_time.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_systemtime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfdatetime\\libfdatetime_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfguid/libfguid.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfguid\"\r\n\tProjectGUID=\"{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\"\r\n\tRootNamespace=\"libfguid\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_identifier.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_identifier.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfguid\\libfguid_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfsntfs/libfsntfs.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfsntfs\"\r\n\tProjectGUID=\"{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\"\r\n\tRootNamespace=\"libfsntfs\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfwnt\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;LIBFSNTFS_DLL_EXPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).dll\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t\tImportLibrary=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcnotify;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfcache;..\\..\\libfdata;..\\..\\libfdatetime;..\\..\\libfguid;..\\..\\libfwnt\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;LIBFSNTFS_DLL_EXPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).dll\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t\tImportLibrary=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute_list_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute_list_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_bitmap_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_buffer_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_data.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression_unit_data_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression_unit_descriptor.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_data_run.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_data_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_debug.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_directory_entries_tree.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_directory_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_extent.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_name_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_system.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_fixup_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry_vector.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_node.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_node_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_root_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_logged_utility_stream_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute_list_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_entry_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_metadata_file.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_name.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_notify.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_object_identifier_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_object_identifier_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_path_hint.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_profiler.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_reparse_point_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_reparse_point_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_sds_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_index.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_index_value.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_standard_information_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_standard_information_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_txf_data_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_usn_change_journal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_header.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_information_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_information_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_name_values.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_file_name.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_index.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_logged_utility_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_mft_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_mft_attribute_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_mft_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_object_identifier.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_reparse_point.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_secure.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_standard_information.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_txf_data.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_volume_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\fsntfs_volume_information.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute_list_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_attribute_list_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_bitmap_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_buffer_data_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_data.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_cluster_block_vector.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block_data_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_block_vector.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compressed_data_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression_unit_data_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_compression_unit_descriptor.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_data_run.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_data_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_debug.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_directory_entries_tree.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_directory_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_extent.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_name_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_name_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_file_system.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_fixup_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_entry_vector.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_node.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_node_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_root_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_index_value.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_io_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libcthreads.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libfcache.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libfdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libfdatetime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libfguid.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libfwnt.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_logged_utility_stream_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_attribute_list_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_entry_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_mft_metadata_file.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_name.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_notify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_object_identifier_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_object_identifier_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_path_hint.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_profiler.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_reparse_point_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_reparse_point_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_sds_index_value.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_index.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_index_value.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_security_descriptor_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_standard_information_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_standard_information_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_txf_data_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_usn_change_journal.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_header.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_information_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_information_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_name_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs_volume_name_values.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfsntfs\\libfsntfs.rc\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfsntfs.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 10.00\r\n# Visual C++ Express 2008\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfcache\", \"libfcache\\libfcache.vcproj\", \"{D46D1213-A541-465A-B75B-B5BE4DF98CDB}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfguid\", \"libfguid\\libfguid.vcproj\", \"{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_attribute\", \"fsntfs_test_attribute\\fsntfs_test_attribute.vcproj\", \"{14362056-DE51-456D-A0BA-1D4C346D8DF5}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_attribute_list_entry\", \"fsntfs_test_attribute_list_entry\\fsntfs_test_attribute_list_entry.vcproj\", \"{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_bitmap_values\", \"fsntfs_test_bitmap_values\\fsntfs_test_bitmap_values.vcproj\", \"{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_buffer_data_handle\", \"fsntfs_test_buffer_data_handle\\fsntfs_test_buffer_data_handle.vcproj\", \"{9F4E16E9-E314-4807-B923-4E1B5DD97275}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_cluster_block\", \"fsntfs_test_cluster_block\\fsntfs_test_cluster_block.vcproj\", \"{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_cluster_block_data\", \"fsntfs_test_cluster_block_data\\fsntfs_test_cluster_block_data.vcproj\", \"{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_cluster_block_stream\", \"fsntfs_test_cluster_block_stream\\fsntfs_test_cluster_block_stream.vcproj\", \"{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_cluster_block_vector\", \"fsntfs_test_cluster_block_vector\\fsntfs_test_cluster_block_vector.vcproj\", \"{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB} = {D46D1213-A541-465A-B75B-B5BE4DF98CDB}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compressed_block\", \"fsntfs_test_compressed_block\\fsntfs_test_compressed_block.vcproj\", \"{86801698-77FD-435B-8E13-1648210DEB78}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compressed_block_data_handle\", \"fsntfs_test_compressed_block_data_handle\\fsntfs_test_compressed_block_data_handle.vcproj\", \"{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compressed_block_vector\", \"fsntfs_test_compressed_block_vector\\fsntfs_test_compressed_block_vector.vcproj\", \"{CF9B84E8-2B48-44DF-8669-EFC0E3449277}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB} = {D46D1213-A541-465A-B75B-B5BE4DF98CDB}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compressed_data_handle\", \"fsntfs_test_compressed_data_handle\\fsntfs_test_compressed_data_handle.vcproj\", \"{B54DE37F-756A-4AA6-B433-37EE73615DC8}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compression\", \"fsntfs_test_compression\\fsntfs_test_compression.vcproj\", \"{0D77DCAA-02A7-4D35-8823-96BA88A7B132}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compression_unit_data_handle\", \"fsntfs_test_compression_unit_data_handle\\fsntfs_test_compression_unit_data_handle.vcproj\", \"{5D487897-C716-451D-839D-F9822EF149F4}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_compression_unit_descriptor\", \"fsntfs_test_compression_unit_descriptor\\fsntfs_test_compression_unit_descriptor.vcproj\", \"{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_data_run\", \"fsntfs_test_data_run\\fsntfs_test_data_run.vcproj\", \"{897B0517-4405-4BE7-960B-8FD8CFC1F632}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_data_stream\", \"fsntfs_test_data_stream\\fsntfs_test_data_stream.vcproj\", \"{366722BE-D632-4011-A62D-21DA660F5266}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_directory_entries_tree\", \"fsntfs_test_directory_entries_tree\\fsntfs_test_directory_entries_tree.vcproj\", \"{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_directory_entry\", \"fsntfs_test_directory_entry\\fsntfs_test_directory_entry.vcproj\", \"{872A52AC-56B8-4A03-998A-E991ABBB16CD}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_error\", \"fsntfs_test_error\\fsntfs_test_error.vcproj\", \"{E70D7EBE-951C-4C94-845E-44766CED4367}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_extent\", \"fsntfs_test_extent\\fsntfs_test_extent.vcproj\", \"{CEDB7153-D51D-4A20-B268-816AC7F79D85}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_file_entry\", \"fsntfs_test_file_entry\\fsntfs_test_file_entry.vcproj\", \"{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_file_name_attribute\", \"fsntfs_test_file_name_attribute\\fsntfs_test_file_name_attribute.vcproj\", \"{2BB976E5-C6A6-4EFA-9112-C11FB1088136}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_file_name_values\", \"fsntfs_test_file_name_values\\fsntfs_test_file_name_values.vcproj\", \"{4E267E4B-4F7C-4031-B8A3-D023803D6822}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_file_system\", \"fsntfs_test_file_system\\fsntfs_test_file_system.vcproj\", \"{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_fixup_values\", \"fsntfs_test_fixup_values\\fsntfs_test_fixup_values.vcproj\", \"{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index\", \"fsntfs_test_index\\fsntfs_test_index.vcproj\", \"{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_entry\", \"fsntfs_test_index_entry\\fsntfs_test_index_entry.vcproj\", \"{5F5EFDC4-BB68-493C-B4CB-44C82892090C}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_entry_header\", \"fsntfs_test_index_entry_header\\fsntfs_test_index_entry_header.vcproj\", \"{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_entry_vector\", \"fsntfs_test_index_entry_vector\\fsntfs_test_index_entry_vector.vcproj\", \"{60828C47-8A89-42DA-98CB-6775272A2FDC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB} = {D46D1213-A541-465A-B75B-B5BE4DF98CDB}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_node\", \"fsntfs_test_index_node\\fsntfs_test_index_node.vcproj\", \"{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_node_header\", \"fsntfs_test_index_node_header\\fsntfs_test_index_node_header.vcproj\", \"{83A76DAD-2982-4A72-84B8-A355112A4A23}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_root_header\", \"fsntfs_test_index_root_header\\fsntfs_test_index_root_header.vcproj\", \"{E6F1AE28-F1A0-423C-8810-0B5051E27384}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_index_value\", \"fsntfs_test_index_value\\fsntfs_test_index_value.vcproj\", \"{A62A34CD-C110-49D8-A4D6-9047A82856CE}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_io_handle\", \"fsntfs_test_io_handle\\fsntfs_test_io_handle.vcproj\", \"{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_logged_utility_stream_values\", \"fsntfs_test_logged_utility_stream_values\\fsntfs_test_logged_utility_stream_values.vcproj\", \"{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft\", \"fsntfs_test_mft\\fsntfs_test_mft.vcproj\", \"{A3F12C14-08FF-412C-806B-8258A444B134}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_attribute\", \"fsntfs_test_mft_attribute\\fsntfs_test_mft_attribute.vcproj\", \"{33B72873-D87D-480A-8371-3334AEE49B6C}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_attribute_list\", \"fsntfs_test_mft_attribute_list\\fsntfs_test_mft_attribute_list.vcproj\", \"{160C2657-FEEE-45BC-959F-D68E6B07F619}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_attribute_list_entry\", \"fsntfs_test_mft_attribute_list_entry\\fsntfs_test_mft_attribute_list_entry.vcproj\", \"{4D7E70CE-57AD-430F-8387-BB518D767BD2}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_entry\", \"fsntfs_test_mft_entry\\fsntfs_test_mft_entry.vcproj\", \"{59700D23-BA81-4639-8F02-3F609FAB22EF}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_entry_header\", \"fsntfs_test_mft_entry_header\\fsntfs_test_mft_entry_header.vcproj\", \"{66977E3C-C885-454C-B1D7-67A232096535}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_mft_metadata_file\", \"fsntfs_test_mft_metadata_file\\fsntfs_test_mft_metadata_file.vcproj\", \"{69500ADF-371A-43DE-B73E-8A4CA34CB16C}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_name\", \"fsntfs_test_name\\fsntfs_test_name.vcproj\", \"{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_notify\", \"fsntfs_test_notify\\fsntfs_test_notify.vcproj\", \"{3C380B85-EC36-457F-A07A-05C9B56AD5F6}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_object_identifier_values\", \"fsntfs_test_object_identifier_values\\fsntfs_test_object_identifier_values.vcproj\", \"{38C14533-3620-463E-9476-CCB8D224DCF6}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_path_hint\", \"fsntfs_test_path_hint\\fsntfs_test_path_hint.vcproj\", \"{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_profiler\", \"fsntfs_test_profiler\\fsntfs_test_profiler.vcproj\", \"{BEB36450-DEDD-4262-AC86-ACBE007581F6}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_reparse_point_attribute\", \"fsntfs_test_reparse_point_attribute\\fsntfs_test_reparse_point_attribute.vcproj\", \"{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_reparse_point_values\", \"fsntfs_test_reparse_point_values\\fsntfs_test_reparse_point_values.vcproj\", \"{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_sds_index_value\", \"fsntfs_test_sds_index_value\\fsntfs_test_sds_index_value.vcproj\", \"{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_security_descriptor_index\", \"fsntfs_test_security_descriptor_index\\fsntfs_test_security_descriptor_index.vcproj\", \"{AF956C6B-4E27-487E-B795-7F8503A4B5AB}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_security_descriptor_index_value\", \"fsntfs_test_security_descriptor_index_value\\fsntfs_test_security_descriptor_index_value.vcproj\", \"{B6B3A52D-BD01-4831-8F40-080721E5F3B8}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_security_descriptor_values\", \"fsntfs_test_security_descriptor_values\\fsntfs_test_security_descriptor_values.vcproj\", \"{23AA7603-07B4-42EF-9535-8BA4C156504E}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_standard_information_values\", \"fsntfs_test_standard_information_values\\fsntfs_test_standard_information_values.vcproj\", \"{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_support\", \"fsntfs_test_support\\fsntfs_test_support.vcproj\", \"{A3CAA91B-F202-4B5E-B11B-367E05C097DC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_bodyfile\", \"fsntfs_test_tools_bodyfile\\fsntfs_test_tools_bodyfile.vcproj\", \"{92D81AA9-3090-4B66-966F-EE4CAA062A18}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_digest_hash\", \"fsntfs_test_tools_digest_hash\\fsntfs_test_tools_digest_hash.vcproj\", \"{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_info_handle\", \"fsntfs_test_tools_info_handle\\fsntfs_test_tools_info_handle.vcproj\", \"{60D0DC49-FB23-4356-B93B-3083D6C7870F}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC} = {6BA13A4B-8361-474A-8055-3A9F2437C3AC}\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021} = {1860A9F0-4E82-4808-B6F0-59625D118021}\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9} = {CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78} = {AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409} = {A95C47C2-8CFA-4BBB-BD66-3B198323B409}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_mount_path_string\", \"fsntfs_test_tools_mount_path_string\\fsntfs_test_tools_mount_path_string.vcproj\", \"{3F48737B-A8D7-418A-A448-40AFBAEA1733}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_output\", \"fsntfs_test_tools_output\\fsntfs_test_tools_output.vcproj\", \"{71D59C5D-6E61-4132-B33D-F52524422CB1}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_path_string\", \"fsntfs_test_tools_path_string\\fsntfs_test_tools_path_string.vcproj\", \"{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_tools_signal\", \"fsntfs_test_tools_signal\\fsntfs_test_tools_signal.vcproj\", \"{DC6AD8F6-542A-48AC-8960-E62927C907FB}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_txf_data_values\", \"fsntfs_test_txf_data_values\\fsntfs_test_txf_data_values.vcproj\", \"{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_usn_change_journal\", \"fsntfs_test_usn_change_journal\\fsntfs_test_usn_change_journal.vcproj\", \"{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume\", \"fsntfs_test_volume\\fsntfs_test_volume.vcproj\", \"{B15D7487-46E8-4134-B095-DC601DD7F6C5}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume_header\", \"fsntfs_test_volume_header\\fsntfs_test_volume_header.vcproj\", \"{568C781B-991A-4713-B035-C15BA84C13D1}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume_information_attribute\", \"fsntfs_test_volume_information_attribute\\fsntfs_test_volume_information_attribute.vcproj\", \"{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume_information_values\", \"fsntfs_test_volume_information_values\\fsntfs_test_volume_information_values.vcproj\", \"{04F1B6AF-0358-4FD2-88F9-E609356E7097}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume_name_attribute\", \"fsntfs_test_volume_name_attribute\\fsntfs_test_volume_name_attribute.vcproj\", \"{C5627F45-9745-4015-9E82-4CC28EE7278B}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfs_test_volume_name_values\", \"fsntfs_test_volume_name_values\\fsntfs_test_volume_name_values.vcproj\", \"{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libclocale\", \"libclocale\\libclocale.vcproj\", \"{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libbfio\", \"libbfio\\libbfio.vcproj\", \"{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfsinfo\", \"fsntfsinfo\\fsntfsinfo.vcproj\", \"{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC} = {6BA13A4B-8361-474A-8055-3A9F2437C3AC}\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021} = {1860A9F0-4E82-4808-B6F0-59625D118021}\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9} = {CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78} = {AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409} = {A95C47C2-8CFA-4BBB-BD66-3B198323B409}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"fsntfsmount\", \"fsntfsmount\\fsntfsmount.vcproj\", \"{48BE6463-9726-40DA-AF2A-7F9E590C4B20}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfsntfs\", \"libfsntfs\\libfsntfs.vcproj\", \"{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB} = {D46D1213-A541-465A-B75B-B5BE4DF98CDB}\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607} = {D9725AED-6124-4225-AC2B-306A97F90607}\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409} = {A95C47C2-8CFA-4BBB-BD66-3B198323B409}\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78} = {AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021} = {1860A9F0-4E82-4808-B6F0-59625D118021}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfdatetime\", \"libfdatetime\\libfdatetime.vcproj\", \"{A95C47C2-8CFA-4BBB-BD66-3B198323B409}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcfile\", \"libcfile\\libcfile.vcproj\", \"{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfwnt\", \"libfwnt\\libfwnt.vcproj\", \"{1860A9F0-4E82-4808-B6F0-59625D118021}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcthreads\", \"libcthreads\\libcthreads.vcproj\", \"{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"pyfsntfs\", \"pyfsntfs\\pyfsntfs.vcproj\", \"{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D} = {D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2} = {9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958} = {5C1834B6-0BA9-4541-8770-D65A78F33958}\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51} = {B3CAA0DA-B778-4B69-8537-3AF7F9984F51}\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78} = {AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcpath\", \"libcpath\\libcpath.vcproj\", \"{5C1834B6-0BA9-4541-8770-D65A78F33958}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395} = {F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076} = {9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfusn\", \"libfusn\\libfusn.vcproj\", \"{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D} = {8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409} = {A95C47C2-8CFA-4BBB-BD66-3B198323B409}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libhmac\", \"libhmac\\libhmac.vcproj\", \"{6BA13A4B-8361-474A-8055-3A9F2437C3AC}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libuna\", \"libuna\\libuna.vcproj\", \"{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcerror\", \"libcerror\\libcerror.vcproj\", \"{4C79D798-FB54-4CD5-9067-9BDC8678478A}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcnotify\", \"libcnotify\\libcnotify.vcproj\", \"{5641B37B-7AE7-450A-A433-7B83C73BC878}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libfdata\", \"libfdata\\libfdata.vcproj\", \"{D9725AED-6124-4225-AC2B-306A97F90607}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5} = {F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878} = {5641B37B-7AE7-450A-A433-7B83C73BC878}\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB} = {D46D1213-A541-465A-B75B-B5BE4DF98CDB}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcdata\", \"libcdata\\libcdata.vcproj\", \"{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7} = {1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"libcsplit\", \"libcsplit\\libcsplit.vcproj\", \"{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A} = {4C79D798-FB54-4CD5-9067-9BDC8678478A}\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tVSDebug|Win32 = VSDebug|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{D46D1213-A541-465A-B75B-B5BE4DF98CDB}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{AD1E9BC6-39CA-4913-8C16-15AD16F1BA78}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{14362056-DE51-456D-A0BA-1D4C346D8DF5}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{14362056-DE51-456D-A0BA-1D4C346D8DF5}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{14362056-DE51-456D-A0BA-1D4C346D8DF5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{14362056-DE51-456D-A0BA-1D4C346D8DF5}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{9EE2BE40-B6A0-46C9-8AE9-B2B3DE079C44}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5AA63F16-3E2F-4570-B618-1940C0C0A9DD}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{9F4E16E9-E314-4807-B923-4E1B5DD97275}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{9F4E16E9-E314-4807-B923-4E1B5DD97275}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{9F4E16E9-E314-4807-B923-4E1B5DD97275}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{9F4E16E9-E314-4807-B923-4E1B5DD97275}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{1A1FAFF8-A1FE-4D75-BB39-3913E5ED5834}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{DB4FE956-0D15-47B3-89B4-2049D90A9FAC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{7075C461-7EE0-4BBB-BE45-4CA4D58CE945}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{8DC89DA4-6CA8-421D-989F-E2F3A7F220F1}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{86801698-77FD-435B-8E13-1648210DEB78}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{86801698-77FD-435B-8E13-1648210DEB78}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{86801698-77FD-435B-8E13-1648210DEB78}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{86801698-77FD-435B-8E13-1648210DEB78}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{927EAE6C-E105-4D54-9EB2-CEED9DF847EA}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{CF9B84E8-2B48-44DF-8669-EFC0E3449277}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{CF9B84E8-2B48-44DF-8669-EFC0E3449277}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{CF9B84E8-2B48-44DF-8669-EFC0E3449277}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{CF9B84E8-2B48-44DF-8669-EFC0E3449277}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{B54DE37F-756A-4AA6-B433-37EE73615DC8}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B54DE37F-756A-4AA6-B433-37EE73615DC8}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B54DE37F-756A-4AA6-B433-37EE73615DC8}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{B54DE37F-756A-4AA6-B433-37EE73615DC8}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{0D77DCAA-02A7-4D35-8823-96BA88A7B132}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{0D77DCAA-02A7-4D35-8823-96BA88A7B132}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{0D77DCAA-02A7-4D35-8823-96BA88A7B132}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{0D77DCAA-02A7-4D35-8823-96BA88A7B132}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5D487897-C716-451D-839D-F9822EF149F4}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5D487897-C716-451D-839D-F9822EF149F4}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5D487897-C716-451D-839D-F9822EF149F4}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5D487897-C716-451D-839D-F9822EF149F4}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{75B4E5D6-E008-4EE6-84A7-23A9F0C6F365}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{897B0517-4405-4BE7-960B-8FD8CFC1F632}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{897B0517-4405-4BE7-960B-8FD8CFC1F632}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{897B0517-4405-4BE7-960B-8FD8CFC1F632}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{897B0517-4405-4BE7-960B-8FD8CFC1F632}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{366722BE-D632-4011-A62D-21DA660F5266}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{366722BE-D632-4011-A62D-21DA660F5266}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{366722BE-D632-4011-A62D-21DA660F5266}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{366722BE-D632-4011-A62D-21DA660F5266}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5336D7B9-8E2D-4309-A78B-B82C5A9535B0}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{872A52AC-56B8-4A03-998A-E991ABBB16CD}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{872A52AC-56B8-4A03-998A-E991ABBB16CD}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{872A52AC-56B8-4A03-998A-E991ABBB16CD}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{872A52AC-56B8-4A03-998A-E991ABBB16CD}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{E70D7EBE-951C-4C94-845E-44766CED4367}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{E70D7EBE-951C-4C94-845E-44766CED4367}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{E70D7EBE-951C-4C94-845E-44766CED4367}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{E70D7EBE-951C-4C94-845E-44766CED4367}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{CEDB7153-D51D-4A20-B268-816AC7F79D85}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{CEDB7153-D51D-4A20-B268-816AC7F79D85}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{CEDB7153-D51D-4A20-B268-816AC7F79D85}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{CEDB7153-D51D-4A20-B268-816AC7F79D85}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{2DD0CA8E-CB50-4F0C-BAD1-67041D6912CC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{2BB976E5-C6A6-4EFA-9112-C11FB1088136}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{2BB976E5-C6A6-4EFA-9112-C11FB1088136}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{2BB976E5-C6A6-4EFA-9112-C11FB1088136}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{2BB976E5-C6A6-4EFA-9112-C11FB1088136}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{4E267E4B-4F7C-4031-B8A3-D023803D6822}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{4E267E4B-4F7C-4031-B8A3-D023803D6822}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{4E267E4B-4F7C-4031-B8A3-D023803D6822}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{4E267E4B-4F7C-4031-B8A3-D023803D6822}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{F09A00EE-2E4A-4E6A-90F4-9501DAAC5262}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{8D5F07FD-41A4-4755-8BEF-E56AAD7AFD64}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{BA6DC222-C14D-40D2-B2EF-A99EE46CF530}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5F5EFDC4-BB68-493C-B4CB-44C82892090C}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5F5EFDC4-BB68-493C-B4CB-44C82892090C}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5F5EFDC4-BB68-493C-B4CB-44C82892090C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5F5EFDC4-BB68-493C-B4CB-44C82892090C}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{D5B437A3-9C0B-433C-9BD6-0D3B1FA4EDDB}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{60828C47-8A89-42DA-98CB-6775272A2FDC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{60828C47-8A89-42DA-98CB-6775272A2FDC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{60828C47-8A89-42DA-98CB-6775272A2FDC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{60828C47-8A89-42DA-98CB-6775272A2FDC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{85D3991B-8695-4DC7-A7BB-E88EB1E150D1}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{83A76DAD-2982-4A72-84B8-A355112A4A23}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{83A76DAD-2982-4A72-84B8-A355112A4A23}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{83A76DAD-2982-4A72-84B8-A355112A4A23}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{83A76DAD-2982-4A72-84B8-A355112A4A23}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{E6F1AE28-F1A0-423C-8810-0B5051E27384}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{E6F1AE28-F1A0-423C-8810-0B5051E27384}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{E6F1AE28-F1A0-423C-8810-0B5051E27384}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{E6F1AE28-F1A0-423C-8810-0B5051E27384}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{A62A34CD-C110-49D8-A4D6-9047A82856CE}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{A62A34CD-C110-49D8-A4D6-9047A82856CE}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{A62A34CD-C110-49D8-A4D6-9047A82856CE}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{A62A34CD-C110-49D8-A4D6-9047A82856CE}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{B2142A8D-EB4B-40A7-9C59-472E5F4DF792}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{8C4AE295-DF4B-48D6-9297-C86AB0C80DE9}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{A3F12C14-08FF-412C-806B-8258A444B134}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{A3F12C14-08FF-412C-806B-8258A444B134}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{A3F12C14-08FF-412C-806B-8258A444B134}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{A3F12C14-08FF-412C-806B-8258A444B134}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{33B72873-D87D-480A-8371-3334AEE49B6C}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{33B72873-D87D-480A-8371-3334AEE49B6C}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{33B72873-D87D-480A-8371-3334AEE49B6C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{33B72873-D87D-480A-8371-3334AEE49B6C}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{160C2657-FEEE-45BC-959F-D68E6B07F619}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{160C2657-FEEE-45BC-959F-D68E6B07F619}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{160C2657-FEEE-45BC-959F-D68E6B07F619}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{160C2657-FEEE-45BC-959F-D68E6B07F619}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{4D7E70CE-57AD-430F-8387-BB518D767BD2}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{4D7E70CE-57AD-430F-8387-BB518D767BD2}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{4D7E70CE-57AD-430F-8387-BB518D767BD2}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{4D7E70CE-57AD-430F-8387-BB518D767BD2}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{59700D23-BA81-4639-8F02-3F609FAB22EF}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{59700D23-BA81-4639-8F02-3F609FAB22EF}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{59700D23-BA81-4639-8F02-3F609FAB22EF}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{59700D23-BA81-4639-8F02-3F609FAB22EF}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{66977E3C-C885-454C-B1D7-67A232096535}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{66977E3C-C885-454C-B1D7-67A232096535}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{66977E3C-C885-454C-B1D7-67A232096535}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{66977E3C-C885-454C-B1D7-67A232096535}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{69500ADF-371A-43DE-B73E-8A4CA34CB16C}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{69500ADF-371A-43DE-B73E-8A4CA34CB16C}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{69500ADF-371A-43DE-B73E-8A4CA34CB16C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{69500ADF-371A-43DE-B73E-8A4CA34CB16C}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{A6FA8C02-6C70-455E-9B1B-0A3315BCEEBE}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{3C380B85-EC36-457F-A07A-05C9B56AD5F6}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{3C380B85-EC36-457F-A07A-05C9B56AD5F6}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{3C380B85-EC36-457F-A07A-05C9B56AD5F6}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{3C380B85-EC36-457F-A07A-05C9B56AD5F6}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{38C14533-3620-463E-9476-CCB8D224DCF6}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{38C14533-3620-463E-9476-CCB8D224DCF6}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{38C14533-3620-463E-9476-CCB8D224DCF6}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{38C14533-3620-463E-9476-CCB8D224DCF6}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{DD6F6ABC-6000-41DA-AD17-15297A2A3E35}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{BEB36450-DEDD-4262-AC86-ACBE007581F6}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{BEB36450-DEDD-4262-AC86-ACBE007581F6}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{BEB36450-DEDD-4262-AC86-ACBE007581F6}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{BEB36450-DEDD-4262-AC86-ACBE007581F6}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{3B175834-2D21-4F9A-AB77-2BB94DAB3BEC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{D47D7B9A-C9B6-4F52-8B13-14E7FE90200E}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{0C5B426F-5F01-4A7F-8FE3-A372CE67F02A}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{AF956C6B-4E27-487E-B795-7F8503A4B5AB}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{AF956C6B-4E27-487E-B795-7F8503A4B5AB}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{AF956C6B-4E27-487E-B795-7F8503A4B5AB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{AF956C6B-4E27-487E-B795-7F8503A4B5AB}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{B6B3A52D-BD01-4831-8F40-080721E5F3B8}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B6B3A52D-BD01-4831-8F40-080721E5F3B8}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B6B3A52D-BD01-4831-8F40-080721E5F3B8}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{B6B3A52D-BD01-4831-8F40-080721E5F3B8}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{23AA7603-07B4-42EF-9535-8BA4C156504E}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{23AA7603-07B4-42EF-9535-8BA4C156504E}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{23AA7603-07B4-42EF-9535-8BA4C156504E}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{23AA7603-07B4-42EF-9535-8BA4C156504E}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{18FA643E-04FF-49E0-BAF4-EAFDA60A492E}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{A3CAA91B-F202-4B5E-B11B-367E05C097DC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{A3CAA91B-F202-4B5E-B11B-367E05C097DC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{A3CAA91B-F202-4B5E-B11B-367E05C097DC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{A3CAA91B-F202-4B5E-B11B-367E05C097DC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{92D81AA9-3090-4B66-966F-EE4CAA062A18}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{92D81AA9-3090-4B66-966F-EE4CAA062A18}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{92D81AA9-3090-4B66-966F-EE4CAA062A18}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{92D81AA9-3090-4B66-966F-EE4CAA062A18}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{9BA6CBAE-1B19-41BE-9E46-0824CCD932E3}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{60D0DC49-FB23-4356-B93B-3083D6C7870F}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{60D0DC49-FB23-4356-B93B-3083D6C7870F}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{60D0DC49-FB23-4356-B93B-3083D6C7870F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{60D0DC49-FB23-4356-B93B-3083D6C7870F}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{3F48737B-A8D7-418A-A448-40AFBAEA1733}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{3F48737B-A8D7-418A-A448-40AFBAEA1733}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{3F48737B-A8D7-418A-A448-40AFBAEA1733}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{3F48737B-A8D7-418A-A448-40AFBAEA1733}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{71D59C5D-6E61-4132-B33D-F52524422CB1}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{71D59C5D-6E61-4132-B33D-F52524422CB1}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{71D59C5D-6E61-4132-B33D-F52524422CB1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{71D59C5D-6E61-4132-B33D-F52524422CB1}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{DCDE74CC-6ABD-4F0B-9289-C4B19ADA76E4}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{DC6AD8F6-542A-48AC-8960-E62927C907FB}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{DC6AD8F6-542A-48AC-8960-E62927C907FB}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{DC6AD8F6-542A-48AC-8960-E62927C907FB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{DC6AD8F6-542A-48AC-8960-E62927C907FB}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{1AFF43D1-88C8-44B6-A391-3CAA10B9E9CC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{F2BB99F7-6BAB-4DC2-AF69-FCA14F085A9F}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{B15D7487-46E8-4134-B095-DC601DD7F6C5}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B15D7487-46E8-4134-B095-DC601DD7F6C5}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B15D7487-46E8-4134-B095-DC601DD7F6C5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{B15D7487-46E8-4134-B095-DC601DD7F6C5}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{568C781B-991A-4713-B035-C15BA84C13D1}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{568C781B-991A-4713-B035-C15BA84C13D1}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{568C781B-991A-4713-B035-C15BA84C13D1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{568C781B-991A-4713-B035-C15BA84C13D1}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{6F12D839-A7B1-4BEB-B249-B48BD7D374C7}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{04F1B6AF-0358-4FD2-88F9-E609356E7097}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{04F1B6AF-0358-4FD2-88F9-E609356E7097}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{04F1B6AF-0358-4FD2-88F9-E609356E7097}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{04F1B6AF-0358-4FD2-88F9-E609356E7097}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{C5627F45-9745-4015-9E82-4CC28EE7278B}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{C5627F45-9745-4015-9E82-4CC28EE7278B}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{C5627F45-9745-4015-9E82-4CC28EE7278B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{C5627F45-9745-4015-9E82-4CC28EE7278B}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{3992C7C8-F4C6-4BAD-96FA-ED93C00BE24A}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{F0DFA3BB-B24D-4B3C-B3C2-9FB961D96395}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{B3CAA0DA-B778-4B69-8537-3AF7F9984F51}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{856D95C9-F063-4613-B8E2-ECB6FC9AB6D3}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{48BE6463-9726-40DA-AF2A-7F9E590C4B20}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{48BE6463-9726-40DA-AF2A-7F9E590C4B20}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{48BE6463-9726-40DA-AF2A-7F9E590C4B20}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{48BE6463-9726-40DA-AF2A-7F9E590C4B20}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{D1CA56F0-00C0-4E8C-BD6F-8A15619A954D}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{A95C47C2-8CFA-4BBB-BD66-3B198323B409}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{9DEDE9E5-79D9-41BF-B0E7-92F61D394BE2}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{1860A9F0-4E82-4808-B6F0-59625D118021}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{1EF7B932-7B1D-49DA-8D58-E9CF0101C1F7}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5C1834B6-0BA9-4541-8770-D65A78F33958}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{6BA13A4B-8361-474A-8055-3A9F2437C3AC}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{4C79D798-FB54-4CD5-9067-9BDC8678478A}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{5641B37B-7AE7-450A-A433-7B83C73BC878}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{D9725AED-6124-4225-AC2B-306A97F90607}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{F42C141B-BECB-4F9C-828B-8BA0DB2BF7E5}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}.VSDebug|Win32.ActiveCfg = VSDebug|Win32\r\n\t\t{9D9A7FB3-B049-4E4C-835A-D2516DC2F076}.VSDebug|Win32.Build.0 = VSDebug|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "msvscpp/libfusn/libfusn.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfusn\"\r\n\tProjectGUID=\"{CEE2C1FC-7AB1-4833-8AFC-8E0AD60CDCC9}\"\r\n\tRootNamespace=\"libfusn\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcnotify;..\\..\\libuna;..\\..\\libfdatetime\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFUSN\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcnotify;..\\..\\libuna;..\\..\\libfdatetime\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFUSN\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_debug.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_record.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\fusn_record.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_debug.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_libfdatetime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_record.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfusn\\libfusn_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libfwnt/libfwnt.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libfwnt\"\r\n\tProjectGUID=\"{1860A9F0-4E82-4808-B6F0-59625D118021}\"\r\n\tRootNamespace=\"libfwnt\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libcnotify\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcthreads;..\\..\\libcdata;..\\..\\libcnotify\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_access_control_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_access_control_list.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_bit_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_debug.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_huffman_tree.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_locale_identifier.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lznt1.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lzx.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lzxpress.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_notify.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_security_descriptor.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_security_identifier.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_access_control_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_access_control_list.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_bit_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_debug.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_huffman_tree.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_libcdata.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_libcnotify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_locale_identifier.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lznt1.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lzx.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_lzxpress.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_notify.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_security_descriptor.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_security_identifier.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libfwnt\\libfwnt_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libhmac/libhmac.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libhmac\"\r\n\tProjectGUID=\"{6BA13A4B-8361-474A-8055-3A9F2437C3AC}\"\r\n\tRootNamespace=\"libhmac\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBHMAC\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBHMAC\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_md5.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_md5_context.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha1.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha1_context.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha224.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha224_context.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha256.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha256_context.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha512.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha512_context.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_byte_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_md5.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_md5_context.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha1.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha1_context.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha224.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha224_context.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha256.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha256_context.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha512.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_sha512_context.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libhmac\\libhmac_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/libuna/libuna.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"libuna\"\r\n\tProjectGUID=\"{8447CA5B-9D12-4DF0-B225-A25F4B288D2D}\"\r\n\tRootNamespace=\"libuna\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t\tModuleDefinitionFile=\"\"\r\n\t\t\t\tIgnoreAllDefaultLibraries=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base16_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base32_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base64_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_byte_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_10.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_13.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_14.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_15.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_16.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_2.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_3.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_4.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_5.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_6.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_7.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_8.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_9.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_koi8_r.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_koi8_u.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_arabic.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_celtic.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_centraleurroman.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_croatian.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_cyrillic.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_dingbats.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_farsi.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_gaelic.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_greek.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_icelandic.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_inuit.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_roman.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_romanian.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_russian.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_symbol.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_thai.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_turkish.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_ukrainian.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1250.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1251.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1252.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1253.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1254.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1255.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1256.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1257.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1258.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_874.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_932.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_936.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_949.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_950.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_scsu.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_support.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_unicode_character.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_url_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf16_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf16_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf32_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf32_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf7_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf8_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf8_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base16_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base32_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_base64_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_byte_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_10.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_13.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_14.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_15.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_16.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_2.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_3.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_4.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_5.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_6.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_7.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_8.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_iso_8859_9.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_koi8_r.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_koi8_u.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_arabic.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_celtic.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_centraleurroman.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_croatian.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_cyrillic.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_dingbats.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_farsi.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_gaelic.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_greek.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_icelandic.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_inuit.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_roman.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_romanian.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_russian.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_symbol.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_thai.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_turkish.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_mac_ukrainian.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1250.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1251.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1252.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1253.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1254.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1255.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1256.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1257.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_1258.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_874.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_932.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_936.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_949.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_codepage_windows_950.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_definitions.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_extern.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_scsu.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_support.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_unicode_character.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_url_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf16_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf16_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf32_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf32_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf7_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf8_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\libuna\\libuna_utf8_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "msvscpp/pyfsntfs/pyfsntfs.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9,00\"\r\n\tName=\"pyfsntfs\"\r\n\tProjectGUID=\"{7EC7E241-8C9E-40DC-8BF5-78FC90CEA990}\"\r\n\tRootNamespace=\"pyfsntfs\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfguid;C:\\Python27\\include\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_PYCONFIG_H;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFGUID;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).pyd\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;;C:\\Python27\\libs\"\r\n\t\t\t\tRandomizedBaseAddress=\"2\"\r\n\t\t\t\tDataExecutionPrevention=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t\tImportLibrary=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"VSDebug|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\include;..\\..\\common;..\\..\\libcerror;..\\..\\libcdata;..\\..\\libclocale;..\\..\\libcsplit;..\\..\\libuna;..\\..\\libcfile;..\\..\\libcpath;..\\..\\libbfio;..\\..\\libfguid;C:\\Python27\\include\"\r\n\t\t\t\tPreprocessorDefinitions=\"_CRT_SECURE_NO_DEPRECATE;HAVE_PYCONFIG_H;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFGUID;LIBFSNTFS_DLL_IMPORT\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tSmallerTypeCheck=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tWarningLevel=\"4\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t\tCompileAs=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)\\$(ProjectName).pyd\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"&quot;$(OutDir)&quot;;C:\\Python27\\libs\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t\tImportLibrary=\"$(OutDir)\\$(ProjectName).lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attribute_types.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attributes.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_data_stream.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_data_streams.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_datetime.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_error.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_attribute_flags.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_entries.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_entry.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_object_io_handle.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_guid.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_integer.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_mft_metadata_file.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_mft_metadata_file_entries.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_object_identifier_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_reparse_point_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_security_descriptor_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_standard_information_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_string.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_usn_change_journal.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_file_entries.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_information_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_name_attribute.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attribute_types.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_attributes.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_data_stream.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_data_streams.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_datetime.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_error.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_attribute_flags.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_entries.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_entry.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_name_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_file_object_io_handle.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_guid.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_integer.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libbfio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libcerror.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libclocale.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libfguid.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libfsntfs.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_libuna.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_mft_metadata_file.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_mft_metadata_file_entries.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_object_identifier_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_python.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_reparse_point_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_security_descriptor_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_standard_information_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_string.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_unused.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_usn_change_journal.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_file_entries.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_information_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\pyfsntfs\\pyfsntfs_volume_name_attribute.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "ossfuzz/Makefile.am",
    "content": "if HAVE_LIB_FUZZING_ENGINE\nAM_CPPFLAGS = \\\n\t-I../include -I$(top_srcdir)/include \\\n\t-I../common -I$(top_srcdir)/common \\\n\t@LIBCERROR_CPPFLAGS@ \\\n\t@LIBCDATA_CPPFLAGS@ \\\n\t@LIBCLOCALE_CPPFLAGS@ \\\n\t@LIBCNOTIFY_CPPFLAGS@ \\\n\t@LIBUNA_CPPFLAGS@ \\\n\t@LIBCFILE_CPPFLAGS@ \\\n\t@LIBCPATH_CPPFLAGS@ \\\n\t@LIBBFIO_CPPFLAGS@\n\nbin_PROGRAMS = \\\n\tfile_entry_fuzzer \\\n\tmft_metadata_file_fuzzer \\\n\tvolume_fuzzer\n\nfile_entry_fuzzer_SOURCES = \\\n\tossfuzz_libbfio.h \\\n\tossfuzz_libfsntfs.h \\\n\tfile_entry_fuzzer.cc\n\nfile_entry_fuzzer_LDADD = \\\n\t@LIB_FUZZING_ENGINE@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBINTL@\n\nmft_metadata_file_fuzzer_SOURCES = \\\n\tmft_metadata_file_fuzzer.cc \\\n\tossfuzz_libbfio.h \\\n\tossfuzz_libfsntfs.h\n\nmft_metadata_file_fuzzer_LDADD = \\\n\t@LIB_FUZZING_ENGINE@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBINTL@\n\nvolume_fuzzer_SOURCES = \\\n\tossfuzz_libbfio.h \\\n\tossfuzz_libfsntfs.h \\\n\tvolume_fuzzer.cc\n\nvolume_fuzzer_LDADD = \\\n\t@LIB_FUZZING_ENGINE@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCERROR_LIBADD@ \\\n\t@LIBINTL@\nendif\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in\n\nsplint-local:\n\t@echo \"Running splint on file_entry_fuzzer ...\"\n\t-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_entry_fuzzer_SOURCES)\n\t@echo \"Running splint on mft_metadata_file_fuzzer ...\"\n\t-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(mft_metadata_file_fuzzer_SOURCES)\n\t@echo \"Running splint on volume_fuzzer ...\"\n\t-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(volume_fuzzer_SOURCES)\n\n"
  },
  {
    "path": "ossfuzz/file_entry_fuzzer.cc",
    "content": "/*\n * OSS-Fuzz target for libfsntfs file_entry type\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <stddef.h>\n#include <stdint.h>\n\n/* Note that some of the OSS-Fuzz engines use C++\n */\nextern \"C\" {\n\n#include \"ossfuzz_libbfio.h\"\n#include \"ossfuzz_libfsntfs.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Opens a volume using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\nint LLVMFuzzerTestOneInput(\n     const uint8_t *data,\n     size_t size )\n{\n\tlibbfio_handle_t *file_io_handle       = NULL;\n\tlibfsntfs_file_entry_t *root_directory = NULL;\n\tlibfsntfs_file_entry_t *sub_file_entry = NULL;\n\tlibfsntfs_volume_t *volume             = NULL;\n\tint number_of_sub_file_entries         = 0;\n\n\tif( libbfio_memory_range_initialize(\n\t     &file_io_handle,\n\t     NULL ) != 1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libbfio_memory_range_set(\n\t     file_io_handle,\n\t     (uint8_t *) data,\n\t     size,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_volume_initialize(\n\t     &volume,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_volume_open_file_io_handle(\n\t     volume,\n\t     file_io_handle,\n\t     LIBFSNTFS_OPEN_READ,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libfsntfs_volume;\n\t}\n\tif( libfsntfs_volume_get_root_directory(\n\t     volume,\n\t     &root_directory,\n\t     NULL ) == 1 )\n\t{\n\t\tif( libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t\t     root_directory,\n\t\t     &number_of_sub_file_entries,\n\t\t     NULL ) != 1 )\n\t\t{\n\t\t\tgoto on_error_libfsntfs_root_directory;\n\t\t}\n\t\tif( number_of_sub_file_entries > 0 )\n\t\t{\n\t\t\tif( libfsntfs_file_entry_get_sub_file_entry_by_index(\n\t\t\t     root_directory,\n\t\t\t     0,\n\t\t\t     &sub_file_entry,\n\t\t\t     NULL ) != 1 )\n\t\t\t{\n\t\t\t\tgoto on_error_libfsntfs_root_directory;\n\t\t\t}\n\t\t\tlibfsntfs_file_entry_free(\n\t\t\t &sub_file_entry,\n\t\t\t NULL );\n\t\t}\non_error_libfsntfs_root_directory:\n\t\tlibfsntfs_file_entry_free(\n\t\t &root_directory,\n\t\t NULL );\n\t}\n\tlibfsntfs_volume_close(\n\t volume,\n\t NULL );\n\non_error_libfsntfs_volume:\n\tlibfsntfs_volume_free(\n\t &volume,\n\t NULL );\n\non_error_libbfio:\n\tlibbfio_handle_free(\n\t &file_io_handle,\n\t NULL );\n\n\treturn( 0 );\n}\n\n} /* extern \"C\" */\n\n"
  },
  {
    "path": "ossfuzz/mft_metadata_file_fuzzer.cc",
    "content": "/*\n * OSS-Fuzz target for libfsntfs MFT metadata file type\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <stddef.h>\n#include <stdint.h>\n\n/* Note that some of the OSS-Fuzz engines use C++\n */\nextern \"C\" {\n\n#include \"ossfuzz_libbfio.h\"\n#include \"ossfuzz_libfsntfs.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Opens a MFT metadata file using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\nint LLVMFuzzerTestOneInput(\n     const uint8_t *data,\n     size_t size )\n{\n\tlibbfio_handle_t *file_io_handle                 = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\n\tif( libbfio_memory_range_initialize(\n\t     &file_io_handle,\n\t     NULL ) != 1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libbfio_memory_range_set(\n\t     file_io_handle,\n\t     (uint8_t *) data,\n\t     size,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_mft_metadata_file_initialize(\n\t     &mft_metadata_file,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_mft_metadata_file_open_file_io_handle(\n\t     mft_metadata_file,\n\t     file_io_handle,\n\t     LIBFSNTFS_OPEN_READ,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libfsntfs;\n\t}\n\tlibfsntfs_mft_metadata_file_close(\n\t mft_metadata_file,\n\t NULL );\n\non_error_libfsntfs:\n\tlibfsntfs_mft_metadata_file_free(\n\t &mft_metadata_file,\n\t NULL );\n\non_error_libbfio:\n\tlibbfio_handle_free(\n\t &file_io_handle,\n\t NULL );\n\n\treturn( 0 );\n}\n\n} /* extern \"C\" */\n\n"
  },
  {
    "path": "ossfuzz/ossfuzz_libbfio.h",
    "content": "/*\n * The libbfio header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _OSSFUZZ_LIBBFIO_H )\n#define _OSSFUZZ_LIBBFIO_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBBFIO for local use of libbfio\n */\n#if defined( HAVE_LOCAL_LIBBFIO )\n\n#include <libbfio_definitions.h>\n#include <libbfio_file.h>\n#include <libbfio_file_pool.h>\n#include <libbfio_file_range.h>\n#include <libbfio_handle.h>\n#include <libbfio_memory_range.h>\n#include <libbfio_pool.h>\n#include <libbfio_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT\n * before including libbfio.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )\n#define LIBBFIO_DLL_IMPORT\n#endif\n\n#include <libbfio.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT )\n#error Multi-threading support requires libbfio with multi-threading support\n#endif\n\n#endif /* defined( HAVE_LOCAL_LIBBFIO ) */\n\n#endif /* !defined( _OSSFUZZ_LIBBFIO_H ) */\n\n"
  },
  {
    "path": "ossfuzz/ossfuzz_libfsntfs.h",
    "content": "/*\n * The libfsntfs header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _OSSFUZZ_LIBFSNTFS_H )\n#define _OSSFUZZ_LIBFSNTFS_H\n\n#include <common.h>\n\n#include <libfsntfs.h>\n\n#endif /* !defined( _OSSFUZZ_LIBFSNTFS_H ) */\n\n"
  },
  {
    "path": "ossfuzz/volume_fuzzer.cc",
    "content": "/*\n * OSS-Fuzz target for libfsntfs volume type\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <stddef.h>\n#include <stdint.h>\n\n/* Note that some of the OSS-Fuzz engines use C++\n */\nextern \"C\" {\n\n#include \"ossfuzz_libbfio.h\"\n#include \"ossfuzz_libfsntfs.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\n/* Opens a volume using a Basic File IO (bfio) handle\n * Returns 1 if successful or -1 on error\n */\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\nint LLVMFuzzerTestOneInput(\n     const uint8_t *data,\n     size_t size )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibfsntfs_volume_t *volume       = NULL;\n\n\tif( libbfio_memory_range_initialize(\n\t     &file_io_handle,\n\t     NULL ) != 1 )\n\t{\n\t\treturn( 0 );\n\t}\n\tif( libbfio_memory_range_set(\n\t     file_io_handle,\n\t     (uint8_t *) data,\n\t     size,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_volume_initialize(\n\t     &volume,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libbfio;\n\t}\n\tif( libfsntfs_volume_open_file_io_handle(\n\t     volume,\n\t     file_io_handle,\n\t     LIBFSNTFS_OPEN_READ,\n\t     NULL ) != 1 )\n\t{\n\t\tgoto on_error_libfsntfs;\n\t}\n\tlibfsntfs_volume_close(\n\t volume,\n\t NULL );\n\non_error_libfsntfs:\n\tlibfsntfs_volume_free(\n\t &volume,\n\t NULL );\n\non_error_libbfio:\n\tlibbfio_handle_free(\n\t &file_io_handle,\n\t NULL );\n\n\treturn( 0 );\n}\n\n} /* extern \"C\" */\n\n"
  },
  {
    "path": "po/ChangeLog",
    "content": "2016-11-09  gettextize  <bug-gnu-gettext@gnu.org>\n"
  },
  {
    "path": "po/Makevars.in",
    "content": "# Makefile variables for PO directory in any package using GNU gettext.\n\n# Usually the message domain is the same as the package name.\nDOMAIN = @PACKAGE@\n\n# These two variables depend on the location of this directory.\nsubdir = po\ntop_builddir = ..\n\n# These options get passed to xgettext.\nXGETTEXT_OPTIONS = --keyword=_ --keyword=N_\n\n# This is the copyright holder that gets inserted into the header of the\n# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding\n# package.  (Note that the msgstr strings, extracted from the package's\n# sources, belong to the copyright holder of the package.)  Translators are\n# expected to transfer the copyright for their translations to this person\n# or entity, or to disclaim their copyright.  The empty string stands for\n# the public domain; in this case the translators are expected to disclaim\n# their copyright.\nCOPYRIGHT_HOLDER = Joachim Metz\n\n# This is the email address or URL to which the translators shall report\n# bugs in the untranslated strings:\n# - Strings which are not entire sentences, see the maintainer guidelines\n#   in the GNU gettext documentation, section 'Preparing Strings'.\n# - Strings which use unclear terms or require additional context to be\n#   understood.\n# - Strings which make invalid assumptions about notation of date, time or\n#   money.\n# - Pluralisation problems.\n# - Incorrect English spelling.\n# - Incorrect formatting.\n# It can be your email address, or a mailing list address where translators\n# can write to without being subscribed, or the URL of a web page through\n# which the translators can contact you.\nMSGID_BUGS_ADDRESS = @PACKAGE_BUGREPORT@\n\n# This is the list of locale categories, beyond LC_MESSAGES, for which the\n# message catalogs shall be used.  It is usually empty.\nEXTRA_LOCALE_CATEGORIES =\n\n# Additional make targets.\nsources splint:\n\n"
  },
  {
    "path": "po/POTFILES.in",
    "content": "# List of source files which contain translatable strings.\n"
  },
  {
    "path": "pyfsntfs/Makefile.am",
    "content": "if HAVE_PYTHON\nAM_CFLAGS = \\\n\t-I../include -I$(top_srcdir)/include \\\n\t-I../common -I$(top_srcdir)/common \\\n\t@LIBCERROR_CPPFLAGS@ \\\n\t@LIBCDATA_CPPFLAGS@ \\\n\t@LIBCLOCALE_CPPFLAGS@ \\\n\t@LIBCSPLIT_CPPFLAGS@ \\\n\t@LIBUNA_CPPFLAGS@ \\\n\t@LIBCFILE_CPPFLAGS@ \\\n\t@LIBCPATH_CPPFLAGS@ \\\n\t@LIBBFIO_CPPFLAGS@ \\\n\t@LIBFGUID_CPPFLAGS@ \\\n\t@LIBFSNTFS_DLL_IMPORT@\n\npyexec_LTLIBRARIES = pyfsntfs.la\n\npyfsntfs_la_SOURCES = \\\n\tpyfsntfs.c pyfsntfs.h \\\n\tpyfsntfs_attribute.c pyfsntfs_attribute.h \\\n\tpyfsntfs_attribute_types.c pyfsntfs_attribute_types.h \\\n\tpyfsntfs_attributes.c pyfsntfs_attributes.h \\\n\tpyfsntfs_data_stream.c pyfsntfs_data_stream.h \\\n\tpyfsntfs_data_streams.c pyfsntfs_data_streams.h \\\n\tpyfsntfs_datetime.c pyfsntfs_datetime.h \\\n\tpyfsntfs_error.c pyfsntfs_error.h \\\n\tpyfsntfs_file_attribute_flags.c pyfsntfs_file_attribute_flags.h \\\n\tpyfsntfs_file_entries.c pyfsntfs_file_entries.h \\\n\tpyfsntfs_file_entry.c pyfsntfs_file_entry.h \\\n\tpyfsntfs_file_name_attribute.c pyfsntfs_file_name_attribute.h \\\n\tpyfsntfs_file_object_io_handle.c pyfsntfs_file_object_io_handle.h \\\n\tpyfsntfs_guid.c pyfsntfs_guid.h \\\n\tpyfsntfs_integer.c pyfsntfs_integer.h \\\n\tpyfsntfs_libbfio.h \\\n\tpyfsntfs_libcerror.h \\\n\tpyfsntfs_libclocale.h \\\n\tpyfsntfs_libfguid.h \\\n\tpyfsntfs_libfsntfs.h \\\n\tpyfsntfs_libuna.h \\\n\tpyfsntfs_mft_metadata_file.c pyfsntfs_mft_metadata_file.h \\\n\tpyfsntfs_mft_metadata_file_entries.c pyfsntfs_mft_metadata_file_entries.h \\\n\tpyfsntfs_object_identifier_attribute.c pyfsntfs_object_identifier_attribute.h \\\n\tpyfsntfs_python.h \\\n\tpyfsntfs_reparse_point_attribute.c pyfsntfs_reparse_point_attribute.h \\\n\tpyfsntfs_security_descriptor_attribute.c pyfsntfs_security_descriptor_attribute.h \\\n\tpyfsntfs_standard_information_attribute.c pyfsntfs_standard_information_attribute.h \\\n\tpyfsntfs_string.c pyfsntfs_string.h \\\n\tpyfsntfs_usn_change_journal.c pyfsntfs_usn_change_journal.h \\\n\tpyfsntfs_unused.h \\\n\tpyfsntfs_volume.c pyfsntfs_volume.h \\\n\tpyfsntfs_volume_file_entries.c pyfsntfs_volume_file_entries.h \\\n\tpyfsntfs_volume_information_attribute.c pyfsntfs_volume_information_attribute.h \\\n\tpyfsntfs_volume_name_attribute.c pyfsntfs_volume_name_attribute.h\n\npyfsntfs_la_LIBADD = \\\n\t@LIBCERROR_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCDATA_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBFGUID_LIBADD@\n\npyfsntfs_la_CPPFLAGS = $(PYTHON_CPPFLAGS)\npyfsntfs_la_LDFLAGS  = -module -avoid-version $(PYTHON_LDFLAGS)\n\nendif\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs.c",
    "content": "/*\n * Python bindings module for libfsntfs (pyfsntfs)\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs.h\"\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_attribute_types.h\"\n#include \"pyfsntfs_attributes.h\"\n#include \"pyfsntfs_data_stream.h\"\n#include \"pyfsntfs_data_streams.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_attribute_flags.h\"\n#include \"pyfsntfs_file_entries.h\"\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_file_name_attribute.h\"\n#include \"pyfsntfs_file_object_io_handle.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_mft_metadata_file.h\"\n#include \"pyfsntfs_mft_metadata_file_entries.h\"\n#include \"pyfsntfs_object_identifier_attribute.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_reparse_point_attribute.h\"\n#include \"pyfsntfs_security_descriptor_attribute.h\"\n#include \"pyfsntfs_standard_information_attribute.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_usn_change_journal.h\"\n#include \"pyfsntfs_volume.h\"\n#include \"pyfsntfs_volume_file_entries.h\"\n#include \"pyfsntfs_volume_information_attribute.h\"\n#include \"pyfsntfs_volume_name_attribute.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* The pyfsntfs module methods\n */\nPyMethodDef pyfsntfs_module_methods[] = {\n\t{ \"get_version\",\n\t  (PyCFunction) pyfsntfs_get_version,\n\t  METH_NOARGS,\n\t  \"get_version() -> String\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the version.\" },\n\n\t{ \"check_volume_signature\",\n\t  (PyCFunction) pyfsntfs_check_volume_signature,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"check_volume_signature(filename) -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Checks if a volume has a Windows New Technology File System (NTFS) volume signature.\" },\n\n\t{ \"check_volume_signature_file_object\",\n\t  (PyCFunction) pyfsntfs_check_volume_signature_file_object,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"check_volume_signature_file_object(file_object) -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Checks if a volume has a Windows New Technology File System (NTFS) volume signature using a file-like object.\" },\n\n\t{ \"open\",\n\t  (PyCFunction) pyfsntfs_open_new_volume,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open(filename, mode='r') -> Object\\n\"\n\t  \"\\n\"\n\t  \"Opens a volume.\" },\n\n\t{ \"open_file_object\",\n\t  (PyCFunction) pyfsntfs_open_new_volume_with_file_object,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open_file_object(file_object, mode='r') -> Object\\n\"\n\t  \"\\n\"\n\t  \"Opens a volume using a file-like object.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\n/* Retrieves the pyfsntfs/libfsntfs version\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_get_version(\n           PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tconst char *version_string   = NULL;\n\tsize_t version_string_length = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( self )\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tPy_BEGIN_ALLOW_THREADS\n\n\tversion_string = libfsntfs_get_version();\n\n\tPy_END_ALLOW_THREADS\n\n\tversion_string_length = narrow_string_length(\n\t                         version_string );\n\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\treturn( PyUnicode_DecodeUTF8(\n\t         version_string,\n\t         (Py_ssize_t) version_string_length,\n\t         NULL ) );\n}\n\n/* Checks if a volume has a Windows New Technology File System (NTFS) volume signature\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_check_volume_signature(\n           PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *string_object      = NULL;\n\tlibcerror_error_t *error     = NULL;\n\tconst char *filename_narrow  = NULL;\n\tstatic char *function        = \"pyfsntfs_check_volume_signature\";\n\tstatic char *keyword_list[]  = { \"filename\", NULL };\n\tint result                   = 0;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tconst wchar_t *filename_wide = NULL;\n#else\n\tPyObject *utf8_string_object = NULL;\n#endif\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( self )\n\n\t/* Note that PyArg_ParseTupleAndKeywords with \"s\" will force Unicode strings to be converted to narrow character string.\n\t * On Windows the narrow character strings contains an extended ASCII string with a codepage. Hence we get a conversion\n\t * exception. This will also fail if the default encoding is not set correctly. We cannot use \"u\" here either since that\n\t * does not allow us to pass non Unicode string objects and Python (at least 2.7) does not seems to automatically upcast them.\n\t */\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O|\",\n\t     keyword_list,\n\t     &string_object ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyUnicode_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type Unicode.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsWideCharString(\n\t\t                             string_object,\n\t\t                             NULL );\n#else\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsUnicode(\n\t\t                             string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_check_volume_signature_wide(\n\t\t          filename_wide,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tPyMem_Free(\n\t\t filename_wide );\n#endif\n#else\n\t\tutf8_string_object = PyUnicode_AsUTF8String(\n\t\t                      string_object );\n\n\t\tif( utf8_string_object == NULL )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to convert Unicode string to UTF-8.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t                   utf8_string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t                   utf8_string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_check_volume_signature(\n\t\t          filename_narrow,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to check volume signature.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tif( result != 0 )\n\t\t{\n\t\t\tPy_IncRef(\n\t\t\t (PyObject *) Py_True );\n\n\t\t\treturn( Py_True );\n\t\t}\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_False );\n\n\t\treturn( Py_False );\n\t}\n\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyBytes_Type );\n#else\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyString_Type );\n#endif\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type string.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t                   string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t                   string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_check_volume_signature(\n\t\t          filename_narrow,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to check volume signature.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tif( result != 0 )\n\t\t{\n\t\t\tPy_IncRef(\n\t\t\t (PyObject *) Py_True );\n\n\t\t\treturn( Py_True );\n\t\t}\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_False );\n\n\t\treturn( Py_False );\n\t}\n\tPyErr_Format(\n\t PyExc_TypeError,\n\t \"%s: unsupported string object type.\",\n\t function );\n\n\treturn( NULL );\n}\n\n/* Checks if a volume has a Windows New Technology File System (NTFS) volume signature using a file-like object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_check_volume_signature_file_object(\n           PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_object            = NULL;\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tstatic char *function            = \"pyfsntfs_check_volume_signature_file_object\";\n\tstatic char *keyword_list[]      = { \"file_object\", NULL };\n\tint result                       = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( self )\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"|O\",\n\t     keyword_list,\n\t     &file_object ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_file_object_initialize(\n\t     &file_io_handle,\n\t     file_object,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize file IO handle.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          file_io_handle,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to check volume signature.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_free(\n\t     &file_io_handle,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tif( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n\non_error:\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Creates a new volume object and opens it\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_open_new_volume(\n           PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tpyfsntfs_volume_t *pyfsntfs_volume = NULL;\n\tstatic char *function              = \"pyfsntfs_open_new_volume\";\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( self )\n\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_volume = PyObject_New(\n\t                   struct pyfsntfs_volume,\n\t                   &pyfsntfs_volume_type_object );\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_volume_init(\n\t     pyfsntfs_volume ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_volume_open(\n\t     pyfsntfs_volume,\n\t     arguments,\n\t     keywords ) == NULL )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( (PyObject *) pyfsntfs_volume );\n\non_error:\n\tif( pyfsntfs_volume != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_volume );\n\t}\n\treturn( NULL );\n}\n\n/* Creates a new volume object and opens it using a file-like object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_open_new_volume_with_file_object(\n           PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tpyfsntfs_volume_t *pyfsntfs_volume = NULL;\n\tstatic char *function              = \"pyfsntfs_open_new_volume_with_file_object\";\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( self )\n\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_volume = PyObject_New(\n\t                   struct pyfsntfs_volume,\n\t                   &pyfsntfs_volume_type_object );\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_volume_init(\n\t     pyfsntfs_volume ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_volume_open_file_object(\n\t     pyfsntfs_volume,\n\t     arguments,\n\t     keywords ) == NULL )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( (PyObject *) pyfsntfs_volume );\n\non_error:\n\tif( pyfsntfs_volume != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_volume );\n\t}\n\treturn( NULL );\n}\n\n#if PY_MAJOR_VERSION >= 3\n\n/* The pyfsntfs module definition\n */\nPyModuleDef pyfsntfs_module_definition = {\n\tPyModuleDef_HEAD_INIT,\n\n\t/* m_name */\n\t\"pyfsntfs\",\n\t/* m_doc */\n\t\"Python libfsntfs module (pyfsntfs).\",\n\t/* m_size */\n\t-1,\n\t/* m_methods */\n\tpyfsntfs_module_methods,\n\t/* m_reload */\n\tNULL,\n\t/* m_traverse */\n\tNULL,\n\t/* m_clear */\n\tNULL,\n\t/* m_free */\n\tNULL,\n};\n\n#endif /* PY_MAJOR_VERSION >= 3 */\n\n/* Initializes the pyfsntfs module\n */\n#if PY_MAJOR_VERSION >= 3\nPyMODINIT_FUNC PyInit_pyfsntfs(\n                void )\n#else\nPyMODINIT_FUNC initpyfsntfs(\n                void )\n#endif\n{\n\tPyObject *module           = NULL;\n\tPyGILState_STATE gil_state = 0;\n\n#if defined( HAVE_DEBUG_OUTPUT )\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n#endif\n\n\t/* Create the module\n\t * This function must be called before grabbing the GIL\n\t * otherwise the module will segfault on a version mismatch\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tmodule = PyModule_Create(\n\t          &pyfsntfs_module_definition );\n#else\n\tmodule = Py_InitModule3(\n\t          \"pyfsntfs\",\n\t          pyfsntfs_module_methods,\n\t          \"Python libfsntfs module (pyfsntfs).\" );\n#endif\n\tif( module == NULL )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\treturn( NULL );\n#else\n\t\treturn;\n#endif\n\t}\n#if PY_VERSION_HEX < 0x03070000\n\tPyEval_InitThreads();\n#endif\n\tgil_state = PyGILState_Ensure();\n\n\t/* Setup the attribute type object\n\t */\n\tpyfsntfs_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the attribute types type object\n\t */\n\tpyfsntfs_attribute_types_type_object.tp_new = PyType_GenericNew;\n\n\tif( pyfsntfs_attribute_types_init_type(\n\t     &pyfsntfs_attribute_types_type_object ) != 1 )\n\t{\n\t\tgoto on_error;\n\t}\n\tif( PyType_Ready(\n\t     &pyfsntfs_attribute_types_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_attribute_types_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"attribute_types\",\n\t (PyObject *) &pyfsntfs_attribute_types_type_object );\n\n\t/* Setup the attributes type object\n\t */\n\tpyfsntfs_attributes_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_attributes_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_attributes_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"attributes\",\n\t (PyObject *) &pyfsntfs_attributes_type_object );\n\n\t/* Setup the data stream type object\n\t */\n\tpyfsntfs_data_stream_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_data_stream_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_data_stream_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"data_stream\",\n\t (PyObject *) &pyfsntfs_data_stream_type_object );\n\n\t/* Setup the data streams type object\n\t */\n\tpyfsntfs_data_streams_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_data_streams_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_data_streams_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"data_streams\",\n\t (PyObject *) &pyfsntfs_data_streams_type_object );\n\n\t/* Setup the file attribute flags type object\n\t */\n\tpyfsntfs_file_attribute_flags_type_object.tp_new = PyType_GenericNew;\n\n\tif( pyfsntfs_file_attribute_flags_init_type(\n\t     &pyfsntfs_file_attribute_flags_type_object ) != 1 )\n\t{\n\t\tgoto on_error;\n\t}\n\tif( PyType_Ready(\n\t     &pyfsntfs_file_attribute_flags_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_file_attribute_flags_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"file_attribute_flags\",\n\t (PyObject *) &pyfsntfs_file_attribute_flags_type_object );\n\n\t/* Setup the file entry type object\n\t */\n\tpyfsntfs_file_entry_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_file_entry_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_file_entry_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"file_entry\",\n\t (PyObject *) &pyfsntfs_file_entry_type_object );\n\n\t/* Setup the file entries type object\n\t */\n\tpyfsntfs_file_entries_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_file_entries_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_file_entries_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"file_entries\",\n\t (PyObject *) &pyfsntfs_file_entries_type_object );\n\n\t/* Setup the $FILE_NAME attribute type object\n\t */\n\tpyfsntfs_file_name_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_file_name_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_file_name_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"file_name_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the MFT metadata file type object\n\t */\n\tpyfsntfs_mft_metadata_file_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_mft_metadata_file_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_mft_metadata_file_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"mft_metadata_file\",\n\t (PyObject *) &pyfsntfs_mft_metadata_file_type_object );\n\n\t/* Setup the MFT metadata file entries type object\n\t */\n\tpyfsntfs_mft_metadata_file_entries_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_mft_metadata_file_entries_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_mft_metadata_file_entries_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"mft_metadata_file_entries\",\n\t (PyObject *) &pyfsntfs_mft_metadata_file_entries_type_object );\n\n\t/* Setup the $OBJECT_IDENTIFIER attribute type object\n\t */\n\tpyfsntfs_object_identifier_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_object_identifier_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_object_identifier_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"object_identifier_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the $REPARSE_POINT attribute type object\n\t */\n\tpyfsntfs_reparse_point_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_reparse_point_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_reparse_point_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"reparse_point_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the $SECURITY_DESCRIPTOR attribute type object\n\t */\n\tpyfsntfs_security_descriptor_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_security_descriptor_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_security_descriptor_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"security_descriptor_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the $STANDARD_INFORMATION attribute type object\n\t */\n\tpyfsntfs_standard_information_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_standard_information_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_standard_information_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"standard_information_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the USN change journal type object\n\t */\n\tpyfsntfs_usn_change_journal_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_usn_change_journal_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_usn_change_journal_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"usn_change_journal\",\n\t (PyObject *) &pyfsntfs_usn_change_journal_type_object );\n\n\t/* Setup the volume type object\n\t */\n\tpyfsntfs_volume_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_volume_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_volume_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"volume\",\n\t (PyObject *) &pyfsntfs_volume_type_object );\n\n\t/* Setup the volume file entries type object\n\t */\n\tpyfsntfs_volume_file_entries_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_volume_file_entries_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_volume_file_entries_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"volume_file_entries\",\n\t (PyObject *) &pyfsntfs_volume_file_entries_type_object );\n\n\t/* Setup the $VOLUME_INFORMATION attribute type object\n\t */\n\tpyfsntfs_volume_information_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_volume_information_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_volume_information_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"volume_information_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\t/* Setup the $VOLUME_NAME attribute type object\n\t */\n\tpyfsntfs_volume_name_attribute_type_object.tp_new = PyType_GenericNew;\n\n\tif( PyType_Ready(\n\t     &pyfsntfs_volume_name_attribute_type_object ) < 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t (PyObject *) &pyfsntfs_volume_name_attribute_type_object );\n\n\tPyModule_AddObject(\n\t module,\n\t \"volume_name_attribute\",\n\t (PyObject *) &pyfsntfs_attribute_type_object );\n\n\tPyGILState_Release(\n\t gil_state );\n\n#if PY_MAJOR_VERSION >= 3\n\treturn( module );\n#else\n\treturn;\n#endif\n\non_error:\n\tPyGILState_Release(\n\t gil_state );\n\n#if PY_MAJOR_VERSION >= 3\n\treturn( NULL );\n#else\n\treturn;\n#endif\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs.h",
    "content": "/*\n * Python bindings module for libfsntfs (pyfsntfs)\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_H )\n#define _PYFSNTFS_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nPyObject *pyfsntfs_get_version(\n           PyObject *self,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_check_volume_signature(\n           PyObject *self,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_check_volume_signature_file_object(\n           PyObject *self,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_open_new_volume(\n           PyObject *self,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_open_new_volume_with_file_object(\n           PyObject *self,\n           PyObject *arguments,\n           PyObject *keywords );\n\n#if PY_MAJOR_VERSION >= 3\nPyMODINIT_FUNC PyInit_pyfsntfs(\n                void );\n#else\nPyMODINIT_FUNC initpyfsntfs(\n                void );\n#endif\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attribute.c",
    "content": "/*\n * Python object wrapper of libfsntfs_attribute_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_attribute_type\",\n\t  (PyCFunction) pyfsntfs_attribute_get_type,\n\t  METH_NOARGS,\n\t  \"get_attribute_type() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the attribute type.\" },\n\n\t{ \"get_attribute_name\",\n\t  (PyCFunction) pyfsntfs_attribute_get_name,\n\t  METH_NOARGS,\n\t  \"get_attribute_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name of the attribute.\" },\n\n\t{ \"get_data_size\",\n\t  (PyCFunction) pyfsntfs_attribute_get_data_size,\n\t  METH_NOARGS,\n\t  \"get_data_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the size of the attribute data.\" },\n\n\t{ \"get_valid_data_size\",\n\t  (PyCFunction) pyfsntfs_attribute_get_valid_data_size,\n\t  METH_NOARGS,\n\t  \"get_valid_data_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the size of the attribute data that is used (considered valid).\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_attribute_object_get_set_definitions[] = {\n\n\t{ \"attribute_type\",\n\t  (getter) pyfsntfs_attribute_get_type,\n\t  (setter) 0,\n\t  \"The attribute type.\",\n\t  NULL },\n\n\t{ \"attribute_name\",\n\t  (getter) pyfsntfs_attribute_get_name,\n\t  (setter) 0,\n\t  \"The name of the attribute.\",\n\t  NULL },\n\n\t{ \"data_size\",\n\t  (getter) pyfsntfs_attribute_get_data_size,\n\t  (setter) 0,\n\t  \"The size of the attribute data.\",\n\t  NULL },\n\n\t{ \"valid_data_size\",\n\t  (getter) pyfsntfs_attribute_get_valid_data_size,\n\t  (setter) 0,\n\t  \"The size of the attribute data that is used (considered valid).\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_attribute_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs attribute object (wraps libfsntfs_attribute_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_attribute_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new attribute object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_new(\n           PyTypeObject *type_object,\n           libfsntfs_attribute_t *attribute,\n           PyObject *parent_object )\n{\n\tpyfsntfs_attribute_t *pyfsntfs_attribute = NULL;\n\tstatic char *function                    = \"pyfsntfs_attribute_new\";\n\n\tif( attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_attribute = PyObject_New(\n\t                      struct pyfsntfs_attribute,\n\t                      type_object );\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize attribute.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_attribute->attribute     = attribute;\n\tpyfsntfs_attribute->parent_object = parent_object;\n\n\tif( pyfsntfs_attribute->parent_object != NULL )\n\t{\n\t\tPy_IncRef(\n\t\t pyfsntfs_attribute->parent_object );\n\t}\n\treturn( (PyObject *) pyfsntfs_attribute );\n\non_error:\n\tif( pyfsntfs_attribute != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_attribute );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes an attribute object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_attribute_init(\n     pyfsntfs_attribute_t *pyfsntfs_attribute )\n{\n\tstatic char *function = \"pyfsntfs_attribute_init\";\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs attribute is set to NULL\n\t */\n\tpyfsntfs_attribute->attribute = NULL;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of attribute not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees an attribute object\n */\nvoid pyfsntfs_attribute_free(\n      pyfsntfs_attribute_t *pyfsntfs_attribute )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_attribute_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_attribute );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_attribute->attribute != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_attribute_free(\n\t\t          &( pyfsntfs_attribute->attribute ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs attribute.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tif( pyfsntfs_attribute->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t pyfsntfs_attribute->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_attribute );\n}\n\n/* Retrieves the type\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_get_type(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_attribute_get_type\";\n\tuint32_t value_32bit     = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_type(\n\t          pyfsntfs_attribute->attribute,\n\t          &value_32bit,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve type.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLong(\n\t                  (unsigned long) value_32bit );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_attribute_get_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t\t  pyfsntfs_attribute->attribute,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the data size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_get_data_size(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_attribute_get_data_size\";\n\tsize64_t data_size       = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_data_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve data size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) data_size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the valid data size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_get_valid_data_size(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_attribute_get_valid_data_size\";\n\tsize64_t valid_data_size = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &valid_data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve valid data size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) valid_data_size );\n\n\treturn( integer_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attribute.h",
    "content": "/*\n * Python object wrapper of libfsntfs_attribute_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_ATTRIBUTE_H )\n#define _PYFSNTFS_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_attribute pyfsntfs_attribute_t;\n\nstruct pyfsntfs_attribute\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs attribute\n\t */\n\tlibfsntfs_attribute_t *attribute;\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n};\n\nextern PyMethodDef pyfsntfs_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_attribute_type_object;\n\nPyObject *pyfsntfs_attribute_new(\n           PyTypeObject *type_object,\n           libfsntfs_attribute_t *attribute,\n           PyObject *parent_object );\n\nint pyfsntfs_attribute_init(\n     pyfsntfs_attribute_t *pyfsntfs_attribute );\n\nvoid pyfsntfs_attribute_free(\n      pyfsntfs_attribute_t *pyfsntfs_attribute );\n\nPyObject *pyfsntfs_attribute_get_type(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_attribute_get_data_size(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_attribute_get_valid_data_size(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attribute_types.c",
    "content": "/*\n * Python object definition of the libfsntfs attribute types\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute_types.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyTypeObject pyfsntfs_attribute_types_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.attribute_types\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_types_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_attribute_types_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs attribute types object (wraps LIBFSNTFS_ATTRIBUTE_TYPES)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_attribute_types_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Initializes the type object\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_attribute_types_init_type(\n     PyTypeObject *type_object )\n{\n\tPyObject *value_object = NULL;\n\n\tif( type_object == NULL )\n\t{\n\t\treturn( -1 );\n\t}\n\ttype_object->tp_dict = PyDict_New();\n\n\tif( type_object->tp_dict == NULL )\n\t{\n\t\treturn( -1 );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$STANDARD_INFORMATION\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_ATTRIBUTE_LIST );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$ATTRIBUTE_LIST\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$FILE_NAME\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$OBJECT_ID\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$SECURITY_DESCRIPTOR\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$VOLUME_NAME\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$VOLUME_INFORMATION\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_DATA );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_DATA );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$DATA\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ROOT );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$INDEX_ROOT\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_INDEX_ALLOCATION );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$INDEX_ALLOCATION\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_BITMAP );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$BITMAP\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$REPARSE_POINT\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED_INFORMATION );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$EA_INFORMATION\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_EXTENDED );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$EA\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_PROPERTY_SET );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$PROPERTY_SET\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_ATTRIBUTE_TYPE_LOGGED_UTILITY_STREAM );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"$LOGGED_UTILITY_STREAM\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( type_object->tp_dict != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t type_object->tp_dict );\n\n\t\ttype_object->tp_dict = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Creates a new attribute types object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attribute_types_new(\n           void )\n{\n\tpyfsntfs_attribute_types_t *definitions_object = NULL;\n\tstatic char *function                          = \"pyfsntfs_attribute_types_new\";\n\n\tdefinitions_object = PyObject_New(\n\t                      struct pyfsntfs_attribute_types,\n\t                      &pyfsntfs_attribute_types_type_object );\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create definitions object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_attribute_types_init(\n\t     definitions_object ) != 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize definitions object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( (PyObject *) definitions_object );\n\non_error:\n\tif( definitions_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) definitions_object );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes an attribute types object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_attribute_types_init(\n     pyfsntfs_attribute_types_t *definitions_object )\n{\n\tstatic char *function = \"pyfsntfs_attribute_types_init\";\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid definitions object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 0 );\n}\n\n/* Frees an attribute types object\n */\nvoid pyfsntfs_attribute_types_free(\n      pyfsntfs_attribute_types_t *definitions_object )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_attribute_types_free\";\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid definitions object.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           definitions_object );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type->tp_free(\n\t (PyObject*) definitions_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attribute_types.h",
    "content": "/*\n * Python object definition of the libfsntfs attribute types\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_ATTRIBUTE_TYPES_H )\n#define _PYFSNTFS_ATTRIBUTE_TYPES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_attribute_types pyfsntfs_attribute_types_t;\n\nstruct pyfsntfs_attribute_types\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n};\n\nextern PyTypeObject pyfsntfs_attribute_types_type_object;\n\nint pyfsntfs_attribute_types_init_type(\n     PyTypeObject *type_object );\n\nPyObject *pyfsntfs_attribute_types_new(\n           void );\n\nint pyfsntfs_attribute_types_init(\n     pyfsntfs_attribute_types_t *definitions_object );\n\nvoid pyfsntfs_attribute_types_free(\n      pyfsntfs_attribute_types_t *definitions_object );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_ATTRIBUTE_TYPES_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attributes.c",
    "content": "/*\n * Python object definition of the sequence and iterator object of attributes\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attributes.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\nPySequenceMethods pyfsntfs_attributes_sequence_methods = {\n\t/* sq_length */\n\t(lenfunc) pyfsntfs_attributes_len,\n\t/* sq_concat */\n\t0,\n\t/* sq_repeat */\n\t0,\n\t/* sq_item */\n\t(ssizeargfunc) pyfsntfs_attributes_getitem,\n\t/* sq_slice */\n\t0,\n\t/* sq_ass_item */\n\t0,\n\t/* sq_ass_slice */\n\t0,\n\t/* sq_contains */\n\t0,\n\t/* sq_inplace_concat */\n\t0,\n\t/* sq_inplace_repeat */\n\t0\n};\n\nPyTypeObject pyfsntfs_attributes_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.attributes\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attributes_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_attributes_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t&pyfsntfs_attributes_sequence_methods,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,\n\t/* tp_doc */\n\t\"pyfsntfs sequence and iterator object of attributes\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t(getiterfunc) pyfsntfs_attributes_iter,\n\t/* tp_iternext */\n\t(iternextfunc) pyfsntfs_attributes_iternext,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_attributes_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new attributes sequence and iterator object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_attributes_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items )\n{\n\tpyfsntfs_attributes_t *sequence_object = NULL;\n\tstatic char *function                  = \"pyfsntfs_attributes_new\";\n\n\tif( parent_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid parent object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Make sure the attributes values are initialized\n\t */\n\tsequence_object = PyObject_New(\n\t                   struct pyfsntfs_attributes,\n\t                   &pyfsntfs_attributes_type_object );\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create sequence object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsequence_object->parent_object     = parent_object;\n\tsequence_object->get_item_by_index = get_item_by_index;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = number_of_items;\n\n\tPy_IncRef(\n\t (PyObject *) sequence_object->parent_object );\n\n\treturn( (PyObject *) sequence_object );\n\non_error:\n\tif( sequence_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes an attributes sequence and iterator object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_attributes_init(\n     pyfsntfs_attributes_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_attributes_init\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure the attributes values are initialized\n\t */\n\tsequence_object->parent_object     = NULL;\n\tsequence_object->get_item_by_index = NULL;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = 0;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of attributes not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees an attributes sequence object\n */\nvoid pyfsntfs_attributes_free(\n      pyfsntfs_attributes_t *sequence_object )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_attributes_free\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           sequence_object );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( sequence_object->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) sequence_object );\n}\n\n/* The attributes len() function\n */\nPy_ssize_t pyfsntfs_attributes_len(\n            pyfsntfs_attributes_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_attributes_len\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (Py_ssize_t) sequence_object->number_of_items );\n}\n\n/* The attributes getitem() function\n */\nPyObject *pyfsntfs_attributes_getitem(\n           pyfsntfs_attributes_t *sequence_object,\n           Py_ssize_t item_index )\n{\n\tPyObject *attribute_object = NULL;\n\tstatic char *function      = \"pyfsntfs_attributes_getitem\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( item_index < 0 )\n\t || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid invalid item index value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tattribute_object = sequence_object->get_item_by_index(\n\t                    sequence_object->parent_object,\n\t                    (int) item_index );\n\n\treturn( attribute_object );\n}\n\n/* The attributes iter() function\n */\nPyObject *pyfsntfs_attributes_iter(\n           pyfsntfs_attributes_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_attributes_iter\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t (PyObject *) sequence_object );\n\n\treturn( (PyObject *) sequence_object );\n}\n\n/* The attributes iternext() function\n */\nPyObject *pyfsntfs_attributes_iternext(\n           pyfsntfs_attributes_t *sequence_object )\n{\n\tPyObject *attribute_object = NULL;\n\tstatic char *function      = \"pyfsntfs_attributes_iternext\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid current index.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index >= sequence_object->number_of_items )\n\t{\n\t\tPyErr_SetNone(\n\t\t PyExc_StopIteration );\n\n\t\treturn( NULL );\n\t}\n\tattribute_object = sequence_object->get_item_by_index(\n\t                    sequence_object->parent_object,\n\t                    sequence_object->current_index );\n\n\tif( attribute_object != NULL )\n\t{\n\t\tsequence_object->current_index++;\n\t}\n\treturn( attribute_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_attributes.h",
    "content": "/*\n * Python object definition of the sequence and iterator object of attributes\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_ATTRIBUTES_H )\n#define _PYFSNTFS_ATTRIBUTES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_attributes pyfsntfs_attributes_t;\n\nstruct pyfsntfs_attributes\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n\n\t/* The get item by index callback function\n\t */\n\tPyObject* (*get_item_by_index)(\n\t             PyObject *parent_object,\n\t             int index );\n\n\t/* The current index\n\t */\n\tint current_index;\n\n\t/* The number of items\n\t */\n\tint number_of_items;\n};\n\nextern PyTypeObject pyfsntfs_attributes_type_object;\n\nPyObject *pyfsntfs_attributes_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items );\n\nint pyfsntfs_attributes_init(\n     pyfsntfs_attributes_t *sequence_object );\n\nvoid pyfsntfs_attributes_free(\n      pyfsntfs_attributes_t *sequence_object );\n\nPy_ssize_t pyfsntfs_attributes_len(\n            pyfsntfs_attributes_t *sequence_object );\n\nPyObject *pyfsntfs_attributes_getitem(\n           pyfsntfs_attributes_t *sequence_object,\n           Py_ssize_t item_index );\n\nPyObject *pyfsntfs_attributes_iter(\n           pyfsntfs_attributes_t *sequence_object );\n\nPyObject *pyfsntfs_attributes_iternext(\n           pyfsntfs_attributes_t *sequence_object );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_ATTRIBUTES_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_data_stream.c",
    "content": "/*\n * Python object wrapper of libfsntfs_data_stream_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_data_stream.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_data_stream_object_methods[] = {\n\n\t/* Functions to access the data stream data */\n\n\t{ \"read_buffer\",\n\t  (PyCFunction) pyfsntfs_data_stream_read_buffer,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read_buffer(size) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of data stream data.\" },\n\n\t{ \"read_buffer_at_offset\",\n\t  (PyCFunction) pyfsntfs_data_stream_read_buffer_at_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read_buffer_at_offset(size, offset) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of data stream data at a specific offset.\" },\n\n\t{ \"seek_offset\",\n\t  (PyCFunction) pyfsntfs_data_stream_seek_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"seek_offset(offset, whence) -> None\\n\"\n\t  \"\\n\"\n\t  \"Seeks an offset within the data stream data.\" },\n\n\t{ \"get_offset\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_offset,\n\t  METH_NOARGS,\n\t  \"get_offset() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the current offset within the data stream data.\" },\n\n\t/* Some Pythonesque aliases */\n\n\t{ \"read\",\n\t  (PyCFunction) pyfsntfs_data_stream_read_buffer,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read(size) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of data stream data.\" },\n\n\t{ \"seek\",\n\t  (PyCFunction) pyfsntfs_data_stream_seek_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"seek(offset, whence) -> None\\n\"\n\t  \"\\n\"\n\t  \"Seeks an offset within the data stream data.\" },\n\n\t{ \"tell\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_offset,\n\t  METH_NOARGS,\n\t  \"tell() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the current offset within the data stream data.\" },\n\n\t/* Functions to access the metadata */\n\n\t{ \"get_size\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_size,\n\t  METH_NOARGS,\n\t  \"get_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the size data.\" },\n\n\t{ \"get_name\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_name,\n\t  METH_NOARGS,\n\t  \"get_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t/* Functions to access the extents */\n\n\t{ \"get_number_of_extents\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_number_of_extents,\n\t  METH_NOARGS,\n\t  \"get_number_of_extents() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of extents.\" },\n\n\t{ \"get_extent\",\n\t  (PyCFunction) pyfsntfs_data_stream_get_extent,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_extent(extent_index) -> Tuple( Integer, Integer, Integer )\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific extent.\\t\"\n          \"The extent is a tuple of offset, size and flags.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_data_stream_object_get_set_definitions[] = {\n\n\t{ \"size\",\n\t  (getter) pyfsntfs_data_stream_get_size,\n\t  (setter) 0,\n\t  \"The size of the data.\",\n\t  NULL },\n\n\t{ \"name\",\n\t  (getter) pyfsntfs_data_stream_get_name,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t{ \"number_of_extents\",\n\t  (getter) pyfsntfs_data_stream_get_number_of_extents,\n\t  (setter) 0,\n\t  \"The number of extents.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_data_stream_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.data_stream\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_data_stream_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_data_stream_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs data stream object (wraps libfsntfs_data_stream_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_data_stream_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_data_stream_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_data_stream_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new data stream object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_new(\n           libfsntfs_data_stream_t *data_stream,\n           PyObject *parent_object )\n{\n\tpyfsntfs_data_stream_t *pyfsntfs_data_stream = NULL;\n\tstatic char *function                        = \"pyfsntfs_data_stream_new\";\n\n\tif( data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_data_stream = PyObject_New(\n\t                        struct pyfsntfs_data_stream,\n\t                        &pyfsntfs_data_stream_type_object );\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize data stream.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_data_stream->data_stream   = data_stream;\n\tpyfsntfs_data_stream->parent_object = parent_object;\n\n\tif( pyfsntfs_data_stream->parent_object != NULL )\n\t{\n\t\tPy_IncRef(\n\t\t pyfsntfs_data_stream->parent_object );\n\t}\n\treturn( (PyObject *) pyfsntfs_data_stream );\n\non_error:\n\tif( pyfsntfs_data_stream != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_data_stream );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a data stream object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_data_stream_init(\n     pyfsntfs_data_stream_t *pyfsntfs_data_stream )\n{\n\tstatic char *function = \"pyfsntfs_data_stream_init\";\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs data stream is set to NULL\n\t */\n\tpyfsntfs_data_stream->data_stream = NULL;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of data stream not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees a data stream object\n */\nvoid pyfsntfs_data_stream_free(\n      pyfsntfs_data_stream_t *pyfsntfs_data_stream )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_data_stream_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_data_stream );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_data_stream->data_stream != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_data_stream_free(\n\t\t          &( pyfsntfs_data_stream->data_stream ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs data stream.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tif( pyfsntfs_data_stream->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t pyfsntfs_data_stream->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_data_stream );\n}\n\n/* Reads a buffer of data from the data stream\n * Returns a Python object holding the data if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_read_buffer(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *integer_object    = NULL;\n\tPyObject *string_object     = NULL;\n\tstatic char *function       = \"pyfsntfs_data_stream_read_buffer\";\n\tstatic char *keyword_list[] = { \"size\", NULL };\n\tchar *buffer                = NULL;\n\tsize64_t read_size          = 0;\n\tssize_t read_count          = 0;\n\tint result                  = 0;\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_data_stream->data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream - missing libfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"|O\",\n\t     keyword_list,\n\t     &integer_object ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( integer_object != NULL )\n\t{\n\t\tPyErr_Clear();\n\n\t\tresult = PyObject_IsInstance(\n\t\t\t  integer_object,\n\t\t\t  (PyObject *) &PyLong_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n#if PY_MAJOR_VERSION < 3\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tPyErr_Clear();\n\n\t\t\tresult = PyObject_IsInstance(\n\t\t\t\t  integer_object,\n\t\t\t\t  (PyObject *) &PyInt_Type );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t\t PyExc_RuntimeError,\n\t\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( NULL );\n\t\t\t}\n\t\t}\n#endif\n\t}\n\tif( result != 0 )\n\t{\n\t\tif( pyfsntfs_integer_unsigned_copy_to_64bit(\n\t\t     integer_object,\n\t\t     (uint64_t *) &read_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to convert integer object into read size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse if( ( integer_object == NULL )\n\t      || ( integer_object == Py_None ) )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_data_stream_get_size(\n\t\t\t  pyfsntfs_data_stream->data_stream,\n\t\t\t  &read_size,\n\t\t\t  &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( read_size == 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tstring_object = PyBytes_FromString(\n\t\t                 \"\" );\n#else\n\t\tstring_object = PyString_FromString(\n\t\t                 \"\" );\n#endif\n\t\treturn( string_object );\n\t}\n\t/* Make sure the data fits into a memory buffer\n\t */\n\tif( ( read_size > (size64_t) INT_MAX )\n\t || ( read_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid argument read size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyBytes_AsString(\n\t          string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyString_AsString(\n\t          string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              pyfsntfs_data_stream->data_stream,\n\t              (uint8_t *) buffer,\n\t              (size_t) read_size,\n\t              &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( read_count <= -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to read data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\t/* Need to resize the string here in case read_size was not fully read.\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tif( _PyBytes_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#else\n\tif( _PyString_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#endif\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n/* Reads a buffer of data at a specific offset from the data stream\n * Returns a Python object holding the data if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_read_buffer_at_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *integer_object    = NULL;\n\tPyObject *string_object     = NULL;\n\tstatic char *function       = \"pyfsntfs_data_stream_read_buffer_at_offset\";\n\tstatic char *keyword_list[] = { \"size\", \"offset\", NULL };\n\tchar *buffer                = NULL;\n\toff64_t read_offset         = 0;\n\tsize64_t read_size          = 0;\n\tssize_t read_count          = 0;\n\tint result                  = 0;\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_data_stream->data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream - missing libfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"OL\",\n\t     keyword_list,\n\t     &integer_object,\n\t     &read_offset ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tresult = PyObject_IsInstance(\n\t          integer_object,\n\t          (PyObject *) &PyLong_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION < 3\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Clear();\n\n\t\tresult = PyObject_IsInstance(\n\t\t          integer_object,\n\t\t          (PyObject *) &PyInt_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t         PyExc_RuntimeError,\n\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n#endif\n\tif( result != 0 )\n\t{\n\t\tif( pyfsntfs_integer_unsigned_copy_to_64bit(\n\t\t     integer_object,\n\t\t     (uint64_t *) &read_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to convert integer object into read size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse if( integer_object == Py_None )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_data_stream_get_size(\n\t\t\t  pyfsntfs_data_stream->data_stream,\n\t\t\t  &read_size,\n\t\t\t  &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( read_size == 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tstring_object = PyBytes_FromString(\n\t\t                 \"\" );\n#else\n\t\tstring_object = PyString_FromString(\n\t\t                 \"\" );\n#endif\n\t\treturn( string_object );\n\t}\n\t/* Make sure the data fits into a memory buffer\n\t */\n\tif( ( read_size > (size64_t) INT_MAX )\n\t || ( read_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid argument read size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyBytes_AsString(\n\t          string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyString_AsString(\n\t          string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              pyfsntfs_data_stream->data_stream,\n\t              (uint8_t *) buffer,\n\t              (size_t) read_size,\n\t              (off64_t) read_offset,\n\t              &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( read_count <= -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to read data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\t/* Need to resize the string here in case read_size was not fully read.\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tif( _PyBytes_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#else\n\tif( _PyString_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#endif\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n/* Seeks a certain offset in the data stream data\n * Returns a Python object holding the offset if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_seek_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_data_stream_seek_offset\";\n\tstatic char *keyword_list[] = { \"offset\", \"whence\", NULL };\n\toff64_t offset              = 0;\n\tint whence                  = 0;\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_data_stream->data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs data stream - missing libfsntfs data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"L|i\",\n\t     keyword_list,\n\t     &offset,\n\t     &whence ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          pyfsntfs_data_stream->data_stream,\n\t          offset,\n\t          whence,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( offset == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to seek offset.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n}\n\n/* Retrieves the offset\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_data_stream_get_offset\";\n\toff64_t offset           = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_offset(\n\t          pyfsntfs_data_stream->data_stream,\n\t          &offset,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve offset.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  (int64_t) offset );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_size(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_data_stream_get_size\";\n\tsize64_t size            = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_size(\n\t          pyfsntfs_data_stream->data_stream,\n\t          &size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_name(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_data_stream_get_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          pyfsntfs_data_stream->data_stream,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t\t  pyfsntfs_data_stream->data_stream,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the number of extents\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_number_of_extents(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_data_stream_get_number_of_extents\";\n\tint number_of_extents    = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          pyfsntfs_data_stream->data_stream,\n\t          &number_of_extents,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of extents.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) number_of_extents );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) number_of_extents );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves a specific extent by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_extent_by_index(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           int extent_index )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tPyObject *tuple_object   = NULL;\n\tstatic char *function    = \"pyfsntfs_data_stream_get_extent_by_index\";\n\toff64_t extent_offset    = 0;\n\tsize64_t extent_size     = 0;\n\tuint32_t extent_flags    = 0;\n\tint result               = 0;\n\n\tif( pyfsntfs_data_stream == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          pyfsntfs_data_stream->data_stream,\n\t          extent_index,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve extent: %d.\",\n\t\t function,\n\t\t extent_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\ttuple_object = PyTuple_New(\n                        3 );\n\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  (int64_t) extent_offset );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     0,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) extent_size );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     1,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) extent_flags );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     2,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( tuple_object );\n\non_error:\n\tif( integer_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) integer_object );\n\t}\n\tif( tuple_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) tuple_object );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific extent\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_stream_get_extent(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *sequence_object   = NULL;\n\tstatic char *keyword_list[] = { \"extent_index\", NULL };\n\tint extent_index            = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &extent_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tsequence_object = pyfsntfs_data_stream_get_extent_by_index(\n\t                   pyfsntfs_data_stream,\n\t                   extent_index );\n\n\treturn( sequence_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_data_stream.h",
    "content": "/*\n * Python object wrapper of libfsntfs_data_stream_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_DATA_STREAM_H )\n#define _PYFSNTFS_DATA_STREAM_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_data_stream pyfsntfs_data_stream_t;\n\nstruct pyfsntfs_data_stream\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs data stream\n\t */\n\tlibfsntfs_data_stream_t *data_stream;\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n};\n\nextern PyMethodDef pyfsntfs_data_stream_object_methods[];\nextern PyTypeObject pyfsntfs_data_stream_type_object;\n\nPyObject *pyfsntfs_data_stream_new(\n           libfsntfs_data_stream_t *data_stream,\n           PyObject *parent_object );\n\nint pyfsntfs_data_stream_init(\n     pyfsntfs_data_stream_t *pyfsntfs_data_stream );\n\nvoid pyfsntfs_data_stream_free(\n      pyfsntfs_data_stream_t *pyfsntfs_data_stream );\n\nPyObject *pyfsntfs_data_stream_read_buffer(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_data_stream_read_buffer_at_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_data_stream_seek_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_data_stream_get_offset(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_data_stream_get_size(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_data_stream_get_name(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_data_stream_get_number_of_extents(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_data_stream_get_extent_by_index(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           int extent_index );\n\nPyObject *pyfsntfs_data_stream_get_extent(\n           pyfsntfs_data_stream_t *pyfsntfs_data_stream,\n           PyObject *arguments,\n           PyObject *keywords );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_DATA_STREAM_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_data_streams.c",
    "content": "/*\n * Python object definition of the sequence and iterator object of data streams\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_data_stream.h\"\n#include \"pyfsntfs_data_streams.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\nPySequenceMethods pyfsntfs_data_streams_sequence_methods = {\n\t/* sq_length */\n\t(lenfunc) pyfsntfs_data_streams_len,\n\t/* sq_concat */\n\t0,\n\t/* sq_repeat */\n\t0,\n\t/* sq_item */\n\t(ssizeargfunc) pyfsntfs_data_streams_getitem,\n\t/* sq_slice */\n\t0,\n\t/* sq_ass_item */\n\t0,\n\t/* sq_ass_slice */\n\t0,\n\t/* sq_contains */\n\t0,\n\t/* sq_inplace_concat */\n\t0,\n\t/* sq_inplace_repeat */\n\t0\n};\n\nPyTypeObject pyfsntfs_data_streams_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.data_streams\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_data_streams_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_data_streams_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t&pyfsntfs_data_streams_sequence_methods,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,\n\t/* tp_doc */\n\t\"pyfsntfs sequence and iterator object of data streams\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t(getiterfunc) pyfsntfs_data_streams_iter,\n\t/* tp_iternext */\n\t(iternextfunc) pyfsntfs_data_streams_iternext,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_data_streams_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new data streams sequence and iterator object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_data_streams_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items )\n{\n\tpyfsntfs_data_streams_t *sequence_object = NULL;\n\tstatic char *function                    = \"pyfsntfs_data_streams_new\";\n\n\tif( parent_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid parent object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Make sure the data streams values are initialized\n\t */\n\tsequence_object = PyObject_New(\n\t                   struct pyfsntfs_data_streams,\n\t                   &pyfsntfs_data_streams_type_object );\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create sequence object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsequence_object->parent_object     = parent_object;\n\tsequence_object->get_item_by_index = get_item_by_index;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = number_of_items;\n\n\tPy_IncRef(\n\t (PyObject *) sequence_object->parent_object );\n\n\treturn( (PyObject *) sequence_object );\n\non_error:\n\tif( sequence_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a data streams sequence and iterator object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_data_streams_init(\n     pyfsntfs_data_streams_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_data_streams_init\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure the data streams values are initialized\n\t */\n\tsequence_object->parent_object     = NULL;\n\tsequence_object->get_item_by_index = NULL;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = 0;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of data streams not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees a data streams sequence object\n */\nvoid pyfsntfs_data_streams_free(\n      pyfsntfs_data_streams_t *sequence_object )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_data_streams_free\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           sequence_object );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( sequence_object->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) sequence_object );\n}\n\n/* The data streams len() function\n */\nPy_ssize_t pyfsntfs_data_streams_len(\n            pyfsntfs_data_streams_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_data_streams_len\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (Py_ssize_t) sequence_object->number_of_items );\n}\n\n/* The data streams getitem() function\n */\nPyObject *pyfsntfs_data_streams_getitem(\n           pyfsntfs_data_streams_t *sequence_object,\n           Py_ssize_t item_index )\n{\n\tPyObject *data_stream_object = NULL;\n\tstatic char *function        = \"pyfsntfs_data_streams_getitem\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( item_index < 0 )\n\t || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid invalid item index value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tdata_stream_object = sequence_object->get_item_by_index(\n\t                      sequence_object->parent_object,\n\t                      (int) item_index );\n\n\treturn( data_stream_object );\n}\n\n/* The data streams iter() function\n */\nPyObject *pyfsntfs_data_streams_iter(\n           pyfsntfs_data_streams_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_data_streams_iter\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t (PyObject *) sequence_object );\n\n\treturn( (PyObject *) sequence_object );\n}\n\n/* The data streams iternext() function\n */\nPyObject *pyfsntfs_data_streams_iternext(\n           pyfsntfs_data_streams_t *sequence_object )\n{\n\tPyObject *data_stream_object = NULL;\n\tstatic char *function        = \"pyfsntfs_data_streams_iternext\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid current index.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index >= sequence_object->number_of_items )\n\t{\n\t\tPyErr_SetNone(\n\t\t PyExc_StopIteration );\n\n\t\treturn( NULL );\n\t}\n\tdata_stream_object = sequence_object->get_item_by_index(\n\t                      sequence_object->parent_object,\n\t                      sequence_object->current_index );\n\n\tif( data_stream_object != NULL )\n\t{\n\t\tsequence_object->current_index++;\n\t}\n\treturn( data_stream_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_data_streams.h",
    "content": "/*\n * Python object definition of the sequence and iterator object of data streams\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_DATA_STREAMS_H )\n#define _PYFSNTFS_DATA_STREAMS_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_data_streams pyfsntfs_data_streams_t;\n\nstruct pyfsntfs_data_streams\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n\n\t/* The get item by index callback function\n\t */\n\tPyObject* (*get_item_by_index)(\n\t             PyObject *parent_object,\n\t             int index );\n\n\t/* The current index\n\t */\n\tint current_index;\n\n\t/* The number of items\n\t */\n\tint number_of_items;\n};\n\nextern PyTypeObject pyfsntfs_data_streams_type_object;\n\nPyObject *pyfsntfs_data_streams_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items );\n\nint pyfsntfs_data_streams_init(\n     pyfsntfs_data_streams_t *sequence_object );\n\nvoid pyfsntfs_data_streams_free(\n      pyfsntfs_data_streams_t *sequence_object );\n\nPy_ssize_t pyfsntfs_data_streams_len(\n            pyfsntfs_data_streams_t *sequence_object );\n\nPyObject *pyfsntfs_data_streams_getitem(\n           pyfsntfs_data_streams_t *sequence_object,\n           Py_ssize_t item_index );\n\nPyObject *pyfsntfs_data_streams_iter(\n           pyfsntfs_data_streams_t *sequence_object );\n\nPyObject *pyfsntfs_data_streams_iternext(\n           pyfsntfs_data_streams_t *sequence_object );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_DATA_STREAMS_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_datetime.c",
    "content": "/*\n * Date and time functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <types.h>\n\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_python.h\"\n\n#include <datetime.h>\n\n/* Creates a new datetime object from date and time elements\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_time_elements(\n           uint16_t year,\n           uint64_t number_of_days,\n           uint8_t hours,\n           uint8_t minutes,\n           uint8_t seconds,\n           uint32_t micro_seconds )\n{\n\tPyObject *datetime_object = NULL;\n\tstatic char *function     = \"pyfsntfs_datetime_new_from_time_elements\";\n\tuint32_t days_in_century  = 0;\n\tuint16_t days_in_year     = 0;\n\tuint8_t day_of_month      = 0;\n\tuint8_t days_in_month     = 0;\n\tuint8_t month             = 0;\n\n\twhile( number_of_days > 0 )\n\t{\n\t\tif( ( year % 400 ) == 0 )\n\t\t{\n\t\t\tdays_in_century = 36525;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdays_in_century = 36524;\n\t\t}\n\t\tif( number_of_days <= days_in_century )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tnumber_of_days -= days_in_century;\n\n\t\tyear += 100;\n\t}\n\twhile( number_of_days > 0 )\n\t{\n\t\t/* Check for a leap year\n\t\t * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 )\n\t\t */\n\t\tif( ( ( ( year % 4 ) == 0 )\n\t\t  &&  ( ( year % 100 ) != 0 ) )\n\t\t || ( ( year % 400 ) == 0 ) )\n\t\t{\n\t\t\tdays_in_year = 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdays_in_year = 365;\n\t\t}\n\t\tif( number_of_days <= days_in_year )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tnumber_of_days -= days_in_year;\n\n\t\tyear += 1;\n\t}\n\t/* Determine the month correct the value to days within the month\n\t */\n\tmonth = 1;\n\n\twhile( number_of_days > 0 )\n\t{\n\t\t/* February (2)\n\t\t */\n\t\tif( month == 2 )\n\t\t{\n\t\t\tif( ( ( ( year % 4 ) == 0 )\n\t\t\t  &&  ( ( year % 100 ) != 0 ) )\n\t\t\t || ( ( year % 400 ) == 0 ) )\n\t\t\t{\n\t\t\t\tdays_in_month = 29;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdays_in_month = 28;\n\t\t\t}\n\t\t}\n\t\t/* April (4), June (6), September (9), November (11)\n\t\t */\n\t\telse if( ( month == 4 )\n\t\t      || ( month == 6 )\n\t\t      || ( month == 9 )\n\t\t      || ( month == 11 ) )\n\t\t{\n\t\t\tdays_in_month = 30;\n\t\t}\n\t\t/* January (1), March (3), May (5), July (7), August (8), October (10), December (12)\n\t\t */\n\t\telse if( ( month == 1 )\n\t\t      || ( month == 3 )\n\t\t      || ( month == 5 )\n\t\t      || ( month == 7 )\n\t\t      || ( month == 8 )\n\t\t      || ( month == 10 )\n\t\t      || ( month == 12 ) )\n\t\t{\n\t\t\tdays_in_month = 31;\n\t\t}\n\t\t/* This should never happen, but just in case\n\t\t */\n\t\telse\n\t\t{\n\t\t\tPyErr_Format(\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unsupported month: %\" PRIu8 \".\",\n\t\t\t function,\n\t\t\t month );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tif( number_of_days <= days_in_month )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tnumber_of_days -= days_in_month;\n\n\t\tmonth += 1;\n\t}\n\t/* Determine the day\n\t */\n\tday_of_month = (uint8_t) number_of_days;\n\n\tPyDateTime_IMPORT;\n\n\tdatetime_object = (PyObject *) PyDateTime_FromDateAndTime(\n\t                                (int) year,\n\t                                (int) month,\n\t                                (int) day_of_month,\n\t                                (int) hours,\n\t                                (int) minutes,\n\t                                (int) seconds,\n\t                                (int) micro_seconds );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a FAT date time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_fat_date_time(\n           uint32_t fat_date_time )\n{\n\tPyObject *datetime_object = NULL;\n\tstatic char *function     = \"pyfsntfs_datetime_new_from_fat_date_time\";\n\tuint16_t year             = 0;\n\tuint8_t day_of_month      = 0;\n\tuint8_t days_in_month     = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t month             = 0;\n\tuint8_t seconds           = 0;\n\n\t/* The day of month is stored in the next 5 bits\n\t */\n\tday_of_month    = fat_date_time & 0x1f;\n\tfat_date_time >>= 5;\n\n\t/* The month is stored in the next 4 bits\n\t */\n\tmonth           = fat_date_time & 0x0f;\n\tfat_date_time >>= 4;\n\n\t/* The year is stored in the next 7 bits starting at 1980\n\t */\n\tyear            = 1980 + ( fat_date_time & 0x7f );\n\tfat_date_time >>= 7;\n\n\t/* The number of seconds are stored in the lower 5 bits\n\t * in intervals of 2 seconds\n\t */\n\tseconds         = ( fat_date_time & 0x1f ) * 2;\n\tfat_date_time >>= 5;\n\n\t/* The number of minutes are stored in the next 6 bits\n\t */\n\tminutes         = fat_date_time & 0x3f;\n\tfat_date_time >>= 6;\n\n\t/* The number of hours are stored in the next 5 bits\n\t */\n\thours = fat_date_time & 0x1f;\n\n\t/* February (2)\n\t */\n\tif( month == 2 )\n\t{\n\t\tif( ( ( ( year % 4 ) == 0 )\n\t\t  &&  ( ( year % 100 ) != 0 ) )\n\t\t || ( ( year % 400 ) == 0 ) )\n\t\t{\n\t\t\tdays_in_month = 29;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdays_in_month = 28;\n\t\t}\n\t}\n\t/* April (4), June (6), September (9), November (11)\n\t */\n\telse if( ( month == 4 )\n\t      || ( month == 6 )\n\t      || ( month == 9 )\n\t      || ( month == 11 ) )\n\t{\n\t\tdays_in_month = 30;\n\t}\n\t/* January (1), March (3), May (5), July (7), August (8), October (10), December (12)\n\t */\n\telse if( ( month == 1 )\n\t      || ( month == 3 )\n\t      || ( month == 5 )\n\t      || ( month == 7 )\n\t      || ( month == 8 )\n\t      || ( month == 10 )\n\t      || ( month == 12 ) )\n\t{\n\t\tdays_in_month = 31;\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: unsupported month: %\" PRIu8 \".\",\n\t\t function,\n\t\t month );\n\n\t\treturn( NULL );\n\t}\n\tif( ( day_of_month == 0 )\n\t || ( day_of_month > days_in_month ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: unsupported day of month: %\" PRIu8 \".\",\n\t\t function,\n\t\t day_of_month );\n\n\t\treturn( NULL );\n\t}\n\tPyDateTime_IMPORT;\n\n\tdatetime_object = (PyObject *) PyDateTime_FromDateAndTime(\n\t                                (int) year,\n\t                                (int) month,\n\t                                (int) day_of_month,\n\t                                (int) hours,\n\t                                (int) minutes,\n\t                                (int) seconds,\n\t                                0 );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a FILETIME\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_filetime(\n           uint64_t filetime )\n{\n\tPyObject *datetime_object = NULL;\n\tuint32_t micro_seconds    = 0;\n\tuint16_t year             = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t seconds           = 0;\n\n\t/* The timestamp is in units of 100 nano seconds correct the value to seconds\n\t */\n\tmicro_seconds = (uint32_t) ( filetime % 10000000 ) / 10;\n\tfiletime      /= 10000000;\n\n\t/* There are 60 seconds in a minute correct the value to minutes\n\t */\n\tseconds   = (uint8_t) ( filetime % 60 );\n\tfiletime /= 60;\n\n\t/* There are 60 minutes in an hour correct the value to hours\n\t */\n\tminutes   = (uint8_t) ( filetime % 60 );\n\tfiletime /= 60;\n\n\t/* There are 24 hours in a day correct the value to days\n\t */\n\thours     = (uint8_t) ( filetime % 24 );\n\tfiletime /= 24;\n\n\t/* Add 1 day to compensate that Jan 1 1601 is represented as 0\n\t */\n\tfiletime += 1;\n\n\t/* Determine the number of years starting at '1 Jan 1601 00:00:00'\n\t * correct the value to days within the year\n\t */\n\tyear = 1601;\n\n\tif( filetime >= 36159 )\n\t{\n\t\tyear = 1700;\n\n\t\tfiletime -= 36159;\n\t}\n\tdatetime_object = pyfsntfs_datetime_new_from_time_elements(\n\t                   year,\n\t                   filetime,\n\t                   hours,\n\t                   minutes,\n\t                   seconds,\n\t                   micro_seconds );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a floatingtime\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_floatingtime(\n           uint64_t floatingtime )\n{\n\tbyte_stream_float64_t timestamp;\n\n\tPyObject *datetime_object = NULL;\n\tstatic char *function     = \"pyfsntfs_datetime_new_from_floatingtime\";\n\tuint32_t days_in_century  = 0;\n\tuint32_t micro_seconds    = 0;\n\tuint16_t days_in_year     = 0;\n\tuint16_t year             = 0;\n\tuint8_t day_of_month      = 0;\n\tuint8_t days_in_month     = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t month             = 0;\n\tuint8_t seconds           = 0;\n\n\ttimestamp.integer = floatingtime;\n\n\t/* Determine the number of years starting at '30 Dec 1899 00:00:00'\n\t * correct the value to days within the year\n\t */\n\tyear = 1899;\n\n\tif( timestamp.floating_point >= 2 )\n\t{\n\t\tyear = 1900;\n\n\t\ttimestamp.floating_point -= 2;\n\t}\n\twhile( timestamp.floating_point > 0 )\n\t{\n\t\tif( ( year % 400 ) == 0 )\n\t\t{\n\t\t\tdays_in_century = 36525;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdays_in_century = 36524;\n\t\t}\n\t\tif( timestamp.floating_point <= days_in_century )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ttimestamp.floating_point -= days_in_century;\n\n\t\tyear += 100;\n\t}\n\twhile( timestamp.floating_point > 0 )\n\t{\n\t\t/* Check for a leap year\n\t\t * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 )\n\t\t */\n\t\tif( ( ( ( year % 4 ) == 0 )\n\t\t  &&  ( ( year % 100 ) != 0 ) )\n\t\t || ( ( year % 400 ) == 0 ) )\n\t\t{\n\t\t\tdays_in_year = 366;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdays_in_year = 365;\n\t\t}\n\t\tif( timestamp.floating_point <= days_in_year )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ttimestamp.floating_point -= days_in_year;\n\n\t\tyear += 1;\n\t}\n\t/* Determine the month correct the value to days within the month\n\t */\n\tmonth = 1;\n\n\twhile( timestamp.floating_point > 0 )\n\t{\n\t\t/* February (2)\n\t\t */\n\t\tif( month == 2 )\n\t\t{\n\t\t\tif( ( ( ( year % 4 ) == 0 )\n\t\t\t  &&  ( ( year % 100 ) != 0 ) )\n\t\t\t || ( ( year % 400 ) == 0 ) )\n\t\t\t{\n\t\t\t\tdays_in_month = 29;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdays_in_month = 28;\n\t\t\t}\n\t\t}\n\t\t/* April (4), June (6), September (9), November (11)\n\t\t */\n\t\telse if( ( month == 4 )\n\t\t      || ( month == 6 )\n\t\t      || ( month == 9 )\n\t\t      || ( month == 11 ) )\n\t\t{\n\t\t\tdays_in_month = 30;\n\t\t}\n\t\t/* January (1), March (3), May (5), July (7), August (8), October (10), December (12)\n\t\t */\n\t\telse if( ( month == 1 )\n\t\t      || ( month == 3 )\n\t\t      || ( month == 5 )\n\t\t      || ( month == 7 )\n\t\t      || ( month == 8 )\n\t\t      || ( month == 10 )\n\t\t      || ( month == 12 ) )\n\t\t{\n\t\t\tdays_in_month = 31;\n\t\t}\n\t\t/* This should never happen, but just in case\n\t\t */\n\t\telse\n\t\t{\n\t\t\tPyErr_Format(\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unsupported month: %\" PRIu8 \".\",\n\t\t\t function,\n\t\t\t month );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tif( timestamp.floating_point <= days_in_month )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\ttimestamp.floating_point -= days_in_month;\n\n\t\tmonth += 1;\n\t}\n\t/* Determine the day\n\t */\n\tday_of_month              = (uint8_t) timestamp.floating_point;\n\ttimestamp.floating_point -= day_of_month;\n\n\t/* There are 24 hours in a day correct the value to hours\n\t */\n\ttimestamp.floating_point *= 24;\n\thours                     = (uint8_t) timestamp.floating_point;\n\ttimestamp.floating_point -= hours;\n\n\t/* There are 60 minutes in an hour correct the value to minutes\n\t */\n\ttimestamp.floating_point *= 60;\n\tminutes                   = (uint8_t) timestamp.floating_point;\n\ttimestamp.floating_point -= minutes;\n\n\t/* There are 60 seconds in a minute correct the value to seconds\n\t */\n\ttimestamp.floating_point *= 60;\n\tseconds                   = (uint8_t) timestamp.floating_point;\n\ttimestamp.floating_point -= seconds;\n\n\t/* There are 1000 micro seconds in a seconds correct the value to micro seconds\n\t */\n\ttimestamp.floating_point *= 1000000;\n\tmicro_seconds             = (uint8_t) timestamp.floating_point;\n\ttimestamp.floating_point -= micro_seconds;\n\n\tPyDateTime_IMPORT;\n\n\tdatetime_object = (PyObject *) PyDateTime_FromDateAndTime(\n\t                                (int) year,\n\t                                (int) month,\n\t                                (int) day_of_month,\n\t                                (int) hours,\n\t                                (int) minutes,\n\t                                (int) seconds,\n\t                                (int) micro_seconds );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a HFS time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_hfs_time(\n           uint32_t hfs_time )\n{\n\tPyObject *datetime_object = NULL;\n\tuint16_t year             = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t seconds           = 0;\n\n\t/* There are 60 seconds in a minute correct the value to minutes\n\t */\n\tseconds   = (uint8_t) ( hfs_time % 60 );\n\thfs_time /= 60;\n\n\t/* There are 60 minutes in an hour correct the value to hours\n\t */\n\tminutes   = (uint8_t) ( hfs_time % 60 );\n\thfs_time /= 60;\n\n\t/* There are 24 hours in a day correct the value to days\n\t */\n\thours     = (uint8_t) ( hfs_time % 24 );\n\thfs_time /= 24;\n\n\t/* Add 1 day to compensate that Jan 1 1904 is represented as 0\n\t */\n\thfs_time += 1;\n\n\t/* Determine the number of years starting at '1 Jan 1904 00:00:00'\n\t * correct the value to days within the year\n\t */\n\tyear = 1904;\n\n\tif( hfs_time >= 35064 )\n\t{\n\t\tyear = 2000;\n\n\t\thfs_time -= 35064;\n\t}\n\tdatetime_object = pyfsntfs_datetime_new_from_time_elements(\n\t                   year,\n\t                   (uint64_t) hfs_time,\n\t                   hours,\n\t                   minutes,\n\t                   seconds,\n\t                   0 );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a POSIX time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_posix_time(\n           int64_t posix_time )\n{\n\tPyObject *datetime_object = NULL;\n\tuint16_t year             = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t seconds           = 0;\n\n\t/* There are 60 seconds in a minute correct the value to minutes\n\t */\n\tseconds     = posix_time % 60;\n\tposix_time /= 60;\n\n\t/* There are 60 minutes in an hour correct the value to hours\n\t */\n\tminutes     = posix_time % 60;\n\tposix_time /= 60;\n\n\t/* There are 24 hours in a day correct the value to days\n\t */\n\thours       = posix_time % 24;\n\tposix_time /= 24;\n\n\t/* Add 1 day to compensate that Jan 1 1601 is represented as 0\n\t */\n\tposix_time += 1;\n\n\t/* Determine the number of years starting at '1 Jan 1970 00:00:00'\n\t * correct the value to days within the year\n\t */\n\tyear = 1970;\n\n\tif( posix_time >= 10957 )\n\t{\n\t\tyear = 2000;\n\n\t\tposix_time -= 10957;\n\t}\n\tdatetime_object = pyfsntfs_datetime_new_from_time_elements(\n\t                   year,\n\t                   (uint64_t) posix_time,\n\t                   hours,\n\t                   minutes,\n\t                   seconds,\n\t                   0 );\n\n\treturn( datetime_object );\n}\n\n/* Creates a new datetime object from a POSIX time in micro seconds\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_datetime_new_from_posix_time_in_micro_seconds(\n           int64_t posix_time )\n{\n\tPyObject *datetime_object = NULL;\n\tuint32_t micro_seconds    = 0;\n\tuint16_t year             = 0;\n\tuint8_t hours             = 0;\n\tuint8_t minutes           = 0;\n\tuint8_t seconds           = 0;\n\n\t/* There are 1000000 micro seconds in a second correct the value to seconds\n\t */\n\tmicro_seconds = (uint32_t) ( posix_time % 1000000 );\n\tposix_time   /= 1000000;\n\n\t/* There are 60 seconds in a minute correct the value to minutes\n\t */\n\tseconds     = posix_time % 60;\n\tposix_time /= 60;\n\n\t/* There are 60 minutes in an hour correct the value to hours\n\t */\n\tminutes     = posix_time % 60;\n\tposix_time /= 60;\n\n\t/* There are 24 hours in a day correct the value to days\n\t */\n\thours       = posix_time % 24;\n\tposix_time /= 24;\n\n\t/* Add 1 day to compensate that Jan 1 1970 is represented as 0\n\t */\n\tposix_time += 1;\n\n\t/* Determine the number of years starting at '1 Jan 1970 00:00:00'\n\t * correct the value to days within the year\n\t */\n\tyear = 1970;\n\n\tif( posix_time >= 10957 )\n\t{\n\t\tyear = 2000;\n\n\t\tposix_time -= 10957;\n\t}\n\tdatetime_object = pyfsntfs_datetime_new_from_time_elements(\n\t                   year,\n\t                   (uint64_t) posix_time,\n\t                   hours,\n\t                   minutes,\n\t                   seconds,\n\t                   micro_seconds );\n\n\treturn( datetime_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_datetime.h",
    "content": "/*\n * Date and time functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_DATETIME_H )\n#define _PYFSNTFS_DATETIME_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nPyObject *pyfsntfs_datetime_new_from_time_elements(\n           uint16_t year,\n           uint64_t number_of_days,\n           uint8_t hours,\n           uint8_t minutes,\n           uint8_t seconds,\n           uint32_t micro_seconds );\n\nPyObject *pyfsntfs_datetime_new_from_fat_date_time(\n           uint32_t fat_date_time );\n\nPyObject *pyfsntfs_datetime_new_from_filetime(\n           uint64_t filetime );\n\nPyObject *pyfsntfs_datetime_new_from_floatingtime(\n           uint64_t floatingtime );\n\nPyObject *pyfsntfs_datetime_new_from_hfs_time(\n           uint32_t hfs_time );\n\nPyObject *pyfsntfs_datetime_new_from_posix_time(\n           int64_t posix_time );\n\nPyObject *pyfsntfs_datetime_new_from_posix_time_in_micro_seconds(\n           int64_t posix_time );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_DATETIME_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_error.c",
    "content": "/*\n * Error functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#if defined( HAVE_STDARG_H ) || defined( WINAPI )\n#include <stdarg.h>\n#elif defined( HAVE_VARARGS_H )\n#include <varargs.h>\n#else\n#error Missing headers stdarg.h and varargs.h\n#endif\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( HAVE_STDARG_H ) || defined( WINAPI )\n#define VARARGS( function, error, error_domain, error_code, type, argument ) \\\n\tfunction( error, error_domain, error_code, type argument, ... )\n#define VASTART( argument_list, type, name ) \\\n\tva_start( argument_list, name )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list )\n\n#elif defined( HAVE_VARARGS_H )\n#define VARARGS( function, error, error_domain, error_code, type, argument ) \\\n\tfunction( error, error_domain, error_code, va_alist ) va_dcl\n#define VASTART( argument_list, type, name ) \\\n\t{ type name; va_start( argument_list ); name = va_arg( argument_list, type )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list ); }\n\n#endif\n\n/* Fetches an error\n */\nvoid VARARGS(\n      pyfsntfs_error_fetch,\n      libcerror_error_t **error,\n      int error_domain,\n      int error_code,\n      const char *,\n      format_string )\n{\n\tva_list argument_list;\n\n\tchar error_string[ PYFSNTFS_ERROR_STRING_SIZE ];\n\n        PyObject *exception_traceback = NULL;\n        PyObject *exception_type      = NULL;\n        PyObject *exception_value     = NULL;\n        PyObject *string_object       = NULL;\n\tstatic char *function         = \"pyfsntfs_error_fetch\";\n\tchar *exception_string        = NULL;\n\tsize_t error_string_length    = 0;\n\tint print_count               = 0;\n\n#if PY_MAJOR_VERSION >= 3\n\tPyObject *utf8_string_object  = NULL;\n#endif\n\n\tif( format_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing format string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tVASTART(\n\t argument_list,\n\t const char *,\n\t format_string );\n\n\tprint_count = PyOS_vsnprintf(\n\t               error_string,\n\t               PYFSNTFS_ERROR_STRING_SIZE,\n\t               format_string,\n\t               argument_list );\n\n\tVAEND(\n\t argument_list );\n\n\tif( print_count < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unable to format error string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\terror_string_length = narrow_string_length(\n\t                       error_string );\n\n\tif( ( error_string_length >= 1 )\n\t && ( error_string[ error_string_length - 1 ] == '.' ) )\n\t{\n\t\terror_string[ error_string_length - 1 ] = 0;\n\t}\n\tPyErr_Fetch(\n\t &exception_type,\n\t &exception_value,\n\t &exception_traceback );\n\n\tstring_object = PyObject_Repr(\n\t                 exception_value );\n\n#if PY_MAJOR_VERSION >= 3\n\tutf8_string_object = PyUnicode_AsUTF8String(\n\t                      string_object );\n\n\tif( utf8_string_object != NULL )\n\t{\n\t\texception_string = PyBytes_AsString(\n\t\t                    utf8_string_object );\n\t}\n#else\n\texception_string = PyString_AsString(\n\t                    string_object );\n#endif\n\tif( exception_string != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t error_domain,\n\t\t error_code,\n\t\t \"%s with error: %s.\",\n\t\t error_string,\n\t\t exception_string );\n\t}\n\telse\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t error_domain,\n\t\t error_code,\n\t\t \"%s.\",\n\t\t error_string );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tif( utf8_string_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n\t}\n#endif\n\tPy_DecRef(\n\t string_object );\n\n\treturn;\n}\n\n#undef VARARGS\n#undef VASTART\n#undef VAEND\n\n#if defined( HAVE_STDARG_H ) || defined( WINAPI )\n#define VARARGS( function, exception_object, type, argument ) \\\n\tfunction( exception_object, type argument, ... )\n#define VASTART( argument_list, type, name ) \\\n\tva_start( argument_list, name )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list )\n\n#elif defined( HAVE_VARARGS_H )\n#define VARARGS( function, exception_object, type, argument ) \\\n\tfunction( exception_object, va_alist ) va_dcl\n#define VASTART( argument_list, type, name ) \\\n\t{ type name; va_start( argument_list ); name = va_arg( argument_list, type )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list ); }\n\n#endif\n\n/* Fetches and raises an error\n */\nvoid VARARGS(\n      pyfsntfs_error_fetch_and_raise,\n      PyObject *exception_object,\n      const char *,\n      format_string )\n{\n\tva_list argument_list;\n\n\tchar error_string[ PYFSNTFS_ERROR_STRING_SIZE ];\n\n\tPyObject *exception_traceback = NULL;\n\tPyObject *exception_type      = NULL;\n\tPyObject *exception_value     = NULL;\n\tPyObject *string_object       = NULL;\n\tstatic char *function         = \"pyfsntfs_error_fetch_and_raise\";\n\tchar *exception_string        = NULL;\n\tsize_t error_string_length    = 0;\n\tint print_count               = 0;\n\n#if PY_MAJOR_VERSION >= 3\n\tPyObject *utf8_string_object  = NULL;\n#endif\n\n\tif( format_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing format string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tVASTART(\n\t argument_list,\n\t const char *,\n\t format_string );\n\n\tprint_count = PyOS_vsnprintf(\n\t               error_string,\n\t               PYFSNTFS_ERROR_STRING_SIZE,\n\t               format_string,\n\t               argument_list );\n\n\tVAEND(\n\t argument_list );\n\n\tif( print_count < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unable to format exception string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\terror_string_length = narrow_string_length(\n\t                       error_string );\n\n\tif( ( error_string_length >= 1 )\n\t && ( error_string[ error_string_length - 1 ] == '.' ) )\n\t{\n\t\terror_string[ error_string_length - 1 ] = 0;\n\t}\n\tPyErr_Fetch(\n\t &exception_type,\n\t &exception_value,\n\t &exception_traceback );\n\n\tstring_object = PyObject_Repr(\n\t                 exception_value );\n\n#if PY_MAJOR_VERSION >= 3\n\tutf8_string_object = PyUnicode_AsUTF8String(\n\t                      string_object );\n\n\tif( utf8_string_object != NULL )\n\t{\n\t\texception_string = PyBytes_AsString(\n\t\t                    utf8_string_object );\n\t}\n#else\n\texception_string = PyString_AsString(\n\t                    string_object );\n#endif\n\tif( exception_string != NULL )\n\t{\n\t\tPyErr_Format(\n\t\t exception_object,\n\t\t \"%s with error: %s.\",\n\t\t error_string,\n\t\t exception_string );\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t exception_object,\n\t\t \"%s.\",\n\t\t error_string );\n\t}\n\tPy_DecRef(\n\t string_object );\n\n\treturn;\n}\n\n#undef VARARGS\n#undef VASTART\n#undef VAEND\n\n#if defined( HAVE_STDARG_H ) || defined( WINAPI )\n#define VARARGS( function, error, exception_object, type, argument ) \\\n\tfunction( error, exception_object, type argument, ... )\n#define VASTART( argument_list, type, name ) \\\n\tva_start( argument_list, name )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list )\n\n#elif defined( HAVE_VARARGS_H )\n#define VARARGS( function, error, exception_object, type, argument ) \\\n\tfunction( error, exception_object, va_alist ) va_dcl\n#define VASTART( argument_list, type, name ) \\\n\t{ type name; va_start( argument_list ); name = va_arg( argument_list, type )\n#define VAEND( argument_list ) \\\n\tva_end( argument_list ); }\n\n#endif\n\n/* Raises an error\n */\nvoid VARARGS(\n      pyfsntfs_error_raise,\n      libcerror_error_t *error,\n      PyObject *exception_object,\n      const char *,\n      format_string )\n{\n\tva_list argument_list;\n\n\tchar error_string[ PYFSNTFS_ERROR_STRING_SIZE ];\n\tchar exception_string[ PYFSNTFS_ERROR_STRING_SIZE ];\n\n\tstatic char *function     = \"pyfsntfs_error_raise\";\n\tsize_t error_string_index = 0;\n\tint print_count           = 0;\n\n\tif( format_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing format string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tVASTART(\n\t argument_list,\n\t const char *,\n\t format_string );\n\n\tprint_count = PyOS_vsnprintf(\n\t               exception_string,\n\t               PYFSNTFS_ERROR_STRING_SIZE,\n\t               format_string,\n\t               argument_list );\n\n\tVAEND(\n\t argument_list );\n\n\tif( print_count < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unable to format exception string.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( error != NULL )\n\t{\n\t\tif( libcerror_error_backtrace_sprint(\n\t\t     error,\n\t\t     error_string,\n\t\t     PYFSNTFS_ERROR_STRING_SIZE ) != -1 )\n\t\t{\n\t\t\twhile( error_string_index < PYFSNTFS_ERROR_STRING_SIZE )\n\t\t\t{\n\t\t\t\tif( error_string[ error_string_index ] == 0 )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( ( error_string[ error_string_index ] == '\\n' )\n\t\t\t\t || ( error_string[ error_string_index ] == '\\r' ) )\n\t\t\t\t{\n\t\t\t\t\terror_string[ error_string_index ] = ' ';\n\t\t\t\t}\n\t\t\t\terror_string_index++;\n\t\t\t}\n\t\t\tif( error_string_index >= PYFSNTFS_ERROR_STRING_SIZE )\n\t\t\t{\n\t\t\t\terror_string[ PYFSNTFS_ERROR_STRING_SIZE - 1 ] = 0;\n\t\t\t}\n\t\t\tPyErr_Format(\n\t\t\t exception_object,\n\t\t\t \"%s %s\",\n\t\t\t exception_string,\n\t\t\t error_string );\n\n\t\t\treturn;\n\t\t}\n\t}\n\tPyErr_Format(\n\t exception_object,\n\t \"%s\",\n\t exception_string );\n\n\treturn;\n}\n\n#undef VARARGS\n#undef VASTART\n#undef VAEND\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_error.h",
    "content": "/*\n * Error functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_ERROR_H )\n#define _PYFSNTFS_ERROR_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n#define PYFSNTFS_ERROR_STRING_SIZE\t2048\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nvoid pyfsntfs_error_fetch(\n      libcerror_error_t **error,\n      int error_domain,\n      int error_code,\n      const char *format_string,\n      ... );\n\nvoid pyfsntfs_error_fetch_and_raise(\n      PyObject *exception_object,\n      const char *format_string,\n      ... );\n\nvoid pyfsntfs_error_raise(\n      libcerror_error_t *error,\n      PyObject *exception_object,\n      const char *format_string,\n      ... );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_ERROR_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_attribute_flags.c",
    "content": "/*\n * Python object definition of the libfsntfs file attribute flags\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_file_attribute_flags.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyTypeObject pyfsntfs_file_attribute_flags_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.file_attribute_flags\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_file_attribute_flags_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_file_attribute_flags_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs file attribute flags object (wraps LIBFSNTFS_FILE_ATTRIBUTE_FLAGS)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_file_attribute_flags_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Initializes the type object\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_attribute_flags_init_type(\n     PyTypeObject *type_object )\n{\n\tPyObject *value_object = NULL;\n\n\tif( type_object == NULL )\n\t{\n\t\treturn( -1 );\n\t}\n\ttype_object->tp_dict = PyDict_New();\n\n\tif( type_object->tp_dict == NULL )\n\t{\n\t\treturn( -1 );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_READ_ONLY );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"READ_ONLY\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_HIDDEN );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"HIDDEN\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SYSTEM );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"SYSTEM\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DIRECTORY );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"DIRECTORY\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ARCHIVE );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"ARCHIVE\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_DEVICE );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"DEVICE\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NORMAL );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"NORMAL\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_TEMPORARY );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"TEMPORARY\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_SPARSE_FILE );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"SPARSE_FILE\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_REPARSE_POINT );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"REPARSE_POINT\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_COMPRESSED );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"COMPRESSED\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_OFFLINE );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"OFFLINE\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"NOT_CONTENT_INDEXED\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_ENCRYPTED );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"ENCRYPTED\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tvalue_object = PyLong_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL );\n#else\n\tvalue_object = PyInt_FromLong(\n\t                LIBFSNTFS_FILE_ATTRIBUTE_FLAG_VIRTUAL );\n#endif\n\tif( PyDict_SetItemString(\n\t     type_object->tp_dict,\n\t     \"VIRTUAL\",\n\t     value_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( type_object->tp_dict != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t type_object->tp_dict );\n\n\t\ttype_object->tp_dict = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Creates a new file attribute flags object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_attribute_flags_new(\n           void )\n{\n\tpyfsntfs_file_attribute_flags_t *definitions_object = NULL;\n\tstatic char *function                               = \"pyfsntfs_file_attribute_flags_new\";\n\n\tdefinitions_object = PyObject_New(\n\t                      struct pyfsntfs_file_attribute_flags,\n\t                      &pyfsntfs_file_attribute_flags_type_object );\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create definitions object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_file_attribute_flags_init(\n\t     definitions_object ) != 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize definitions object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( (PyObject *) definitions_object );\n\non_error:\n\tif( definitions_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) definitions_object );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a file attribute flags object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_file_attribute_flags_init(\n     pyfsntfs_file_attribute_flags_t *definitions_object )\n{\n\tstatic char *function = \"pyfsntfs_file_attribute_flags_init\";\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid definitions object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 0 );\n}\n\n/* Frees a file attribute flags object\n */\nvoid pyfsntfs_file_attribute_flags_free(\n      pyfsntfs_file_attribute_flags_t *definitions_object )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_file_attribute_flags_free\";\n\n\tif( definitions_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid definitions object.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           definitions_object );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type->tp_free(\n\t (PyObject*) definitions_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_attribute_flags.h",
    "content": "/*\n * Python object definition of the libfsntfs file attribute flags\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_FILE_ATTRIBUTE_FLAGS_H )\n#define _PYFSNTFS_FILE_ATTRIBUTE_FLAGS_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_file_attribute_flags pyfsntfs_file_attribute_flags_t;\n\nstruct pyfsntfs_file_attribute_flags\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n};\n\nextern PyTypeObject pyfsntfs_file_attribute_flags_type_object;\n\nint pyfsntfs_file_attribute_flags_init_type(\n     PyTypeObject *type_object );\n\nPyObject *pyfsntfs_file_attribute_flags_new(\n           void );\n\nint pyfsntfs_file_attribute_flags_init(\n     pyfsntfs_file_attribute_flags_t *definitions_object );\n\nvoid pyfsntfs_file_attribute_flags_free(\n      pyfsntfs_file_attribute_flags_t *definitions_object );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_FILE_ATTRIBUTE_FLAGS_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_entries.c",
    "content": "/*\n * Python object definition of the sequence and iterator object of file entries\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_file_entries.h\"\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\nPySequenceMethods pyfsntfs_file_entries_sequence_methods = {\n\t/* sq_length */\n\t(lenfunc) pyfsntfs_file_entries_len,\n\t/* sq_concat */\n\t0,\n\t/* sq_repeat */\n\t0,\n\t/* sq_item */\n\t(ssizeargfunc) pyfsntfs_file_entries_getitem,\n\t/* sq_slice */\n\t0,\n\t/* sq_ass_item */\n\t0,\n\t/* sq_ass_slice */\n\t0,\n\t/* sq_contains */\n\t0,\n\t/* sq_inplace_concat */\n\t0,\n\t/* sq_inplace_repeat */\n\t0\n};\n\nPyTypeObject pyfsntfs_file_entries_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.file_entries\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_file_entries_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_file_entries_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t&pyfsntfs_file_entries_sequence_methods,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,\n\t/* tp_doc */\n\t\"pyfsntfs sequence and iterator object of file entries\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t(getiterfunc) pyfsntfs_file_entries_iter,\n\t/* tp_iternext */\n\t(iternextfunc) pyfsntfs_file_entries_iternext,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_file_entries_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new file entries sequence and iterator object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entries_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items )\n{\n\tpyfsntfs_file_entries_t *sequence_object = NULL;\n\tstatic char *function                    = \"pyfsntfs_file_entries_new\";\n\n\tif( parent_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid parent object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Make sure the file entries values are initialized\n\t */\n\tsequence_object = PyObject_New(\n\t                   struct pyfsntfs_file_entries,\n\t                   &pyfsntfs_file_entries_type_object );\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create sequence object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsequence_object->parent_object     = parent_object;\n\tsequence_object->get_item_by_index = get_item_by_index;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = number_of_items;\n\n\tPy_IncRef(\n\t (PyObject *) sequence_object->parent_object );\n\n\treturn( (PyObject *) sequence_object );\n\non_error:\n\tif( sequence_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a file entries sequence and iterator object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_file_entries_init(\n     pyfsntfs_file_entries_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_file_entries_init\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure the file entries values are initialized\n\t */\n\tsequence_object->parent_object     = NULL;\n\tsequence_object->get_item_by_index = NULL;\n\tsequence_object->current_index     = 0;\n\tsequence_object->number_of_items   = 0;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of file entries not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees a file entries sequence object\n */\nvoid pyfsntfs_file_entries_free(\n      pyfsntfs_file_entries_t *sequence_object )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entries_free\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           sequence_object );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( sequence_object->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) sequence_object->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) sequence_object );\n}\n\n/* The file entries len() function\n */\nPy_ssize_t pyfsntfs_file_entries_len(\n            pyfsntfs_file_entries_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_file_entries_len\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (Py_ssize_t) sequence_object->number_of_items );\n}\n\n/* The file entries getitem() function\n */\nPyObject *pyfsntfs_file_entries_getitem(\n           pyfsntfs_file_entries_t *sequence_object,\n           Py_ssize_t item_index )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entries_getitem\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( item_index < 0 )\n\t || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid invalid item index value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = sequence_object->get_item_by_index(\n\t                     sequence_object->parent_object,\n\t                     (int) item_index );\n\n\treturn( file_entry_object );\n}\n\n/* The file entries iter() function\n */\nPyObject *pyfsntfs_file_entries_iter(\n           pyfsntfs_file_entries_t *sequence_object )\n{\n\tstatic char *function = \"pyfsntfs_file_entries_iter\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t (PyObject *) sequence_object );\n\n\treturn( (PyObject *) sequence_object );\n}\n\n/* The file entries iternext() function\n */\nPyObject *pyfsntfs_file_entries_iternext(\n           pyfsntfs_file_entries_t *sequence_object )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entries_iternext\";\n\n\tif( sequence_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->get_item_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - missing get item by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid current index.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->number_of_items < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid sequence object - invalid number of items.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( sequence_object->current_index >= sequence_object->number_of_items )\n\t{\n\t\tPyErr_SetNone(\n\t\t PyExc_StopIteration );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = sequence_object->get_item_by_index(\n\t                     sequence_object->parent_object,\n\t                     sequence_object->current_index );\n\n\tif( file_entry_object != NULL )\n\t{\n\t\tsequence_object->current_index++;\n\t}\n\treturn( file_entry_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_entries.h",
    "content": "/*\n * Python object definition of the sequence and iterator object of file entries\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_FILE_ENTRIES_H )\n#define _PYFSNTFS_FILE_ENTRIES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_file_entries pyfsntfs_file_entries_t;\n\nstruct pyfsntfs_file_entries\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n\n\t/* The get item by index callback function\n\t */\n\tPyObject* (*get_item_by_index)(\n\t             PyObject *parent_object,\n\t             int index );\n\n\t/* The current index\n\t */\n\tint current_index;\n\n\t/* The number of items\n\t */\n\tint number_of_items;\n};\n\nextern PyTypeObject pyfsntfs_file_entries_type_object;\n\nPyObject *pyfsntfs_file_entries_new(\n           PyObject *parent_object,\n           PyObject* (*get_item_by_index)(\n                        PyObject *parent_object,\n                        int index ),\n           int number_of_items );\n\nint pyfsntfs_file_entries_init(\n     pyfsntfs_file_entries_t *sequence_object );\n\nvoid pyfsntfs_file_entries_free(\n      pyfsntfs_file_entries_t *sequence_object );\n\nPy_ssize_t pyfsntfs_file_entries_len(\n            pyfsntfs_file_entries_t *sequence_object );\n\nPyObject *pyfsntfs_file_entries_getitem(\n           pyfsntfs_file_entries_t *sequence_object,\n           Py_ssize_t item_index );\n\nPyObject *pyfsntfs_file_entries_iter(\n           pyfsntfs_file_entries_t *sequence_object );\n\nPyObject *pyfsntfs_file_entries_iternext(\n           pyfsntfs_file_entries_t *sequence_object );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_FILE_ENTRIES_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_entry.c",
    "content": "/*\n * Python object wrapper of libfsntfs_file_entry_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_attributes.h\"\n#include \"pyfsntfs_data_stream.h\"\n#include \"pyfsntfs_data_streams.h\"\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_entries.h\"\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_file_name_attribute.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_object_identifier_attribute.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_reparse_point_attribute.h\"\n#include \"pyfsntfs_security_descriptor_attribute.h\"\n#include \"pyfsntfs_standard_information_attribute.h\"\n#include \"pyfsntfs_string.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_volume_information_attribute.h\"\n#include \"pyfsntfs_volume_name_attribute.h\"\n\nPyMethodDef pyfsntfs_file_entry_object_methods[] = {\n\n\t/* Functions to access the file entry data */\n\n\t{ \"read_buffer\",\n\t  (PyCFunction) pyfsntfs_file_entry_read_buffer,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read_buffer(size) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of file entry data.\" },\n\n\t{ \"read_buffer_at_offset\",\n\t  (PyCFunction) pyfsntfs_file_entry_read_buffer_at_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read_buffer_at_offset(size, offset) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of file entry data at a specific offset.\" },\n\n\t{ \"seek_offset\",\n\t  (PyCFunction) pyfsntfs_file_entry_seek_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"seek_offset(offset, whence) -> None\\n\"\n\t  \"\\n\"\n\t  \"Seeks an offset within the file entry data.\" },\n\n\t{ \"get_offset\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_offset,\n\t  METH_NOARGS,\n\t  \"get_offset() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the current offset within the file entry data.\" },\n\n\t/* Some Pythonesque aliases */\n\n\t{ \"read\",\n\t  (PyCFunction) pyfsntfs_file_entry_read_buffer,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"read(size) -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads a buffer of file entry data.\" },\n\n\t{ \"seek\",\n\t  (PyCFunction) pyfsntfs_file_entry_seek_offset,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"seek(offset, whence) -> None\\n\"\n\t  \"\\n\"\n\t  \"Seeks an offset within the file entry data.\" },\n\n\t{ \"tell\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_offset,\n\t  METH_NOARGS,\n\t  \"tell() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the current offset within the file entry data.\" },\n\n\t/* Functions to access the metadata */\n\n\t{ \"get_size\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_size,\n\t  METH_NOARGS,\n\t  \"get_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the size data.\" },\n\n\t/* Functions to access the extents */\n\n\t{ \"get_number_of_extents\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_number_of_extents,\n\t  METH_NOARGS,\n\t  \"get_number_of_extents() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of extents.\" },\n\n\t{ \"get_extent\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_extent,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_extent(extent_index) -> Tuple(Integer, Integer, Integer)\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific extent.\\t\"\n          \"The extent is a tuple of offset, size and flags.\" },\n\n\t/* Functions to access the file entry data */\n\n\t{ \"is_empty\",\n\t  (PyCFunction) pyfsntfs_file_entry_is_empty,\n\t  METH_NOARGS,\n\t  \"is_empty() -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if the file entry is empty.\" },\n\n\t{ \"is_allocated\",\n\t  (PyCFunction) pyfsntfs_file_entry_is_allocated,\n\t  METH_NOARGS,\n\t  \"is_allocated() -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if the file entry is allocated.\" },\n\n\t{ \"has_directory_entries_index\",\n\t  (PyCFunction) pyfsntfs_file_entry_has_directory_entries_index,\n\t  METH_NOARGS,\n\t  \"has_directory_entries_index() -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if the file entry has a directory entries index.\" },\n\n\t{ \"has_default_data_stream\",\n\t  (PyCFunction) pyfsntfs_file_entry_has_default_data_stream,\n\t  METH_NOARGS,\n\t  \"has_default_data_stream() -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if the file entry has a default data stream.\" },\n\n\t{ \"has_i30_entry\",\n\t  (PyCFunction) pyfsntfs_file_entry_has_i30_entry,\n\t  METH_NOARGS,\n\t  \"i30_entry() -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if the file entry has a $I30 entry.\" },\n\n\t{ \"get_file_reference\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_file_reference,\n\t  METH_NOARGS,\n\t  \"get_file_reference() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_base_record_file_reference\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_base_record_file_reference,\n\t  METH_NOARGS,\n\t  \"get_base_record_file_reference() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the base record file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_parent_file_reference\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_parent_file_reference,\n\t  METH_NOARGS,\n\t  \"get_parent_file_reference() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the parent file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_parent_file_reference_by_attribute_index\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_parent_file_reference_by_attribute_index,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_parent_file_reference_by_attribute_index(attribute_index) -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the parent file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_journal_sequence_number\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_journal_sequence_number,\n\t  METH_NOARGS,\n\t  \"get_journal_sequence_number() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the journal sequence number.\" },\n\n\t{ \"get_creation_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_creation_time,\n\t  METH_NOARGS,\n\t  \"get_creation_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time.\" },\n\n\t{ \"get_creation_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_creation_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_creation_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_modification_time,\n\t  METH_NOARGS,\n\t  \"get_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time.\" },\n\n\t{ \"get_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_access_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_access_time,\n\t  METH_NOARGS,\n\t  \"get_access_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time.\" },\n\n\t{ \"get_access_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_access_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_access_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_entry_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_entry_modification_time,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time.\" },\n\n\t{ \"get_entry_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_entry_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_file_attribute_flags\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_file_attribute_flags,\n\t  METH_NOARGS,\n\t  \"get_file_attribute_flags() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the file attribute flags.\" },\n\n\t{ \"get_i30_file_reference\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_file_reference,\n\t  METH_NOARGS,\n\t  \"get_i30_file_reference() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_i30_creation_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_creation_time,\n\t  METH_NOARGS,\n\t  \"get_i30_creation_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry creation date and time.\" },\n\n\t{ \"get_i30_creation_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_creation_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_i30_creation_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry creation date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_i30_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_modification_time,\n\t  METH_NOARGS,\n\t  \"get_i30_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry modification date and time.\" },\n\n\t{ \"get_i30_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_i30_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_i30_access_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_access_time,\n\t  METH_NOARGS,\n\t  \"get_i30_access_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry access date and time.\" },\n\n\t{ \"get_i30_access_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_access_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_i30_access_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry access date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_i30_entry_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_entry_modification_time,\n\t  METH_NOARGS,\n\t  \"get_i30_entry_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry entry modification date and time.\" },\n\n\t{ \"get_i30_entry_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_entry_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_i30_entry_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry entry modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_i30_file_attribute_flags\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_i30_file_attribute_flags,\n\t  METH_NOARGS,\n\t  \"get_i30_file_attribute_flags() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the $I30 entry file attribute flags.\" },\n\n\t{ \"get_name\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_name,\n\t  METH_NOARGS,\n\t  \"get_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t{ \"get_name_attribute_index\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_name_attribute_index,\n\t  METH_NOARGS,\n\t  \"get_name_attribute_index() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the attribute index corresponding to the name.\" },\n\n\t{ \"get_name_by_attribute_index\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_name_by_attribute_index,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_name_by_attribute_index(attribute_index) -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t{ \"get_path_hint\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_path_hint,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_path_hint(attribute_index) -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t{ \"get_symbolic_link_target\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_symbolic_link_target,\n\t  METH_NOARGS,\n\t  \"get_symbolic_link_target() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the symbolic link target.\" },\n\n\t{ \"get_security_descriptor_data\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_security_descriptor_data,\n\t  METH_NOARGS,\n\t  \"get_security_descriptor_data() -> String or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the security descriptor data.\" },\n\n\t/* Functions to access the attributes */\n\n\t{ \"get_number_of_attributes\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_number_of_attributes,\n\t  METH_NOARGS,\n\t  \"get_number_of_attributes() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of attributes.\" },\n\n\t{ \"get_attribute\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_attribute,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_attribute(attribute_index) -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific attribute.\" },\n\n\t/* Functions to access the alternate data streams */\n\n\t{ \"get_number_of_alternate_data_streams\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_number_of_alternate_data_streams,\n\t  METH_NOARGS,\n\t  \"get_number_of_alternate_data_streams() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of alternate data streams.\" },\n\n\t{ \"get_alternate_data_stream\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_alternate_data_stream,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_alternate_data_stream(alternate_data_stream_index) -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific alternate data stream.\" },\n\n\t{ \"has_alternate_data_stream_by_name\",\n\t  (PyCFunction) pyfsntfs_file_entry_has_alternate_data_stream_by_name,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"has_alternate_data_stream_by_name(name) -> Boolean\\n\"\n\t  \"\\n\"\n\t  \"Determines if there is an alternate data stream specified by the name.\" },\n\n\t{ \"get_alternate_data_stream_by_name\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_alternate_data_stream_by_name,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_alternate_data_stream_by_name(name) -> Object or None\\n\"\n\t  \"\\n\"\n\t  \"Retrieves an alternate data stream specified by the name.\" },\n\n\t/* Functions to access the sub file entries */\n\n\t{ \"get_number_of_sub_file_entries\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_number_of_sub_file_entries,\n\t  METH_NOARGS,\n\t  \"get_number_of_sub_file_entries() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of sub file entries.\" },\n\n\t{ \"get_sub_file_entry\",\n\t  (PyCFunction) pyfsntfs_file_entry_get_sub_file_entry,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_sub_file_entry(sub_file_entry_index) -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific sub file entry.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_file_entry_object_get_set_definitions[] = {\n\n\t{ \"size\",\n\t  (getter) pyfsntfs_file_entry_get_size,\n\t  (setter) 0,\n\t  \"The size of the data.\",\n\t  NULL },\n\n\t{ \"number_of_extents\",\n\t  (getter) pyfsntfs_file_entry_get_number_of_extents,\n\t  (setter) 0,\n\t  \"The number of extents.\",\n\t  NULL },\n\n\t{ \"file_reference\",\n\t  (getter) pyfsntfs_file_entry_get_file_reference,\n\t  (setter) 0,\n\t  \"The file reference, a combination of MFT entry index and sequence number.\",\n\t  NULL },\n\n\t{ \"base_record_file_reference\",\n\t  (getter) pyfsntfs_file_entry_get_base_record_file_reference,\n\t  (setter) 0,\n\t  \"The base record file reference, a combination of MFT entry index and sequence number.\",\n\t  NULL },\n\n\t{ \"parent_file_reference\",\n\t  (getter) pyfsntfs_file_entry_get_parent_file_reference,\n\t  (setter) 0,\n\t  \"The parent file reference, a combination of MFT entry index and sequence number.\",\n\t  NULL },\n\n\t{ \"journal_sequence_number\",\n\t  (getter) pyfsntfs_file_entry_get_journal_sequence_number,\n\t  (setter) 0,\n\t  \"The journal sequence number.\",\n\t  NULL },\n\n\t{ \"creation_time\",\n\t  (getter) pyfsntfs_file_entry_get_creation_time,\n\t  (setter) 0,\n\t  \"The creation date and time.\",\n\t  NULL },\n\n\t{ \"modification_time\",\n\t  (getter) pyfsntfs_file_entry_get_modification_time,\n\t  (setter) 0,\n\t  \"The modification date and time.\",\n\t  NULL },\n\n\t{ \"access_time\",\n\t  (getter) pyfsntfs_file_entry_get_access_time,\n\t  (setter) 0,\n\t  \"The access date and time.\",\n\t  NULL },\n\n\t{ \"entry_modification_time\",\n\t  (getter) pyfsntfs_file_entry_get_entry_modification_time,\n\t  (setter) 0,\n\t  \"The entry modification date and time.\",\n\t  NULL },\n\n\t{ \"file_attribute_flags\",\n\t  (getter) pyfsntfs_file_entry_get_file_attribute_flags,\n\t  (setter) 0,\n\t  \"The file attribute flags.\",\n\t  NULL },\n\n\t{ \"name\",\n\t  (getter) pyfsntfs_file_entry_get_name,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t{ \"name_attribute_index\",\n\t  (getter) pyfsntfs_file_entry_get_name_attribute_index,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t{ \"symbolic_link_target\",\n\t  (getter) pyfsntfs_file_entry_get_symbolic_link_target,\n\t  (setter) 0,\n\t  \"The symbolic link target.\",\n\t  NULL },\n\n\t{ \"security_descriptor_data\",\n\t  (getter) pyfsntfs_file_entry_get_security_descriptor_data,\n\t  (setter) 0,\n\t  \"The security descriptor data.\",\n\t  NULL },\n\n\t{ \"number_of_attributes\",\n\t  (getter) pyfsntfs_file_entry_get_number_of_attributes,\n\t  (setter) 0,\n\t  \"The number of attributes.\",\n\t  NULL },\n\n\t{ \"attributes\",\n\t  (getter) pyfsntfs_file_entry_get_attributes,\n\t  (setter) 0,\n\t  \"The attributes\",\n\t  NULL },\n\n\t{ \"number_of_alternate_data_streams\",\n\t  (getter) pyfsntfs_file_entry_get_number_of_alternate_data_streams,\n\t  (setter) 0,\n\t  \"The number of alternate data streams.\",\n\t  NULL },\n\n\t{ \"alternate_data_streams\",\n\t  (getter) pyfsntfs_file_entry_get_alternate_data_streams,\n\t  (setter) 0,\n\t  \"The alternate data streams\",\n\t  NULL },\n\n\t{ \"number_of_sub_file_entries\",\n\t  (getter) pyfsntfs_file_entry_get_number_of_sub_file_entries,\n\t  (setter) 0,\n\t  \"The number of sub file entries.\",\n\t  NULL },\n\n\t{ \"sub_file_entries\",\n\t  (getter) pyfsntfs_file_entry_get_sub_file_entries,\n\t  (setter) 0,\n\t  \"The sub file entries\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_file_entry_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.file_entry\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_file_entry_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_file_entry_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs file entry object (wraps libfsntfs_file_entry_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_file_entry_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_file_entry_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_file_entry_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new file entry object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_new(\n           libfsntfs_file_entry_t *file_entry,\n           PyObject *parent_object )\n{\n\tpyfsntfs_file_entry_t *pyfsntfs_file_entry = NULL;\n\tstatic char *function                      = \"pyfsntfs_file_entry_new\";\n\n\tif( file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_file_entry = PyObject_New(\n\t                       struct pyfsntfs_file_entry,\n\t                       &pyfsntfs_file_entry_type_object );\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize file entry.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_file_entry->file_entry    = file_entry;\n\tpyfsntfs_file_entry->parent_object = parent_object;\n\n\tif( pyfsntfs_file_entry->parent_object != NULL )\n\t{\n\t\tPy_IncRef(\n\t\t pyfsntfs_file_entry->parent_object );\n\t}\n\treturn( (PyObject *) pyfsntfs_file_entry );\n\non_error:\n\tif( pyfsntfs_file_entry != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_file_entry );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a file entry object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_file_entry_init(\n     pyfsntfs_file_entry_t *pyfsntfs_file_entry )\n{\n\tstatic char *function = \"pyfsntfs_file_entry_init\";\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs file entry is set to NULL\n\t */\n\tpyfsntfs_file_entry->file_entry = NULL;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of file entry not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees a file entry object\n */\nvoid pyfsntfs_file_entry_free(\n      pyfsntfs_file_entry_t *pyfsntfs_file_entry )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_file_entry );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_file_entry->file_entry != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_file_entry_free(\n\t\t          &( pyfsntfs_file_entry->file_entry ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs file entry.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tif( pyfsntfs_file_entry->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t pyfsntfs_file_entry->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_file_entry );\n}\n\n/* Reads a buffer of data from the file entry\n * Returns a Python object holding the data if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_read_buffer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *integer_object    = NULL;\n\tPyObject *string_object     = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_read_buffer\";\n\tstatic char *keyword_list[] = { \"size\", NULL };\n\tchar *buffer                = NULL;\n\tsize64_t read_size          = 0;\n\tssize_t read_count          = 0;\n\tint result                  = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_file_entry->file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry - missing libfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"|O\",\n\t     keyword_list,\n\t     &integer_object ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: missing default data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( integer_object == NULL )\n\t{\n\t\tresult = 0;\n\t}\n\telse\n\t{\n\t\tresult = PyObject_IsInstance(\n\t\t          integer_object,\n\t\t          (PyObject *) &PyLong_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n#if PY_MAJOR_VERSION < 3\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tPyErr_Clear();\n\n\t\t\tresult = PyObject_IsInstance(\n\t\t\t\t  integer_object,\n\t\t\t\t  (PyObject *) &PyInt_Type );\n\n\t\t\tif( result == -1 )\n\t\t\t{\n\t\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t\t PyExc_RuntimeError,\n\t\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t\t function );\n\n\t\t\t\treturn( NULL );\n\t\t\t}\n\t\t}\n#endif\n\t}\n\tif( result != 0 )\n\t{\n\t\tif( pyfsntfs_integer_unsigned_copy_to_64bit(\n\t\t     integer_object,\n\t\t     (uint64_t *) &read_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to convert integer object into read size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse if( ( integer_object == NULL )\n\t      || ( integer_object == Py_None ) )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_file_entry_get_size(\n\t\t\t  pyfsntfs_file_entry->file_entry,\n\t\t\t  &read_size,\n\t\t\t  &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( read_size == 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tstring_object = PyBytes_FromString(\n\t\t                 \"\" );\n#else\n\t\tstring_object = PyString_FromString(\n\t\t                 \"\" );\n#endif\n\t\treturn( string_object );\n\t}\n\t/* Make sure the data fits into a memory buffer\n\t */\n\tif( ( read_size > (size64_t) INT_MAX )\n\t || ( read_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid argument read size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyBytes_AsString(\n\t          string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyString_AsString(\n\t          string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              pyfsntfs_file_entry->file_entry,\n\t              (uint8_t *) buffer,\n\t              (size_t) read_size,\n\t              &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( read_count <= -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to read data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\t/* Need to resize the string here in case read_size was not fully read.\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tif( _PyBytes_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#else\n\tif( _PyString_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#endif\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n/* Reads a buffer of data at a specific foffset from the file entry\n * Returns a Python object holding the data if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_read_buffer_at_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *integer_object    = NULL;\n\tPyObject *string_object     = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_read_buffer_at_offset\";\n\tstatic char *keyword_list[] = { \"size\", \"offset\", NULL };\n\tchar *buffer                = NULL;\n\toff64_t read_offset         = 0;\n\tsize64_t read_size          = 0;\n\tssize_t read_count          = 0;\n\tint result                  = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_file_entry->file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry - missing libfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"OL\",\n\t     keyword_list,\n\t     &integer_object,\n\t     &read_offset ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: missing default data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tresult = PyObject_IsInstance(\n\t          integer_object,\n\t          (PyObject *) &PyLong_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION < 3\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Clear();\n\n\t\tresult = PyObject_IsInstance(\n\t\t          integer_object,\n\t\t          (PyObject *) &PyInt_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t         PyExc_RuntimeError,\n\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n#endif\n\tif( result != 0 )\n\t{\n\t\tif( pyfsntfs_integer_unsigned_copy_to_64bit(\n\t\t     integer_object,\n\t\t     (uint64_t *) &read_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to convert integer object into read size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse if( integer_object == Py_None )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_file_entry_get_size(\n\t\t\t  pyfsntfs_file_entry->file_entry,\n\t\t\t  &read_size,\n\t\t\t  &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to retrieve size.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( read_size == 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tstring_object = PyBytes_FromString(\n\t\t                 \"\" );\n#else\n\t\tstring_object = PyString_FromString(\n\t\t                 \"\" );\n#endif\n\t\treturn( string_object );\n\t}\n\t/* Make sure the data fits into a memory buffer\n\t */\n\tif( ( read_size > (size64_t) INT_MAX )\n\t || ( read_size > (size64_t) SSIZE_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid argument read size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyBytes_AsString(\n\t          string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 read_size );\n\n\tbuffer = PyString_AsString(\n\t          string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              pyfsntfs_file_entry->file_entry,\n\t              (uint8_t *) buffer,\n\t              (size_t) read_size,\n\t              (off64_t) read_offset,\n\t              &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( read_count <= -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to read data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\t/* Need to resize the string here in case read_size was not fully read.\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tif( _PyBytes_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#else\n\tif( _PyString_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#endif\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n/* Seeks a certain offset in the file entry data\n * Returns a Python object holding the offset if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_seek_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_seek_offset\";\n\tstatic char *keyword_list[] = { \"offset\", \"whence\", NULL };\n\toff64_t offset              = 0;\n\tint result                  = 0;\n\tint whence                  = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_file_entry->file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid pyfsntfs file entry - missing libfsntfs file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"L|i\",\n\t     keyword_list,\n\t     &offset,\n\t     &whence ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: missing default data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          pyfsntfs_file_entry->file_entry,\n\t          offset,\n\t          whence,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( offset == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to seek offset.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n}\n\n/* Retrieves the offset\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_offset\";\n\toff64_t offset           = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has default data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: missing default data stream.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_offset(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &offset,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve offset.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  (int64_t) offset );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_size(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_size\";\n\tsize64_t size            = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_size(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the number of extents\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_number_of_extents(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_number_of_extents\";\n\tint number_of_extents    = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_extents,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of extents.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) number_of_extents );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) number_of_extents );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves a specific extent by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_extent_by_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           int extent_index )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tPyObject *tuple_object   = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_extent_by_index\";\n\toff64_t extent_offset    = 0;\n\tsize64_t extent_size     = 0;\n\tuint32_t extent_flags    = 0;\n\tint result               = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          pyfsntfs_file_entry->file_entry,\n\t          extent_index,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve extent: %d.\",\n\t\t function,\n\t\t extent_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\ttuple_object = PyTuple_New(\n                        3 );\n\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  (int64_t) extent_offset );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     0,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) extent_size );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     1,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) extent_flags );\n\n\t/* Tuple set item does not increment the reference count of the integer object\n\t */\n\tif( PyTuple_SetItem(\n\t     tuple_object,\n\t     2,\n\t     integer_object ) != 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\treturn( tuple_object );\n\non_error:\n\tif( integer_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) integer_object );\n\t}\n\tif( tuple_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) tuple_object );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific extent\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_extent(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *sequence_object   = NULL;\n\tstatic char *keyword_list[] = { \"extent_index\", NULL };\n\tint extent_index            = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &extent_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tsequence_object = pyfsntfs_file_entry_get_extent_by_index(\n\t                   pyfsntfs_file_entry,\n\t                   extent_index );\n\n\treturn( sequence_object );\n}\n\n/* Determines if the file entry is empty\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_is_empty(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_is_empty\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_is_empty(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry is empty.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tif( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Determines if the file entry is allocated (in use)\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_is_allocated(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_is_allocated\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry is allocated.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tif( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Determines if the file entry has the directory entries index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_has_directory_entries_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_has_directory_entries_index\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has directory entries index.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tif( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Determines if the file entry has a default data stream\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_has_default_data_stream(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_has_default_data_stream\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has a default data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Determines if the file entry has a $I30 entry\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_has_i30_entry(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_has_i30_entry\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_i30_entry(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if file entry has a $I30 entry.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Retrieves the file reference\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_file_reference\";\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the base record file reference\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_base_record_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_base_record_file_reference\";\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve base record file reference.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the parent file reference\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_parent_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_parent_file_reference\";\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the parent file reference for a specific $FILE_NAME attribute\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *integer_object    = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_get_parent_file_reference_by_attribute_index\";\n\tstatic char *keyword_list[] = { \"attribute_index\", NULL };\n\tuint64_t file_reference     = 0;\n\tint attribute_index         = 0;\n\tint result                  = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &attribute_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          pyfsntfs_file_entry->file_entry,\n\t          attribute_index,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve parent file reference from attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the journal sequence number\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_journal_sequence_number(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error         = NULL;\n\tPyObject *integer_object         = NULL;\n\tstatic char *function            = \"pyfsntfs_file_entry_get_journal_sequence_number\";\n\tuint64_t journal_sequence_number = 0;\n\tint result                       = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve journal sequence number.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  journal_sequence_number );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the creation date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_creation_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_creation_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the creation date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_creation_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_creation_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the access date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_access_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_access_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the access date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_access_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_access_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the entry modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_entry_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_entry_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the entry modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_entry_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_entry_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the file attribute flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_file_attribute_flags(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error      = NULL;\n\tPyObject *integer_object      = NULL;\n\tstatic char *function         = \"pyfsntfs_file_entry_get_file_entry_flags\";\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) file_attribute_flags );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry file reference\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_i30_file_reference\";\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_file_reference(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file reference.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry creation date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_creation_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_i30_creation_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_creation_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the $I30 entry creation date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_creation_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_i30_creation_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_creation_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_i30_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the $I30 entry modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_i30_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry access date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_access_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_i30_access_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_access_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the $I30 entry access date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_access_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_i30_access_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_access_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry entry modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_entry_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_entry_get_i30_entry_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_entry_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the $I30 entry modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_entry_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_i30_entry_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_entry_modification_time(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the $I30 entry file attribute flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_i30_file_attribute_flags(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error      = NULL;\n\tPyObject *integer_object      = NULL;\n\tstatic char *function         = \"pyfsntfs_file_entry_get_i30_file_entry_flags\";\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_i30_file_attribute_flags(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) file_attribute_flags );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *string_object  = NULL;\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *utf8_string     = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_name\";\n\tsize_t utf8_string_size  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine size of name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( utf8_string_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tutf8_string = (uint8_t *) PyMem_Malloc(\n\t                           sizeof( uint8_t ) * utf8_string_size );\n\n\tif( utf8_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create UTF-8 string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t\t  pyfsntfs_file_entry->file_entry,\n\t\t  utf8_string,\n\t\t  utf8_string_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\tstring_object = pyfsntfs_string_new_from_utf8_rfc2279(\n\t\t\t utf8_string,\n\t\t\t utf8_string_size );\n#else\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t                 (char *) utf8_string,\n\t                 (Py_ssize_t) utf8_string_size - 1,\n\t                 NULL );\n#endif\n\tif( string_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: unable to convert UTF-8 string into Unicode object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyMem_Free(\n\t utf8_string );\n\n\treturn( string_object );\n\non_error:\n\tif( utf8_string != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t utf8_string );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the name attribute index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_name_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_name_attribute_index\";\n\tint attribute_index      = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &attribute_index,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name attribute index.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) attribute_index );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) attribute_index );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves the name for a specific $FILE_NAME attribute\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_name_by_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *string_object     = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tuint8_t *utf8_string        = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_get_name_by_attribute_index\";\n\tstatic char *keyword_list[] = { \"attribute_index\", NULL };\n\tsize_t utf8_string_size     = 0;\n\tint attribute_index         = 0;\n\tint result                  = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &attribute_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          pyfsntfs_file_entry->file_entry,\n\t          attribute_index,\n\t          &utf8_string_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine size of name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( utf8_string_size == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tutf8_string = (uint8_t *) PyMem_Malloc(\n\t                           sizeof( uint8_t ) * utf8_string_size );\n\n\tif( utf8_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create UTF-8 string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t\t  pyfsntfs_file_entry->file_entry,\n\t          attribute_index,\n\t\t  utf8_string,\n\t\t  utf8_string_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\tstring_object = pyfsntfs_string_new_from_utf8_rfc2279(\n\t\t\t utf8_string,\n\t\t\t utf8_string_size );\n#else\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t                 (char *) utf8_string,\n\t                 (Py_ssize_t) utf8_string_size - 1,\n\t                 NULL );\n#endif\n\tif( string_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: unable to convert UTF-8 string into Unicode object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyMem_Free(\n\t utf8_string );\n\n\treturn( string_object );\n\non_error:\n\tif( utf8_string != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t utf8_string );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the path hint for a specific $FILE_NAME attribute\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_path_hint(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *string_object     = NULL;\n\tuint8_t *path               = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_get_path_hint\";\n\tstatic char *keyword_list[] = { \"attribute_index\", NULL };\n\tsize_t path_size            = 0;\n\tint attribute_index         = 0;\n\tint result                  = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &attribute_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_path_hint_size(\n\t          pyfsntfs_file_entry->file_entry,\n\t          attribute_index,\n\t          &path_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve path size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( path_size == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tpath = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * path_size );\n\n\tif( path == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create path.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_path_hint(\n\t\t  pyfsntfs_file_entry->file_entry,\n\t          attribute_index,\n\t\t  path,\n\t\t  path_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve path.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) path,\n\t\t\t (Py_ssize_t) path_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t path );\n\n\treturn( string_object );\n\non_error:\n\tif( path != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t path );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the symbolic link target\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_symbolic_link_target(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_symbolic_link_target\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve symbolic link target size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t\t  pyfsntfs_file_entry->file_entry,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve symbolic link target.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the security descriptor data\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_security_descriptor_data(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error            = NULL;\n\tPyObject *string_object             = NULL;\n\tstatic char *function               = \"pyfsntfs_file_entry_get_security_descriptor_data\";\n\tchar *security_desciptor_data       = NULL;\n\tsize_t security_desciptor_data_size = 0;\n\tint result                          = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &security_desciptor_data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine security descriptor data size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 security_desciptor_data_size );\n\n\tsecurity_desciptor_data = PyBytes_AsString(\n\t                           string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 security_desciptor_data_size );\n\n\tsecurity_desciptor_data = PyString_AsString(\n\t                           string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          pyfsntfs_file_entry->file_entry,\n\t          (uint8_t *) security_desciptor_data,\n\t          security_desciptor_data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve security descriptor data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n/* Retrieves the number of attributes\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_number_of_attributes(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_entry_get_number_of_attributes\";\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) number_of_attributes );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) number_of_attributes );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves a specific attribute by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_attribute_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int attribute_index )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_attribute_t *attribute = NULL;\n\tPyObject *attribute_object       = NULL;\n\tPyTypeObject *type_object        = NULL;\n\tstatic char *function            = \"pyfsntfs_file_entry_get_attribute_by_index\";\n\tuint32_t attribute_type          = 0;\n\tint result                       = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          ( (pyfsntfs_file_entry_t *) pyfsntfs_file_entry )->file_entry,\n\t          attribute_index,\n\t          &attribute,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve attribute: %d.\",\n\t\t function,\n\t\t attribute_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_attribute_get_type(\n\t          attribute,\n\t          &attribute_type,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve type.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tswitch( attribute_type )\n\t{\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME:\n\t\t\ttype_object = &pyfsntfs_file_name_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER:\n\t\t\ttype_object = &pyfsntfs_object_identifier_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT:\n\t\t\ttype_object = &pyfsntfs_reparse_point_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_SECURITY_DESCRIPTOR:\n\t\t\ttype_object = &pyfsntfs_security_descriptor_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION:\n\t\t\ttype_object = &pyfsntfs_standard_information_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION:\n\t\t\ttype_object = &pyfsntfs_volume_information_attribute_type_object;\n\t\t\tbreak;\n\n\t\tcase LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME:\n\t\t\ttype_object = &pyfsntfs_volume_name_attribute_type_object;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\ttype_object = &pyfsntfs_attribute_type_object;\n\t\t\tbreak;\n\t}\n\tattribute_object = pyfsntfs_attribute_new(\n\t                    type_object,\n\t                    attribute,\n\t                    pyfsntfs_file_entry );\n\n\tif( attribute_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create attribute object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( attribute_object );\n\non_error:\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_attribute_free(\n\t\t &attribute,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific attribute\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_attribute(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *attribute_object  = NULL;\n\tstatic char *keyword_list[] = { \"attribute_index\", NULL };\n\tint attribute_index         = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &attribute_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tattribute_object = pyfsntfs_file_entry_get_attribute_by_index(\n\t                    (PyObject *) pyfsntfs_file_entry,\n\t                    attribute_index );\n\n\treturn( attribute_object );\n}\n\n/* Retrieves an attributes sequence and iterator object for the attributes\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_attributes(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error    = NULL;\n\tPyObject *attributes_object = NULL;\n\tstatic char *function       = \"pyfsntfs_file_entry_get_attributes\";\n\tint number_of_attributes    = 0;\n\tint result                  = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of attributes.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tattributes_object = pyfsntfs_attributes_new(\n\t                     (PyObject *) pyfsntfs_file_entry,\n\t                     &pyfsntfs_file_entry_get_attribute_by_index,\n\t                     number_of_attributes );\n\n\tif( attributes_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create attributes object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\treturn( attributes_object );\n}\n\n/* Retrieves the number of alternate data streams\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_number_of_alternate_data_streams(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error             = NULL;\n\tPyObject *integer_object             = NULL;\n\tstatic char *function                = \"pyfsntfs_file_entry_get_number_of_alternate_data_streams\";\n\tint number_of_alternate_data_streams = 0;\n\tint result                           = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_alternate_data_streams,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of alternate data streams.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) number_of_alternate_data_streams );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) number_of_alternate_data_streams );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves a specific alternate data stream by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int alternate_data_stream_index )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_data_stream_t *data_stream = NULL;\n\tPyObject *data_stream_object         = NULL;\n\tstatic char *function                = \"pyfsntfs_file_entry_get_alternate_data_stream_by_index\";\n\tint result                           = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_alternate_data_stream_by_index(\n\t          ( (pyfsntfs_file_entry_t *) pyfsntfs_file_entry )->file_entry,\n\t          alternate_data_stream_index,\n\t          &data_stream,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve alternate data stream: %d.\",\n\t\t function,\n\t\t alternate_data_stream_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tdata_stream_object = pyfsntfs_data_stream_new(\n\t                      data_stream,\n\t                      pyfsntfs_file_entry );\n\n\tif( data_stream_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create alternate data stream object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( data_stream_object );\n\non_error:\n\tif( data_stream != NULL )\n\t{\n\t\tlibfsntfs_data_stream_free(\n\t\t &data_stream,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific alternate data stream\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *data_stream_object    = NULL;\n\tstatic char *keyword_list[]     = { \"alternate_data_stream_index\", NULL };\n\tint alternate_data_stream_index = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &alternate_data_stream_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tdata_stream_object = pyfsntfs_file_entry_get_alternate_data_stream_by_index(\n\t                      (PyObject *) pyfsntfs_file_entry,\n\t                      alternate_data_stream_index );\n\n\treturn( data_stream_object );\n}\n\n/* Retrieves a data streams sequence and iterator object for the alternate data streams\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_alternate_data_streams(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error             = NULL;\n\tPyObject *data_streams_object        = NULL;\n\tstatic char *function                = \"pyfsntfs_file_entry_get_alternate_data_streams\";\n\tint number_of_alternate_data_streams = 0;\n\tint result                           = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_alternate_data_streams,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of alternate data streams.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tdata_streams_object = pyfsntfs_data_streams_new(\n\t                       (PyObject *) pyfsntfs_file_entry,\n\t                       &pyfsntfs_file_entry_get_alternate_data_stream_by_index,\n\t                       number_of_alternate_data_streams );\n\n\tif( data_streams_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create data streams object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\treturn( data_streams_object );\n}\n\n/* Determines if there is an alternate data stream specified by the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_has_alternate_data_stream_by_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error       = NULL;\n\tchar *data_stream_name         = NULL;\n\tstatic char *keyword_list[]    = { \"data_stream_name\", NULL };\n\tstatic char *function          = \"pyfsntfs_file_entry_has_alternate_data_stream_by_name\";\n\tsize_t data_stream_name_length = 0;\n\tint result                     = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"s\",\n\t     keyword_list,\n\t     &data_stream_name ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tdata_stream_name_length = narrow_string_length(\n\t                           data_stream_name );\n\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name(\n\t           pyfsntfs_file_entry->file_entry,\n\t           (uint8_t *) data_stream_name,\n\t           data_stream_name_length,\n\t           &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine if alternate data stream exists.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\t/* Check if the alternate data stream is present\n\t */\n\tif( result != 0 )\n\t{\n\t\tPy_IncRef(\n\t\t (PyObject *) Py_True );\n\n\t\treturn( Py_True );\n\t}\n\tPy_IncRef(\n\t (PyObject *) Py_False );\n\n\treturn( Py_False );\n}\n\n/* Retrieves the alternate data stream specified by the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream_by_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_data_stream_t *data_stream = NULL;\n\tPyObject *data_stream_object         = NULL;\n\tchar *data_stream_name               = NULL;\n\tstatic char *keyword_list[]          = { \"data_stream_name\", NULL };\n\tstatic char *function                = \"pyfsntfs_file_entry_get_alternate_data_stream_by_name\";\n\tsize_t data_stream_name_length       = 0;\n\tint result                           = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"s\",\n\t     keyword_list,\n\t     &data_stream_name ) == 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tdata_stream_name_length = narrow_string_length(\n\t                           data_stream_name );\n\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name(\n\t           pyfsntfs_file_entry->file_entry,\n\t           (uint8_t *) data_stream_name,\n\t           data_stream_name_length,\n\t           &data_stream,\n\t           &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve alternate data stream.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Check if the alternate data stream is present\n\t */\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdata_stream_object = pyfsntfs_data_stream_new(\n\t                      data_stream,\n\t                      (PyObject *) pyfsntfs_file_entry );\n\n\tif( data_stream_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create data stream object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( data_stream_object );\n\non_error:\n\tif( data_stream != NULL )\n\t{\n\t\tlibfsntfs_data_stream_free(\n\t\t &data_stream,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the number of sub file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_number_of_sub_file_entries(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error       = NULL;\n\tPyObject *integer_object       = NULL;\n\tstatic char *function          = \"pyfsntfs_file_entry_get_number_of_sub_file_entries\";\n\tint number_of_sub_file_entries = 0;\n\tint result                     = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_sub_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) number_of_sub_file_entries );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) number_of_sub_file_entries );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves a specific sub file entry by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_sub_file_entry_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int sub_file_entry_index )\n{\n\tlibcerror_error_t *error               = NULL;\n\tlibfsntfs_file_entry_t *sub_file_entry = NULL;\n\tPyObject *file_entry_object            = NULL;\n\tstatic char *function                  = \"pyfsntfs_file_entry_get_sub_file_entry_by_index\";\n\tint result                             = 0;\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_sub_file_entry_by_index(\n\t          ( (pyfsntfs_file_entry_t *) pyfsntfs_file_entry )->file_entry,\n\t          sub_file_entry_index,\n\t          &sub_file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve sub file entry: %d.\",\n\t\t function,\n\t\t sub_file_entry_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_new(\n\t                     sub_file_entry,\n\t                     ( (pyfsntfs_file_entry_t *) pyfsntfs_file_entry )->parent_object );\n\n\tif( file_entry_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entry object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( file_entry_object );\n\non_error:\n\tif( sub_file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &sub_file_entry,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific sub file entry\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_sub_file_entry(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *keyword_list[] = { \"sub_file_entry_index\", NULL };\n\tint sub_file_entry_index    = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &sub_file_entry_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_get_sub_file_entry_by_index(\n\t                     (PyObject *) pyfsntfs_file_entry,\n\t                     sub_file_entry_index );\n\n\treturn( file_entry_object );\n}\n\n/* Retrieves a file entries sequence and iterator object for the sub file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_entry_get_sub_file_entries(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error       = NULL;\n\tPyObject *file_entries_object  = NULL;\n\tstatic char *function          = \"pyfsntfs_file_entry_get_sub_file_entries\";\n\tint number_of_sub_file_entries = 0;\n\tint result                     = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_file_entry == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid file entry.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          pyfsntfs_file_entry->file_entry,\n\t          &number_of_sub_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of sub file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tfile_entries_object = pyfsntfs_file_entries_new(\n\t                       (PyObject *) pyfsntfs_file_entry,\n\t                       &pyfsntfs_file_entry_get_sub_file_entry_by_index,\n\t                       number_of_sub_file_entries );\n\n\tif( file_entries_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entries object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\treturn( file_entries_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_entry.h",
    "content": "/*\n * Python object wrapper of libfsntfs_file_entry_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_FILE_ENTRY_H )\n#define _PYFSNTFS_FILE_ENTRY_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_file_entry pyfsntfs_file_entry_t;\n\nstruct pyfsntfs_file_entry\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs file entry\n\t */\n\tlibfsntfs_file_entry_t *file_entry;\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n};\n\nextern PyMethodDef pyfsntfs_file_entry_object_methods[];\nextern PyTypeObject pyfsntfs_file_entry_type_object;\n\nPyObject *pyfsntfs_file_entry_new(\n           libfsntfs_file_entry_t *file_entry,\n           PyObject *parent_object );\n\nint pyfsntfs_file_entry_init(\n     pyfsntfs_file_entry_t *pyfsntfs_file_entry );\n\nvoid pyfsntfs_file_entry_free(\n      pyfsntfs_file_entry_t *pyfsntfs_file_entry );\n\nPyObject *pyfsntfs_file_entry_read_buffer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_read_buffer_at_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_seek_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_offset(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_size(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_number_of_extents(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_extent_by_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           int extent_index );\n\nPyObject *pyfsntfs_file_entry_get_extent(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_is_empty(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_is_allocated(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_has_directory_entries_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_has_default_data_stream(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_has_i30_entry(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_base_record_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_parent_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_journal_sequence_number(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_creation_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_creation_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_access_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_access_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_entry_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_entry_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_file_attribute_flags(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_file_reference(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_creation_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_creation_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_access_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_access_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_entry_modification_time(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_entry_modification_time_as_integer(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_i30_file_attribute_flags(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_name_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_name_by_attribute_index(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_path_hint(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_symbolic_link_target(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_security_descriptor_data(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_number_of_attributes(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_attribute_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int attribute_index );\n\nPyObject *pyfsntfs_file_entry_get_attribute(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_attributes(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_number_of_alternate_data_streams(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int alternate_data_stream_index );\n\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_alternate_data_streams(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_has_alternate_data_stream_by_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_alternate_data_stream_by_name(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_number_of_sub_file_entries(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_entry_get_sub_file_entry_by_index(\n           PyObject *pyfsntfs_file_entry,\n           int sub_file_entry_index );\n\nPyObject *pyfsntfs_file_entry_get_sub_file_entry(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_file_entry_get_sub_file_entries(\n           pyfsntfs_file_entry_t *pyfsntfs_file_entry,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_FILE_ENTRY_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_name_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs file name attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_name_attribute.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_string.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_file_name_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_parent_file_reference\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_parent_file_reference,\n\t  METH_NOARGS,\n\t  \"get_parent_file_reference() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the parent file reference, a combination of MFT entry index and sequence number.\" },\n\n\t{ \"get_creation_time\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_creation_time,\n\t  METH_NOARGS,\n\t  \"get_creation_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time.\" },\n\n\t{ \"get_creation_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_creation_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_creation_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_modification_time,\n\t  METH_NOARGS,\n\t  \"get_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time.\" },\n\n\t{ \"get_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_access_time\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_access_time,\n\t  METH_NOARGS,\n\t  \"get_access_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time.\" },\n\n\t{ \"get_access_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_access_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_access_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_entry_modification_time\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_entry_modification_time,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time.\" },\n\n\t{ \"get_entry_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_entry_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_file_attribute_flags\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_file_attribute_flags,\n\t  METH_NOARGS,\n\t  \"get_file_attribute_flags() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the file attribute flags.\" },\n\n\t{ \"get_name_space\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_name_space,\n\t  METH_NOARGS,\n\t  \"get_name_space() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the name space.\" },\n\n\t{ \"get_name\",\n\t  (PyCFunction) pyfsntfs_file_name_attribute_get_name,\n\t  METH_NOARGS,\n\t  \"get_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_file_name_attribute_object_get_set_definitions[] = {\n\n\t{ \"parent_file_reference\",\n\t  (getter) pyfsntfs_file_name_attribute_get_parent_file_reference,\n\t  (setter) 0,\n\t  \"The parent file reference, a combination of MFT entry index and sequence number.\",\n\t  NULL },\n\n\t{ \"creation_time\",\n\t  (getter) pyfsntfs_file_name_attribute_get_creation_time,\n\t  (setter) 0,\n\t  \"The creation date and time.\",\n\t  NULL },\n\n\t{ \"modification_time\",\n\t  (getter) pyfsntfs_file_name_attribute_get_modification_time,\n\t  (setter) 0,\n\t  \"The modification date and time.\",\n\t  NULL },\n\n\t{ \"access_time\",\n\t  (getter) pyfsntfs_file_name_attribute_get_access_time,\n\t  (setter) 0,\n\t  \"The access date and time.\",\n\t  NULL },\n\n\t{ \"entry_modification_time\",\n\t  (getter) pyfsntfs_file_name_attribute_get_entry_modification_time,\n\t  (setter) 0,\n\t  \"The entry modification date and time.\",\n\t  NULL },\n\n\t{ \"file_attribute_flags\",\n\t  (getter) pyfsntfs_file_name_attribute_get_file_attribute_flags,\n\t  (setter) 0,\n\t  \"The file attribute flags.\",\n\t  NULL },\n\n\t{ \"name_space\",\n\t  (getter) pyfsntfs_file_name_attribute_get_name_space,\n\t  (setter) 0,\n\t  \"The name space.\",\n\t  NULL },\n\n\t{ \"name\",\n\t  (getter) pyfsntfs_file_name_attribute_get_name,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_file_name_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.file_name_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs file name attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_FILE_NAME)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_file_name_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_file_name_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the parent file reference\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_parent_file_reference(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_parent_file_reference\";\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          pyfsntfs_attribute->attribute,\n\t          &file_reference,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve parent file reference.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  file_reference );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the creation date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_creation_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_name_attribute_get_creation_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the creation date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_creation_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_creation_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_name_attribute_get_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the access date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_access_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_name_attribute_get_access_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the access date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_access_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_access_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the entry modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_entry_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_file_name_attribute_get_entry_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the entry modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_entry_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_entry_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the file attribute flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_file_attribute_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error      = NULL;\n\tPyObject *integer_object      = NULL;\n\tstatic char *function         = \"pyfsntfs_file_name_attribute_get_file_attribute_flags\";\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t          pyfsntfs_attribute->attribute,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) file_attribute_flags );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name space\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_name_space(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object = NULL;\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_file_name_attribute_get_name_space\";\n\tuint8_t name_space       = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_name_space(\n\t          pyfsntfs_attribute->attribute,\n\t          &name_space,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name space.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) name_space );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_file_name_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *string_object  = NULL;\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *utf8_string     = NULL;\n\tstatic char *function    = \"pyfsntfs_file_utf8_stringute_get_name\";\n\tsize_t utf8_string_size  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &utf8_string_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine size of name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( utf8_string_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tutf8_string = (uint8_t *) PyMem_Malloc(\n\t                           sizeof( uint8_t ) * utf8_string_size );\n\n\tif( utf8_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create UTF-8 string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t\t  pyfsntfs_attribute->attribute,\n\t\t  utf8_string,\n\t\t  utf8_string_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name as UTF-8 string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\tstring_object = pyfsntfs_string_new_from_utf8_rfc2279(\n\t\t\t utf8_string,\n\t\t\t utf8_string_size );\n#else\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t                 (char *) utf8_string,\n\t                 (Py_ssize_t) utf8_string_size - 1,\n\t                 NULL );\n#endif\n\tif( string_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_IOError,\n\t\t \"%s: unable to convert UTF-8 string into Unicode object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyMem_Free(\n\t utf8_string );\n\n\treturn( string_object );\n\non_error:\n\tif( utf8_string != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t utf8_string );\n\t}\n\treturn( NULL );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_name_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs file name attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_FILE_NAME_ATTRIBUTE_H )\n#define _PYFSNTFS_FILE_NAME_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_file_name_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_file_name_attribute_type_object;\n\nPyObject *pyfsntfs_file_name_attribute_get_parent_file_reference(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_creation_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_creation_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_access_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_access_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_entry_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_entry_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_file_attribute_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_name_space(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_file_name_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_FILE_NAME_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_object_io_handle.c",
    "content": "/*\n * Python file object IO handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_object_io_handle.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n/* Creates a file object IO handle\n * Make sure the value file_object_io_handle is referencing, is set to NULL\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_initialize(\n     pyfsntfs_file_object_io_handle_t **file_object_io_handle,\n     PyObject *file_object,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_initialize\";\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_object_io_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid file object IO handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*file_object_io_handle = (pyfsntfs_file_object_io_handle_t *) PyMem_Malloc(\n\t                                                               sizeof( pyfsntfs_file_object_io_handle_t ) );\n\n\tif( *file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_INSUFFICIENT,\n\t\t \"%s: unable to create file object IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( memory_set(\n\t     *file_object_io_handle,\n\t     0,\n\t     sizeof( pyfsntfs_file_object_io_handle_t ) ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_SET_FAILED,\n\t\t \"%s: unable to clear file object IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t( *file_object_io_handle )->file_object = file_object;\n\n\tPy_IncRef(\n\t ( *file_object_io_handle )->file_object );\n\n\treturn( 1 );\n\non_error:\n\tif( *file_object_io_handle != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t *file_object_io_handle );\n\n\t\t*file_object_io_handle = NULL;\n\t}\n\treturn( -1 );\n}\n\n/* Initializes the file object IO handle\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_initialize(\n     libbfio_handle_t **handle,\n     PyObject *file_object,\n     libcerror_error_t **error )\n{\n\tpyfsntfs_file_object_io_handle_t *file_object_io_handle = NULL;\n\tstatic char *function                                   = \"pyfsntfs_file_object_initialize\";\n\n\tif( handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: invalid handle value already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( pyfsntfs_file_object_io_handle_initialize(\n\t     &file_object_io_handle,\n\t     file_object,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file object IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_initialize(\n\t     handle,\n\t     (intptr_t *) file_object_io_handle,\n\t     (int (*)(intptr_t **, libcerror_error_t **)) pyfsntfs_file_object_io_handle_free,\n\t     (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) pyfsntfs_file_object_io_handle_clone,\n\t     (int (*)(intptr_t *, int, libcerror_error_t **)) pyfsntfs_file_object_io_handle_open,\n\t     (int (*)(intptr_t *, libcerror_error_t **)) pyfsntfs_file_object_io_handle_close,\n\t     (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) pyfsntfs_file_object_io_handle_read,\n\t     (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) pyfsntfs_file_object_io_handle_write,\n\t     (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) pyfsntfs_file_object_io_handle_seek_offset,\n\t     (int (*)(intptr_t *, libcerror_error_t **)) pyfsntfs_file_object_io_handle_exists,\n\t     (int (*)(intptr_t *, libcerror_error_t **)) pyfsntfs_file_object_io_handle_is_open,\n\t     (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) pyfsntfs_file_object_io_handle_get_size,\n\t     LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( file_object_io_handle != NULL )\n\t{\n\t\tpyfsntfs_file_object_io_handle_free(\n\t\t &file_object_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Frees a file object IO handle\n * Returns 1 if succesful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_free(\n     pyfsntfs_file_object_io_handle_t **file_object_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function      = \"pyfsntfs_file_object_io_handle_free\";\n\tPyGILState_STATE gil_state = 0;\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *file_object_io_handle != NULL )\n\t{\n\t\tgil_state = PyGILState_Ensure();\n\n\t\tPy_DecRef(\n\t\t ( *file_object_io_handle )->file_object );\n\n\t\tPyMem_Free(\n\t\t *file_object_io_handle );\n\n\t\t*file_object_io_handle = NULL;\n\n\t\tPyGILState_Release(\n\t\t gil_state );\n\t}\n\treturn( 1 );\n}\n\n/* Clones (duplicates) the file object IO handle and its attributes\n * Returns 1 if succesful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_clone(\n     pyfsntfs_file_object_io_handle_t **destination_file_object_io_handle,\n     pyfsntfs_file_object_io_handle_t *source_file_object_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_clone\";\n\n\tif( destination_file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid destination file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_file_object_io_handle != NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,\n\t\t \"%s: destination file object IO handle already set.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( source_file_object_io_handle == NULL )\n\t{\n\t\t*destination_file_object_io_handle = NULL;\n\n\t\treturn( 1 );\n\t}\n\tif( pyfsntfs_file_object_io_handle_initialize(\n\t     destination_file_object_io_handle,\n\t     source_file_object_io_handle->file_object,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( *destination_file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing destination file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( 1 );\n}\n\n/* Opens the file object IO handle\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_open(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     int access_flags,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_open\";\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object_io_handle->file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file object IO handle - missing file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) != 0 )\n\t && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported access flags.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: write access currently not supported.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* No need to do anything here, because the file object is already open\n\t */\n\tfile_object_io_handle->access_flags = access_flags;\n\n\treturn( 1 );\n}\n\n/* Closes the file object IO handle\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_close(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_close\";\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object_io_handle->file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file object IO handle - missing file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Do not close the file object, have Python deal with it\n\t */\n\tfile_object_io_handle->access_flags = 0;\n\n\treturn( 0 );\n}\n\n/* Reads a buffer from the file object\n * Make sure to hold the GIL state before calling this function\n * Returns the number of bytes read if successful, or -1 on error\n */\nssize_t pyfsntfs_file_object_read_buffer(\n         PyObject *file_object,\n         uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error )\n{\n\tPyObject *argument_size    = NULL;\n\tPyObject *method_name      = NULL;\n\tPyObject *method_result    = NULL;\n\tstatic char *function      = \"pyfsntfs_file_object_read_buffer\";\n\tchar *safe_buffer          = NULL;\n\tPy_ssize_t safe_read_count = 0;\n\tssize_t read_count         = 0;\n\tint result                 = 0;\n\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( buffer == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid buffer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tmethod_name = PyUnicode_FromString(\n\t\t\t       \"read\" );\n#else\n\t\tmethod_name = PyString_FromString(\n\t\t\t       \"read\" );\n#endif\n\t\targument_size = PyLong_FromSize_t(\n\t\t\t\t size );\n\n\t\tPyErr_Clear();\n\n\t\tmethod_result = PyObject_CallMethodObjArgs(\n\t\t\t\t file_object,\n\t\t\t\t method_name,\n\t\t\t\t argument_size,\n\t\t\t\t NULL );\n\n\t\tif( PyErr_Occurred() )\n\t\t{\n\t\t\tpyfsntfs_error_fetch(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read from file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( method_result == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: missing method result.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tresult = PyObject_IsInstance(\n\t\t          method_result,\n\t\t          (PyObject *) &PyBytes_Type );\n#else\n\t\tresult = PyObject_IsInstance(\n\t\t          method_result,\n\t\t          (PyObject *) &PyString_Type );\n#endif\n\t\tif( result == -1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if method result is a binary string object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: invalid method result value is not a binary string object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tresult = PyBytes_AsStringAndSize(\n\t\t\t  method_result,\n\t\t\t  &safe_buffer,\n\t\t\t  &safe_read_count );\n#else\n\t\tresult = PyString_AsStringAndSize(\n\t\t\t  method_result,\n\t\t\t  &safe_buffer,\n\t\t\t  &safe_read_count );\n#endif\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t\t \"%s: unable to read from file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( safe_read_count > (Py_ssize_t) SSIZE_MAX )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t\t \"%s: invalid read count value exceeds maximum.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tread_count = (ssize_t) safe_read_count;\n\n\t\tif( memory_copy(\n\t\t     buffer,\n\t\t     safe_buffer,\n\t\t     read_count ) == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy data to buffer.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tPy_DecRef(\n\t\t method_result );\n\n\t\tPy_DecRef(\n\t\t argument_size );\n\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( read_count );\n\non_error:\n\tif( method_result != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_result );\n\t}\n\tif( argument_size != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t argument_size );\n\t}\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( -1 );\n}\n\n/* Reads a buffer from the file object IO handle\n * Returns the number of bytes read if successful, or -1 on error\n */\nssize_t pyfsntfs_file_object_io_handle_read(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error )\n{\n\tstatic char *function      = \"pyfsntfs_file_object_io_handle_read\";\n\tPyGILState_STATE gil_state = 0;\n\tssize_t read_count         = 0;\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tgil_state = PyGILState_Ensure();\n\n\tread_count = pyfsntfs_file_object_read_buffer(\n\t              file_object_io_handle->file_object,\n\t              buffer,\n\t              size,\n\t              error );\n\n\tif( read_count == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read from file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( read_count );\n\non_error:\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( -1 );\n}\n\n/* Writes a buffer to the file object\n * Make sure to hold the GIL state before calling this function\n * Returns the number of bytes written if successful, or -1 on error\n */\nssize_t pyfsntfs_file_object_write_buffer(\n         PyObject *file_object,\n         const uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error )\n{\n\tPyObject *argument_string = NULL;\n\tPyObject *method_name     = NULL;\n\tPyObject *method_result   = NULL;\n\tstatic char *function     = \"pyfsntfs_file_object_write_buffer\";\n\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( buffer == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid buffer.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if SIZEOF_SIZE_T > SIZEOF_INT\n\tif( size > (size_t) INT_MAX )\n#else\n\tif( size > (size_t) SSIZE_MAX )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size > 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3\n\t\tmethod_name = PyUnicode_FromString(\n\t\t\t       \"write\" );\n#else\n\t\tmethod_name = PyString_FromString(\n\t\t\t       \"write\" );\n#endif\n#if PY_MAJOR_VERSION >= 3\n\t\targument_string = PyBytes_FromStringAndSize(\n\t\t                   (char *) buffer,\n\t\t                   size );\n#else\n\t\targument_string = PyString_FromStringAndSize(\n\t\t                   (char *) buffer,\n\t\t                   size );\n#endif\n\t\tPyErr_Clear();\n\n\t\tmethod_result = PyObject_CallMethodObjArgs(\n\t\t\t\t file_object,\n\t\t\t\t method_name,\n\t\t\t\t argument_string,\n\t\t\t\t NULL );\n\n\t\tif( PyErr_Occurred() )\n\t\t{\n\t\t\tpyfsntfs_error_fetch(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_WRITE_FAILED,\n\t\t\t \"%s: unable to write to file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( method_result == NULL )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t\t \"%s: missing method result.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tPy_DecRef(\n\t\t method_result );\n\n\t\tPy_DecRef(\n\t\t argument_string );\n\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( (ssize_t) size );\n\non_error:\n\tif( method_result != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_result );\n\t}\n\tif( argument_string != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t argument_string );\n\t}\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( -1 );\n}\n\n/* Writes a buffer to the file object IO handle\n * Returns the number of bytes written if successful, or -1 on error\n */\nssize_t pyfsntfs_file_object_io_handle_write(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         const uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error )\n{\n\tstatic char *function      = \"pyfsntfs_file_object_io_handle_write\";\n\tPyGILState_STATE gil_state = 0;\n\tssize_t write_count        = 0;\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tgil_state = PyGILState_Ensure();\n\n\twrite_count = pyfsntfs_file_object_write_buffer(\n\t               file_object_io_handle->file_object,\n\t               buffer,\n\t               size,\n\t               error );\n\n\tif( write_count == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_WRITE_FAILED,\n\t\t \"%s: unable to write from file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( write_count );\n\non_error:\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( -1 );\n}\n\n/* Seeks a certain offset within the file object\n * Make sure to hold the GIL state before calling this function\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_seek_offset(\n     PyObject *file_object,\n     off64_t offset,\n     int whence,\n     libcerror_error_t **error )\n{\n\tPyObject *argument_offset = NULL;\n\tPyObject *argument_whence = NULL;\n\tPyObject *method_name     = NULL;\n\tPyObject *method_result   = NULL;\n\tstatic char *function     = \"pyfsntfs_file_object_seek_offset\";\n\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LONG_LONG )\n\tif( offset > (off64_t) INT64_MAX )\n#else\n\tif( offset > (off64_t) LONG_MAX )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid offset value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( ( whence != SEEK_CUR )\n\t && ( whence != SEEK_END )\n\t && ( whence != SEEK_SET ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,\n\t\t \"%s: unsupported whence.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tmethod_name = PyUnicode_FromString(\n\t               \"seek\" );\n#else\n\tmethod_name = PyString_FromString(\n\t               \"seek\" );\n#endif\n#if defined( HAVE_LONG_LONG )\n\targument_offset = PyLong_FromLongLong(\n\t                   (PY_LONG_LONG) offset );\n#else\n\targument_offset = PyLong_FromLongLong(\n\t                   (long) offset );\n#endif\n#if PY_MAJOR_VERSION >= 3\n\targument_whence = PyLong_FromLong(\n\t                   (long) whence );\n#else\n\targument_whence = PyInt_FromLong(\n\t                   (long) whence );\n#endif\n\tPyErr_Clear();\n\n\tmethod_result = PyObject_CallMethodObjArgs(\n\t                 file_object,\n\t                 method_name,\n\t                 argument_offset,\n\t                 argument_whence,\n\t                 NULL );\n\n\tif( PyErr_Occurred() )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek in file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( method_result == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing method result.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_DecRef(\n\t method_result );\n\n\tPy_DecRef(\n\t argument_whence );\n\n\tPy_DecRef(\n\t argument_offset );\n\n\tPy_DecRef(\n\t method_name );\n\n\treturn( 1 );\n\non_error:\n\tif( method_result != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_result );\n\t}\n\tif( argument_whence != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t argument_whence );\n\t}\n\tif( argument_offset != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t argument_offset );\n\t}\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the current offset within the file object\n * Make sure to hold the GIL state before calling this function\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_get_offset(\n     PyObject *file_object,\n     off64_t *offset,\n     libcerror_error_t **error )\n{\n\tPyObject *method_name   = NULL;\n\tPyObject *method_result = NULL;\n\tstatic char *function   = \"pyfsntfs_file_object_get_offset\";\n\tint result              = 0;\n\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( offset == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid offset.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tmethod_name = PyUnicode_FromString(\n\t               \"get_offset\" );\n#else\n\tmethod_name = PyString_FromString(\n\t               \"get_offset\" );\n#endif\n\tPyErr_Clear();\n\n\t/* Determine if the file object has the get_offset method\n\t */\n\tresult = PyObject_HasAttr(\n\t          file_object,\n\t          method_name );\n\n\tif( result == 0 )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\n\t\t/* Fall back to the tell method\n\t\t */\n#if PY_MAJOR_VERSION >= 3\n\t\tmethod_name = PyUnicode_FromString(\n\t\t               \"tell\" );\n#else\n\t\tmethod_name = PyString_FromString(\n\t\t               \"tell\" );\n#endif\n\t}\n\tPyErr_Clear();\n\n\tmethod_result = PyObject_CallMethodObjArgs(\n\t                 file_object,\n\t                 method_name,\n\t                 NULL );\n\n\tif( PyErr_Occurred() )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve current offset in file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( method_result == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing method result.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_integer_signed_copy_to_64bit(\n\t     method_result,\n\t     offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to convert method result into current offset of file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_DecRef(\n\t method_result );\n\n\tPy_DecRef(\n\t method_name );\n\n\treturn( 1 );\n\non_error:\n\tif( method_result != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_result );\n\t}\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( -1 );\n}\n\n/* Seeks a certain offset within the file object IO handle\n * Returns the offset if the seek is successful or -1 on error\n */\noff64_t pyfsntfs_file_object_io_handle_seek_offset(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error )\n{\n\tstatic char *function      = \"pyfsntfs_file_object_io_handle_seek_offset\";\n\tPyGILState_STATE gil_state = 0;\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tgil_state = PyGILState_Ensure();\n\n\tif( pyfsntfs_file_object_seek_offset(\n\t     file_object_io_handle->file_object,\n\t     offset,\n\t     whence,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek in file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_file_object_get_offset(\n\t     file_object_io_handle->file_object,\n\t     &offset,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to retrieve current offset in file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( offset );\n\non_error:\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( -1 );\n}\n\n/* Function to determine if a file exists\n * Returns 1 if file exists, 0 if not or -1 on error\n */\nint pyfsntfs_file_object_io_handle_exists(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_exists\";\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object_io_handle->file_object == NULL )\n\t{\n\t\treturn( 0 );\n\t}\n\treturn( 1 );\n}\n\n/* Check if the file is open\n * Returns 1 if open, 0 if not or -1 on error\n */\nint pyfsntfs_file_object_io_handle_is_open(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"pyfsntfs_file_object_io_handle_is_open\";\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object_io_handle->file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file object IO handle - missing file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* As far as BFIO is concerned the file object is always open\n\t */\n\treturn( 1 );\n}\n\n/* Retrieves the size of the file object\n * Make sure to hold the GIL state before calling this function\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_get_size(\n     PyObject *file_object,\n     size64_t *size,\n     libcerror_error_t **error )\n{\n\tPyObject *method_name   = NULL;\n\tPyObject *method_result = NULL;\n\tstatic char *function   = \"pyfsntfs_file_object_get_size\";\n\n\tif( file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tmethod_name = PyUnicode_FromString(\n\t               \"get_size\" );\n#else\n\tmethod_name = PyString_FromString(\n\t               \"get_size\" );\n#endif\n\tPyErr_Clear();\n\n\tmethod_result = PyObject_CallMethodObjArgs(\n\t                 file_object,\n\t                 method_name,\n\t                 NULL );\n\n\tif( PyErr_Occurred() )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to retrieve size of file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( method_result == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: missing method result.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_integer_unsigned_copy_to_64bit(\n\t     method_result,\n\t     size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to convert method result into size of file object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_DecRef(\n\t method_result );\n\n\tPy_DecRef(\n\t method_name );\n\n\treturn( 1 );\n\non_error:\n\tif( method_result != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_result );\n\t}\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\treturn( -1 );\n}\n\n/* Retrieves the file size\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_file_object_io_handle_get_size(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     size64_t *size,\n     libcerror_error_t **error )\n{\n\tPyObject *method_name      = NULL;\n\tstatic char *function      = \"pyfsntfs_file_object_io_handle_get_size\";\n\tPyGILState_STATE gil_state = 0;\n\toff64_t current_offset     = 0;\n\tint result                 = 0;\n\n\tif( file_object_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file object IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_object_io_handle->file_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,\n\t\t \"%s: invalid file object IO handle - missing file object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tgil_state = PyGILState_Ensure();\n\n#if PY_MAJOR_VERSION >= 3\n\tmethod_name = PyUnicode_FromString(\n\t               \"get_size\" );\n#else\n\tmethod_name = PyString_FromString(\n\t               \"get_size\" );\n#endif\n\tPyErr_Clear();\n\n\t/* Determine if the file object has the get_size method\n\t */\n\tresult = PyObject_HasAttr(\n\t          file_object_io_handle->file_object,\n\t          method_name );\n\n\tif( result != 0 )\n\t{\n\t\tif( pyfsntfs_file_object_get_size(\n\t\t     file_object_io_handle->file_object,\n\t\t     size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve size of file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif( pyfsntfs_file_object_get_offset(\n\t\t     file_object_io_handle->file_object,\n\t\t     &current_offset,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve current offset in file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( pyfsntfs_file_object_seek_offset(\n\t\t     file_object_io_handle->file_object,\n\t\t     0,\n\t\t     SEEK_END,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t\t \"%s: unable to seek end of file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( pyfsntfs_file_object_get_offset(\n\t\t     file_object_io_handle->file_object,\n\t\t     (off64_t *) size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to retrieve end offset in file object.\",\n\t\t\t function );\n\n\t\t\tpyfsntfs_file_object_seek_offset(\n\t\t\t file_object_io_handle->file_object,\n\t\t\t current_offset,\n\t\t\t SEEK_SET,\n\t\t\t NULL );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( pyfsntfs_file_object_seek_offset(\n\t\t     file_object_io_handle->file_object,\n\t\t     current_offset,\n\t\t     SEEK_SET,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t\t \"%s: unable to seek current offset in file object.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tPy_DecRef(\n\t method_name );\n\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( 1 );\n\non_error:\n\tif( method_name != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t method_name );\n\t}\n\tPyGILState_Release(\n\t gil_state );\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_file_object_io_handle.h",
    "content": "/*\n * Python file object IO handle functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_FILE_OBJECT_IO_HANDLE_H )\n#define _PYFSNTFS_FILE_OBJECT_IO_HANDLE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_file_object_io_handle pyfsntfs_file_object_io_handle_t;\n\nstruct pyfsntfs_file_object_io_handle\n{\n\t/* The python file (like) object\n\t */\n\tPyObject *file_object;\n\n\t/* The access flags\n\t */\n\tint access_flags;\n};\n\nint pyfsntfs_file_object_io_handle_initialize(\n     pyfsntfs_file_object_io_handle_t **file_object_io_handle,\n     PyObject *file_object,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_initialize(\n     libbfio_handle_t **handle,\n     PyObject *file_object,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_free(\n     pyfsntfs_file_object_io_handle_t **file_object_io_handle,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_clone(\n     pyfsntfs_file_object_io_handle_t **destination_file_object_io_handle,\n     pyfsntfs_file_object_io_handle_t *source_file_object_io_handle,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_open(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     int access_flags,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_close(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error );\n\nssize_t pyfsntfs_file_object_read_buffer(\n         PyObject *file_object,\n         uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error );\n\nssize_t pyfsntfs_file_object_io_handle_read(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error );\n\nssize_t pyfsntfs_file_object_write_buffer(\n         PyObject *file_object,\n         const uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error );\n\nssize_t pyfsntfs_file_object_io_handle_write(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         const uint8_t *buffer,\n         size_t size,\n         libcerror_error_t **error );\n\nint pyfsntfs_file_object_seek_offset(\n     PyObject *file_object,\n     off64_t offset,\n     int whence,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_get_offset(\n     PyObject *file_object,\n     off64_t *offset,\n     libcerror_error_t **error );\n\noff64_t pyfsntfs_file_object_io_handle_seek_offset(\n         pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n         off64_t offset,\n         int whence,\n         libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_exists(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_is_open(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_get_size(\n     PyObject *file_object,\n     size64_t *size,\n     libcerror_error_t **error );\n\nint pyfsntfs_file_object_io_handle_get_size(\n     pyfsntfs_file_object_io_handle_t *file_object_io_handle,\n     size64_t *size,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_FILE_OBJECT_IO_HANDLE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_guid.c",
    "content": "/*\n * GUID functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_guid.h\"\n#include \"pyfsntfs_libfguid.h\"\n#include \"pyfsntfs_python.h\"\n\n/* Creates a new string object from a GUID\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_string_new_from_guid(\n           const uint8_t *guid_buffer,\n           size_t guid_buffer_size )\n{\n\tchar guid_string[ 48 ];\n\n\tlibcerror_error_t *error    = NULL;\n\tlibfguid_identifier_t *guid = NULL;\n\tPyObject *string_object     = NULL;\n\tstatic char *function       = \"pyfsntfs_string_new_from_guid\";\n\n\tif( libfguid_identifier_initialize(\n\t     &guid,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to create GUID.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_copy_from_byte_stream(\n\t     guid,\n\t     guid_buffer,\n\t     guid_buffer_size,\n\t     LIBFGUID_ENDIAN_LITTLE,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to copy byte stream to GUID.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_copy_to_utf8_string(\n\t     guid,\n\t     (uint8_t *) guid_string,\n\t     48,\n\t     LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to copy GUID to string.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tif( libfguid_identifier_free(\n\t     &guid,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to free GUID.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t guid_string,\n\t\t\t (Py_ssize_t) 36,\n\t\t\t NULL );\n\n\treturn( string_object );\n\non_error:\n\tif( guid != NULL )\n\t{\n\t\tlibfguid_identifier_free(\n\t\t &guid,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_guid.h",
    "content": "/*\n * GUID functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_GUID_H )\n#define _PYFSNTFS_GUID_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nPyObject *pyfsntfs_string_new_from_guid(\n           const uint8_t *guid_buffer,\n           size_t guid_buffer_size );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_GUID_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_integer.c",
    "content": "/*\n * Integer functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_python.h\"\n\n/* Creates a new signed integer object from a 64-bit value\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_integer_signed_new_from_64bit(\n           int64_t value_64bit )\n{\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_integer_signed_new_from_64bit\";\n\n#if defined( HAVE_LONG_LONG )\n\tif( ( value_64bit < (int64_t) LLONG_MIN )\n\t || ( value_64bit > (int64_t) LLONG_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_OverflowError,\n\t\t \"%s: 64-bit value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromLongLong(\n\t                  (long long) value_64bit );\n#else\n\tif( current_offset > (off64_t) LONG_MAX )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_OverflowError,\n\t\t \"%s: 64-bit value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromLong(\n\t                  (long) value_64bit );\n#endif\n\treturn( integer_object );\n}\n\n/* Creates a new unsigned integer object from a 64-bit value\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_integer_unsigned_new_from_64bit(\n           uint64_t value_64bit )\n{\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_integer_unsigned_new_from_64bit\";\n\n#if defined( HAVE_LONG_LONG )\n\tif( value_64bit > (uint64_t) ULLONG_MAX )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_OverflowError,\n\t\t \"%s: 64-bit value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLongLong(\n\t                  (long long) value_64bit );\n#else\n\tif( value_64bit > (uint64_t) ULONG_MAX )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_OverflowError,\n\t\t \"%s: 64-bit value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLong(\n\t                  (long) value_64bit );\n#endif\n\treturn( integer_object );\n}\n\n/* Copies a Python int or long object to a signed 64-bit value\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_integer_signed_copy_to_64bit(\n     PyObject *integer_object,\n     int64_t *value_64bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"pyfsntfs_integer_signed_copy_to_64bit\";\n\tint result              = 0;\n\n#if defined( HAVE_LONG_LONG )\n\tPY_LONG_LONG long_value = 0;\n#else\n\tlong long_value         = 0;\n#endif\n\n\tif( integer_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid integer object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          integer_object,\n\t          (PyObject *) &PyLong_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if defined( HAVE_LONG_LONG )\n\t\tlong_value = PyLong_AsLongLong(\n\t\t              integer_object );\n#else\n\t\tlong_value = PyLong_AsLong(\n\t\t              integer_object );\n#endif\n\t}\n#if PY_MAJOR_VERSION < 3\n\tif( result == 0 )\n\t{\n\t\tPyErr_Clear();\n\n\t\tresult = PyObject_IsInstance(\n\t\t          integer_object,\n\t\t          (PyObject *) &PyInt_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tPyErr_Clear();\n\n\t\t\tlong_value = PyInt_AsLong(\n\t\t\t              integer_object );\n\t\t}\n\t}\n#endif /* PY_MAJOR_VERSION < 3 */\n\n\tif( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( PyErr_Occurred() )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to convert integer object to long.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LONG_LONG ) && ( SIZEOF_LONG_LONG > 8 )\n\tif( ( long_value < (PY_LONG_LONG) INT64_MIN )\n\t || ( long_value > (PY_LONG_LONG) INT64_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid long value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#elif ( SIZEOF_LONG > 8 )\n\tif( ( long_value > (long) INT64_MIN )\n\t || ( long_value > (long) INT64_MAX ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid long value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\t*value_64bit = (int64_t) long_value;\n\n\treturn( 1 );\n}\n\n/* Copies a Python int or long object to an unsigned 64-bit value\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_integer_unsigned_copy_to_64bit(\n     PyObject *integer_object,\n     uint64_t *value_64bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"pyfsntfs_integer_unsigned_copy_to_64bit\";\n\tint result              = 0;\n\n#if defined( HAVE_LONG_LONG )\n\tPY_LONG_LONG long_value = 0;\n#else\n\tlong long_value         = 0;\n#endif\n\n\tif( integer_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid integer object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          integer_object,\n\t          (PyObject *) &PyLong_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to determine if integer object is of type long.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if defined( HAVE_LONG_LONG )\n\t\tlong_value = PyLong_AsUnsignedLongLong(\n\t\t              integer_object );\n#else\n\t\tlong_value = PyLong_AsUnsignedLong(\n\t\t              integer_object );\n#endif\n\t}\n#if PY_MAJOR_VERSION < 3\n\tif( result == 0 )\n\t{\n\t\tPyErr_Clear();\n\n\t\tresult = PyObject_IsInstance(\n\t\t          integer_object,\n\t\t          (PyObject *) &PyInt_Type );\n\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine if integer object is of type int.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\telse if( result != 0 )\n\t\t{\n\t\t\tPyErr_Clear();\n\n#if defined( HAVE_LONG_LONG )\n\t\t\tlong_value = PyInt_AsUnsignedLongLongMask(\n\t\t\t\t      integer_object );\n#else\n\t\t\tlong_value = PyInt_AsUnsignedLongMask(\n\t\t\t\t      integer_object );\n#endif\n\t\t}\n\t}\n#endif /* PY_MAJOR_VERSION < 3 */\n\n\tif( result == 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unsupported integer object type.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( PyErr_Occurred() )\n\t{\n\t\tpyfsntfs_error_fetch(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t \"%s: unable to convert integer object to long.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_LONG_LONG )\n#if ( SIZEOF_LONG_LONG > 8 )\n\tif( ( long_value < (PY_LONG_LONG) 0 )\n\t || ( long_value > (PY_LONG_LONG) UINT64_MAX ) )\n#else\n\tif( long_value < (PY_LONG_LONG) 0 )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid long value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#else\n#if ( SIZEOF_LONG > 8 )\n\tif( ( long_value < (long) 0 )\n\t || ( long_value > (long) UINT64_MAX ) )\n#else\n\tif( long_value < (PY_LONG_LONG) 0 )\n#endif\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid long value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif\n\t*value_64bit = (uint64_t) long_value;\n\n\treturn( 1 );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_integer.h",
    "content": "/*\n * Integer functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_INTEGER_H )\n#define _PYFSNTFS_INTEGER_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nPyObject *pyfsntfs_integer_signed_new_from_64bit(\n           int64_t value_64bit );\n\nPyObject *pyfsntfs_integer_unsigned_new_from_64bit(\n           uint64_t value_64bit );\n\nint pyfsntfs_integer_signed_copy_to_64bit(\n     PyObject *integer_object,\n     int64_t *value_64bit,\n     libcerror_error_t **error );\n\nint pyfsntfs_integer_unsigned_copy_to_64bit(\n     PyObject *integer_object,\n     uint64_t *value_64bit,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_INTEGER_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libbfio.h",
    "content": "/*\n * The libbfio header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBBFIO_H )\n#define _PYFSNTFS_LIBBFIO_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBBFIO for local use of libbfio\n */\n#if defined( HAVE_LOCAL_LIBBFIO )\n\n#include <libbfio_definitions.h>\n#include <libbfio_file.h>\n#include <libbfio_file_pool.h>\n#include <libbfio_file_range.h>\n#include <libbfio_handle.h>\n#include <libbfio_memory_range.h>\n#include <libbfio_pool.h>\n#include <libbfio_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT\n * before including libbfio.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBBFIO_DLL_IMPORT\n#endif\n\n#include <libbfio.h>\n\n#endif /* defined( HAVE_LOCAL_LIBBFIO ) */\n\n#endif /* !defined( _PYFSNTFS_LIBBFIO_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libcerror.h",
    "content": "/*\n * The libcerror header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBCERROR_H )\n#define _PYFSNTFS_LIBCERROR_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCERROR for local use of libcerror\n */\n#if defined( HAVE_LOCAL_LIBCERROR )\n\n#include <libcerror_definitions.h>\n#include <libcerror_error.h>\n#include <libcerror_system.h>\n#include <libcerror_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT\n * before including libcerror.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCERROR_DLL_IMPORT\n#endif\n\n#include <libcerror.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCERROR ) */\n\n#endif /* !defined( _PYFSNTFS_LIBCERROR_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libclocale.h",
    "content": "/*\n * The libclocale header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBCLOCALE_H )\n#define _PYFSNTFS_LIBCLOCALE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale\n */\n#if defined( HAVE_LOCAL_LIBCLOCALE )\n\n#include <libclocale_codepage.h>\n#include <libclocale_definitions.h>\n#include <libclocale_locale.h>\n#include <libclocale_support.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT\n * before including libclocale.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCLOCALE_DLL_IMPORT\n#endif\n\n#include <libclocale.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */\n\n#endif /* !defined( _PYFSNTFS_LIBCLOCALE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libfguid.h",
    "content": "/*\n * The libfguid header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBFGUID_H )\n#define _PYFSNTFS_LIBFGUID_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFGUID for local use of libfguid\n */\n#if defined( HAVE_LOCAL_LIBFGUID )\n\n#include <libfguid_definitions.h>\n#include <libfguid_identifier.h>\n#include <libfguid_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT\n * before including libfguid.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFGUID_DLL_IMPORT\n#endif\n\n#include <libfguid.h>\n\n#endif\n\n#endif /* !defined( _PYFSNTFS_LIBFGUID_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libfsntfs.h",
    "content": "/*\n * The internal libfsntfs header\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBFSNTFS_H )\n#define _PYFSNTFS_LIBFSNTFS_H\n\n#include <common.h>\n\n#include <libfsntfs.h>\n\n#endif /* !defined( _PYFSNTFS_LIBFSNTFS_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_libuna.h",
    "content": "/*\n * The libuna header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_LIBUNA_H )\n#define _PYFSNTFS_LIBUNA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBUNA for local use of libuna\n */\n#if defined( HAVE_LOCAL_LIBUNA )\n\n#include <libuna_base16_stream.h>\n#include <libuna_base32_stream.h>\n#include <libuna_base64_stream.h>\n#include <libuna_byte_stream.h>\n#include <libuna_unicode_character.h>\n#include <libuna_url_stream.h>\n#include <libuna_utf16_stream.h>\n#include <libuna_utf16_string.h>\n#include <libuna_utf32_stream.h>\n#include <libuna_utf32_string.h>\n#include <libuna_utf7_stream.h>\n#include <libuna_utf8_stream.h>\n#include <libuna_utf8_string.h>\n#include <libuna_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT\n * before including libuna.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBUNA_DLL_IMPORT\n#endif\n\n#include <libuna.h>\n\n#endif\n\n#endif /* !defined( _PYFSNTFS_LIBUNA_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_mft_metadata_file.c",
    "content": "/*\n * Python object definition of the libfsntfs MFT metadata file\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_file_object_io_handle.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_mft_metadata_file.h\"\n#include \"pyfsntfs_mft_metadata_file_entries.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_mft_metadata_file_open_file_io_handle(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\nPyMethodDef pyfsntfs_mft_metadata_file_object_methods[] = {\n\n\t/* Functions to access the MFT metadata file */\n\n\t{ \"open\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_open,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open(filename, mode='r') -> None\\n\"\n\t  \"\\n\"\n\t  \"Opens a MFT metadata file.\" },\n\n\t{ \"open_file_object\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_open_file_object,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open_file_object(file_object, mode='r') -> None\\n\"\n\t  \"\\n\"\n\t  \"Opens a MFT metadata file using a file-like object.\" },\n\n\t{ \"close\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_close,\n\t  METH_NOARGS,\n\t  \"close() -> None\\n\"\n\t  \"\\n\"\n\t  \"Closes a MFT metadata file.\" },\n\n\t/* Functions to access the MFT metadata file values */\n\n\t{ \"get_volume_name\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_get_volume_name,\n\t  METH_NOARGS,\n\t  \"get_volume_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the volume name.\" },\n\n\t/* Functions to access the file entries */\n\n\t{ \"get_number_of_file_entries\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_get_number_of_file_entries,\n\t  METH_NOARGS,\n\t  \"get_number_of_file_entries() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of file entries.\" },\n\n\t{ \"get_file_entry\",\n\t  (PyCFunction) pyfsntfs_mft_metadata_file_get_file_entry,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_file_entry(file_entry_index) -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific file entry.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_mft_metadata_file_object_get_set_definitions[] = {\n\n\t{ \"volume_name\",\n\t  (getter) pyfsntfs_mft_metadata_file_get_volume_name,\n\t  (setter) 0,\n\t  \"The volume name.\",\n\t  NULL },\n\n\t{ \"number_of_file_entries\",\n\t  (getter) pyfsntfs_mft_metadata_file_get_number_of_file_entries,\n\t  (setter) 0,\n\t  \"The number of file entries.\",\n\t  NULL },\n\n\t{ \"file_entries\",\n\t  (getter) pyfsntfs_mft_metadata_file_get_file_entries,\n\t  (setter) 0,\n\t  \"The file entries\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_mft_metadata_file_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.mft_metadata_file\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_mft_metadata_file_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_mft_metadata_file_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs MFT metadata file object (wraps libfsntfs_mft_metadata_file_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_mft_metadata_file_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_mft_metadata_file_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_mft_metadata_file_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Initializes a MFT metadata file object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_mft_metadata_file_init(\n     pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_mft_metadata_file_init\";\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs MFT metadata file is set to NULL\n\t */\n\tpyfsntfs_mft_metadata_file->mft_metadata_file = NULL;\n\tpyfsntfs_mft_metadata_file->file_io_handle    = NULL;\n\n\tif( libfsntfs_mft_metadata_file_initialize(\n\t     &( pyfsntfs_mft_metadata_file->mft_metadata_file ),\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize MFT metadata file.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( -1 );\n\t}\n\treturn( 0 );\n}\n\n/* Frees a MFT metadata file object\n */\nvoid pyfsntfs_mft_metadata_file_free(\n      pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_mft_metadata_file_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_mft_metadata_file );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_mft_metadata_file->mft_metadata_file != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_mft_metadata_file_free(\n\t\t          &( pyfsntfs_mft_metadata_file->mft_metadata_file ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs MFT metadata file.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_mft_metadata_file );\n}\n\n/* Opens a MFT metadata file\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_open(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *string_object      = NULL;\n\tlibcerror_error_t *error     = NULL;\n\tstatic char *function        = \"pyfsntfs_mft_metadata_file_open\";\n\tstatic char *keyword_list[]  = { \"filename\", \"mode\", NULL };\n\tconst char *filename_narrow  = NULL;\n\tchar *mode                   = NULL;\n\tint result                   = 0;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tconst wchar_t *filename_wide = NULL;\n#else\n\tPyObject *utf8_string_object = NULL;\n#endif\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Note that PyArg_ParseTupleAndKeywords with \"s\" will force Unicode strings to be converted to narrow character string.\n\t * On Windows the narrow character strings contains an extended ASCII string with a codepage. Hence we get a conversion\n\t * exception. This will also fail if the default encoding is not set correctly. We cannot use \"u\" here either since that\n\t * does not allow us to pass non Unicode string objects and Python (at least 2.7) does not seems to automatically upcast them.\n\t */\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O|s\",\n\t     keyword_list,\n\t     &string_object,\n\t     &mode ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( ( mode != NULL )\n\t && ( mode[ 0 ] != 'r' ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unsupported mode: %s.\",\n\t\t function,\n\t\t mode );\n\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyUnicode_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type Unicode.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsWideCharString(\n\t\t                             string_object,\n\t\t                             NULL );\n#else\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsUnicode(\n\t\t                             string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_mft_metadata_file_open_wide(\n\t\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t                  filename_wide,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tPyMem_Free(\n\t\t filename_wide );\n#endif\n#else\n\t\tutf8_string_object = PyUnicode_AsUTF8String(\n\t\t                      string_object );\n\n\t\tif( utf8_string_object == NULL )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to convert unicode string to UTF-8.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t\t\t   utf8_string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t\t\t   utf8_string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_mft_metadata_file_open(\n\t\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t                  filename_narrow,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to open MFT metadata file.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\tresult = PyObject_IsInstance(\n\t\t  string_object,\n\t\t  (PyObject *) &PyBytes_Type );\n#else\n\tresult = PyObject_IsInstance(\n\t\t  string_object,\n\t\t  (PyObject *) &PyString_Type );\n#endif\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type string.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t\t\t   string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t\t\t   string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_mft_metadata_file_open(\n\t\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t                  filename_narrow,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to open MFT metadata file.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tPyErr_Format(\n\t PyExc_TypeError,\n\t \"%s: unsupported string object type.\",\n\t function );\n\n\treturn( NULL );\n}\n\n/* Opens a MFT metadata file using a file-like object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_open_file_object(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_object       = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tchar *mode                  = NULL;\n\tstatic char *keyword_list[] = { \"file_object\", \"mode\", NULL };\n\tstatic char *function       = \"pyfsntfs_mft_metadata_file_open_file_object\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O|s\",\n\t     keyword_list,\n\t     &file_object,\n\t     &mode ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( ( mode != NULL )\n\t && ( mode[ 0 ] != 'r' ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unsupported mode: %s.\",\n\t\t function,\n\t\t mode );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_file_object_initialize(\n\t     &( pyfsntfs_mft_metadata_file->file_io_handle ),\n\t     file_object,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize file IO handle.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_open_file_io_handle(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          pyfsntfs_mft_metadata_file->file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to open MFT metadata file.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n\non_error:\n\tif( pyfsntfs_mft_metadata_file->file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &( pyfsntfs_mft_metadata_file->file_io_handle ),\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Closes a MFT metadata file\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_close(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_mft_metadata_file_close\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_close(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 0 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to close MFT metadata file.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file->file_io_handle != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libbfio_handle_free(\n\t\t          &( pyfsntfs_mft_metadata_file->file_io_handle ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to free libbfio file IO handle.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n}\n\n/* Retrieves the volume name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_get_volume_name(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *volume_name     = NULL;\n\tstatic char *function    = \"pyfsntfs_mft_metadata_file_get_volume_name\";\n\tsize_t volume_name_size  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          &volume_name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve volume name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( volume_name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tvolume_name = (uint8_t *) PyMem_Malloc(\n\t                           sizeof( uint8_t ) * volume_name_size );\n\n\tif( volume_name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create volume name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t\t  pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t\t  volume_name,\n\t\t  volume_name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve volume name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) volume_name,\n\t\t\t (Py_ssize_t) volume_name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t volume_name );\n\n\treturn( string_object );\n\non_error:\n\tif( volume_name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t volume_name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the number of file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_get_number_of_file_entries(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error        = NULL;\n\tPyObject *integer_object        = NULL;\n\tstatic char *function           = \"pyfsntfs_mft_metadata_file_get_number_of_file_entries\";\n\tuint64_t number_of_file_entries = 0;\n\tint result                      = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  number_of_file_entries );\n\n\treturn( integer_object );\n}\n\n/* Retrieves a specific file entry by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_get_file_entry_by_index(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           uint64_t file_entry_index )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tPyObject *file_entry_object        = NULL;\n\tstatic char *function              = \"pyfsntfs_mft_metadata_file_get_file_entry_by_index\";\n\tint result                         = 0;\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_get_file_entry_by_index(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          file_entry_index,\n\t          &file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t file_entry_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_new(\n\t                     file_entry,\n\t                     (PyObject *) pyfsntfs_mft_metadata_file );\n\n\tif( file_entry_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entry object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( file_entry_object );\n\non_error:\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific file entry\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_get_file_entry(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *keyword_list[] = { \"file_entry_index\", NULL };\n\tint file_entry_index        = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &file_entry_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_mft_metadata_file_get_file_entry_by_index(\n\t                     pyfsntfs_mft_metadata_file,\n\t                     file_entry_index );\n\n\treturn( file_entry_object );\n}\n\n/* Retrieves a file entries sequence and iterator object for the MFT metadata file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_get_file_entries(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error                   = NULL;\n\tPyObject *mft_metadata_file_entries_object = NULL;\n\tstatic char *function                      = \"pyfsntfs_mft_metadata_file_get_file_entries\";\n\tuint64_t number_of_file_entries            = 0;\n\tint result                                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_mft_metadata_file == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t          pyfsntfs_mft_metadata_file->mft_metadata_file,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tmft_metadata_file_entries_object = pyfsntfs_mft_metadata_file_entries_new(\n\t                                    pyfsntfs_mft_metadata_file,\n\t                                    &pyfsntfs_mft_metadata_file_get_file_entry_by_index,\n\t                                    number_of_file_entries );\n\n\tif( mft_metadata_file_entries_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create MFT metadata file entries object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\treturn( mft_metadata_file_entries_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_mft_metadata_file.h",
    "content": "/*\n * Python object wrapper of libfsntfs_mft_metadata_file_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_MFT_METADATA_FILE_H )\n#define _PYFSNTFS_MFT_METADATA_FILE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_mft_metadata_file pyfsntfs_mft_metadata_file_t;\n\nstruct pyfsntfs_mft_metadata_file\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs MFT metadata file\n\t */\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file;\n\n\t/* The libbfio file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n};\n\nextern PyMethodDef pyfsntfs_mft_metadata_file_object_methods[];\nextern PyTypeObject pyfsntfs_mft_metadata_file_type_object;\n\nint pyfsntfs_mft_metadata_file_init(\n     pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file );\n\nvoid pyfsntfs_mft_metadata_file_free(\n      pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file );\n\nPyObject *pyfsntfs_mft_metadata_file_open(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_mft_metadata_file_open_file_object(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_mft_metadata_file_close(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_mft_metadata_file_get_volume_name(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_mft_metadata_file_get_number_of_file_entries(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_mft_metadata_file_get_file_entry_by_index(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           uint64_t file_entry_index );\n\nPyObject *pyfsntfs_mft_metadata_file_get_file_entry(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_mft_metadata_file_get_file_entries(\n           pyfsntfs_mft_metadata_file_t *pyfsntfs_mft_metadata_file,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_MFT_METADATA_FILE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_mft_metadata_file_entries.c",
    "content": "/*\n * Python object definition of the MFT metadata file entries sequence and iterator\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_mft_metadata_file_entries.h\"\n#include \"pyfsntfs_python.h\"\n\nPySequenceMethods pyfsntfs_mft_metadata_file_entries_sequence_methods = {\n\t/* sq_length */\n\t(lenfunc) pyfsntfs_mft_metadata_file_entries_len,\n\t/* sq_concat */\n\t0,\n\t/* sq_repeat */\n\t0,\n\t/* sq_item */\n\t(ssizeargfunc) pyfsntfs_mft_metadata_file_entries_getitem,\n\t/* sq_slice */\n\t0,\n\t/* sq_ass_item */\n\t0,\n\t/* sq_ass_slice */\n\t0,\n\t/* sq_contains */\n\t0,\n\t/* sq_inplace_concat */\n\t0,\n\t/* sq_inplace_repeat */\n\t0\n};\n\nPyTypeObject pyfsntfs_mft_metadata_file_entries_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs._mft_metadata_file_entries\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_mft_metadata_file_entries_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_mft_metadata_file_entries_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t&pyfsntfs_mft_metadata_file_entries_sequence_methods,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,\n\t/* tp_doc */\n\t\"internal pyfsntfs MFT metadata file entries sequence and iterator object\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t(getiterfunc) pyfsntfs_mft_metadata_file_entries_iter,\n\t/* tp_iternext */\n\t(iternextfunc) pyfsntfs_mft_metadata_file_entries_iternext,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_mft_metadata_file_entries_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new MFT metadata file entries object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_mft_metadata_file_entries_new(\n           pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,\n           PyObject* (*get_file_entry_by_index)(\n                        pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,\n                        uint64_t file_entry_index ),\n           uint64_t number_of_file_entries )\n{\n\tpyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries = NULL;\n\tstatic char *function                                                    = \"pyfsntfs_mft_metadata_file_entries_new\";\n\n\tif( mft_metadata_file_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Make sure the MFT metadata file entries values are initialized\n\t */\n\tpyfsntfs_mft_metadata_file_entries = PyObject_New(\n\t                                      struct pyfsntfs_mft_metadata_file_entries,\n\t                                      &pyfsntfs_mft_metadata_file_entries_type_object );\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize MFT metadata file entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries_init(\n\t     pyfsntfs_mft_metadata_file_entries ) != 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize MFT metadata file entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_mft_metadata_file_entries->mft_metadata_file_object = mft_metadata_file_object;\n\tpyfsntfs_mft_metadata_file_entries->get_file_entry_by_index  = get_file_entry_by_index;\n\tpyfsntfs_mft_metadata_file_entries->number_of_file_entries   = number_of_file_entries;\n\n\tPy_IncRef(\n\t (PyObject *) pyfsntfs_mft_metadata_file_entries->mft_metadata_file_object );\n\n\treturn( (PyObject *) pyfsntfs_mft_metadata_file_entries );\n\non_error:\n\tif( pyfsntfs_mft_metadata_file_entries != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_mft_metadata_file_entries );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a MFT metadata file entries object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_mft_metadata_file_entries_init(\n     pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_mft_metadata_file_entries_init\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure the MFT metadata file entries values are initialized\n\t */\n\tpyfsntfs_mft_metadata_file_entries->mft_metadata_file_object = NULL;\n\tpyfsntfs_mft_metadata_file_entries->get_file_entry_by_index  = NULL;\n\tpyfsntfs_mft_metadata_file_entries->file_entry_index         = 0;\n\tpyfsntfs_mft_metadata_file_entries->number_of_file_entries   = 0;\n\n\treturn( 0 );\n}\n\n/* Frees a MFT metadata file entries object\n */\nvoid pyfsntfs_mft_metadata_file_entries_free(\n      pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_mft_metadata_file_entries_free\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_mft_metadata_file_entries );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->mft_metadata_file_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_mft_metadata_file_entries->mft_metadata_file_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_mft_metadata_file_entries );\n}\n\n/* The MFT metadata file entries len() function\n */\nPy_ssize_t pyfsntfs_mft_metadata_file_entries_len(\n            pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_mft_metadata_file_entries_len\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (Py_ssize_t) pyfsntfs_mft_metadata_file_entries->number_of_file_entries );\n}\n\n/* The MFT metadata file entries getitem() function\n */\nPyObject *pyfsntfs_mft_metadata_file_entries_getitem(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries,\n           Py_ssize_t item_index )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_mft_metadata_file_entries_getitem\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries - missing get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->number_of_file_entries < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries - invalid number of file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( item_index < 0 )\n\t || ( item_index >= (Py_ssize_t) pyfsntfs_mft_metadata_file_entries->number_of_file_entries ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid invalid item index value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_mft_metadata_file_entries->get_file_entry_by_index(\n\t                     pyfsntfs_mft_metadata_file_entries->mft_metadata_file_object,\n\t                     (uint64_t) item_index );\n\n\treturn( file_entry_object );\n}\n\n/* The MFT metadata file entries iter() function\n */\nPyObject *pyfsntfs_mft_metadata_file_entries_iter(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_mft_metadata_file_entries_iter\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t (PyObject *) pyfsntfs_mft_metadata_file_entries );\n\n\treturn( (PyObject *) pyfsntfs_mft_metadata_file_entries );\n}\n\n/* The MFT metadata file entries iternext() function\n */\nPyObject *pyfsntfs_mft_metadata_file_entries_iternext(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_mft_metadata_file_entries_iternext\";\n\n\tif( pyfsntfs_mft_metadata_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries - missing get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->file_entry_index < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries - invalid file entry index.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->number_of_file_entries < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid MFT metadata file entries - invalid number of file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_mft_metadata_file_entries->file_entry_index >= pyfsntfs_mft_metadata_file_entries->number_of_file_entries )\n\t{\n\t\tPyErr_SetNone(\n\t\t PyExc_StopIteration );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_mft_metadata_file_entries->get_file_entry_by_index(\n\t                     pyfsntfs_mft_metadata_file_entries->mft_metadata_file_object,\n\t                     pyfsntfs_mft_metadata_file_entries->file_entry_index );\n\n\tif( file_entry_object != NULL )\n\t{\n\t\tpyfsntfs_mft_metadata_file_entries->file_entry_index++;\n\t}\n\treturn( file_entry_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_mft_metadata_file_entries.h",
    "content": "/*\n * Python object definition of the MFT metadata file entries sequence and iterator\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H )\n#define _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_mft_metadata_file.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_mft_metadata_file_entries pyfsntfs_mft_metadata_file_entries_t;\n\nstruct pyfsntfs_mft_metadata_file_entries\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The MFT metadata file object\n\t */\n\tpyfsntfs_mft_metadata_file_t *mft_metadata_file_object;\n\n\t/* The get file entry by index callback function\n\t */\n\tPyObject* (*get_file_entry_by_index)(\n\t             pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,\n\t             uint64_t file_entry_index );\n\n\t/* The (current) file entry index\n\t */\n\tuint64_t file_entry_index;\n\n\t/* The number of file entries\n\t */\n\tuint64_t number_of_file_entries;\n};\n\nextern PyTypeObject pyfsntfs_mft_metadata_file_entries_type_object;\n\nPyObject *pyfsntfs_mft_metadata_file_entries_new(\n           pyfsntfs_mft_metadata_file_t *mft_metadata_file,\n           PyObject* (*get_file_entry_by_index)(\n                        pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,\n                        uint64_t file_entry_index ),\n           uint64_t number_of_file_entries );\n\nint pyfsntfs_mft_metadata_file_entries_init(\n     pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );\n\nvoid pyfsntfs_mft_metadata_file_entries_free(\n      pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );\n\nPy_ssize_t pyfsntfs_mft_metadata_file_entries_len(\n            pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );\n\nPyObject *pyfsntfs_mft_metadata_file_entries_getitem(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries,\n           Py_ssize_t item_index );\n\nPyObject *pyfsntfs_mft_metadata_file_entries_iter(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );\n\nPyObject *pyfsntfs_mft_metadata_file_entries_iternext(\n           pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_object_identifier_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs object identifier attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_guid.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_object_identifier_attribute.h\"\n\nPyMethodDef pyfsntfs_object_identifier_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_droid_file_identifier\",\n\t  (PyCFunction) pyfsntfs_object_identifier_attribute_get_droid_file_identifier,\n\t  METH_NOARGS,\n\t  \"get_droid_file_identifier() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the droid file identifier (GUID).\" },\n\n\t{ \"get_birth_droid_volume_identifier\",\n\t  (PyCFunction) pyfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier,\n\t  METH_NOARGS,\n\t  \"get_birth_droid_volume_identifier() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the birth droid volume identifier (GUID).\" },\n\n\t{ \"get_birth_droid_file_identifier\",\n\t  (PyCFunction) pyfsntfs_object_identifier_attribute_get_birth_droid_file_identifier,\n\t  METH_NOARGS,\n\t  \"get_birth_droid_file_identifier() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the birth droid file identifier (GUID).\" },\n\n\t{ \"get_birth_droid_domain_identifier\",\n\t  (PyCFunction) pyfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier,\n\t  METH_NOARGS,\n\t  \"get_birth_droid_domain_identifier() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the birth droid domain identifier (GUID).\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_object_identifier_attribute_object_get_set_definitions[] = {\n\n\t{ \"droid_file_identifier\",\n\t  (getter) pyfsntfs_object_identifier_attribute_get_droid_file_identifier,\n\t  (setter) 0,\n\t  \"The droid file identifier.\",\n\t  NULL },\n\n\t{ \"birth_droid_volume_identifier\",\n\t  (getter) pyfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier,\n\t  (setter) 0,\n\t  \"The birth droid volume identifier.\",\n\t  NULL },\n\n\t{ \"birth_droid_file_identifier\",\n\t  (getter) pyfsntfs_object_identifier_attribute_get_birth_droid_file_identifier,\n\t  (setter) 0,\n\t  \"The birth droid file identifier.\",\n\t  NULL },\n\n\t{ \"birth_droid_domain_identifier\",\n\t  (getter) pyfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier,\n\t  (setter) 0,\n\t  \"The birth droid domain identifier.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_object_identifier_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.object_identifier_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs object identifier attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_OBJECT_IDENTIFIER)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_object_identifier_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_object_identifier_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the droid file identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_object_identifier_attribute_get_droid_file_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tuint8_t guid_data[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tstatic char *function    = \"pyfsntfs_object_identifier_attribute_get_droid_file_identifier\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_object_identifier_attribute_get_droid_file_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          guid_data,\n\t          16,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve droid file identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tstring_object = pyfsntfs_string_new_from_guid(\n\t\t\t guid_data,\n\t\t\t 16 );\n\n\treturn( string_object );\n}\n\n/* Retrieves the birth droid volume identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tuint8_t guid_data[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tstatic char *function    = \"pyfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          guid_data,\n\t          16,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve birth droid volume identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tstring_object = pyfsntfs_string_new_from_guid(\n\t\t\t guid_data,\n\t\t\t 16 );\n\n\treturn( string_object );\n}\n\n/* Retrieves the birth droid file identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tuint8_t guid_data[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tstatic char *function    = \"pyfsntfs_object_identifier_attribute_get_birth_droid_file_identifier\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          guid_data,\n\t          16,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve birth droid file identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tstring_object = pyfsntfs_string_new_from_guid(\n\t\t\t guid_data,\n\t\t\t 16 );\n\n\treturn( string_object );\n}\n\n/* Retrieves the birth droid domain identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tuint8_t guid_data[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tstatic char *function    = \"pyfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          guid_data,\n\t          16,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve birth droid domain identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tstring_object = pyfsntfs_string_new_from_guid(\n\t\t\t guid_data,\n\t\t\t 16 );\n\n\treturn( string_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_object_identifier_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs object identifier attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H )\n#define _PYFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_object_identifier_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_object_identifier_attribute_type_object;\n\nPyObject *pyfsntfs_object_identifier_attribute_get_droid_file_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_volume_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_file_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_object_identifier_attribute_get_birth_droid_domain_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_OBJECT_IDENTIFIER_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_python.h",
    "content": "/*\n * The python header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_PYTHON_H )\n#define _PYFSNTFS_PYTHON_H\n\n#include <common.h>\n\n#if PY_MAJOR_VERSION < 3\n\n/* Fix defines in pyconfig.h\n */\n#undef _POSIX_C_SOURCE\n#undef _XOPEN_SOURCE\n\n/* Fix defines in pyport.h\n */\n#undef HAVE_FSTAT\n#undef HAVE_STAT\n#undef HAVE_SSIZE_T\n#undef HAVE_INT32_T\n#undef HAVE_UINT32_T\n#undef HAVE_INT64_T\n#undef HAVE_UINT64_T\n\n#endif /* PY_MAJOR_VERSION < 3 */\n\n/* Define PY_SSIZE_T_CLEAN to silence:\n * DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats\n *\n * PY_SSIZE_T_CLEAN was introduced in Python 2.5\n */\n#define PY_SSIZE_T_CLEAN\n\n#include <Python.h>\n\n/* Python compatibility macros\n */\n#if !defined( PyMODINIT_FUNC )\n#if PY_MAJOR_VERSION >= 3\n#define PyMODINIT_FUNC PyObject *\n#else\n#define PyMODINIT_FUNC void\n#endif\n#endif /* !defined( PyMODINIT_FUNC ) */\n\n#if !defined( PyVarObject_HEAD_INIT )\n#define PyVarObject_HEAD_INIT( type, size ) \\\n\tPyObject_HEAD_INIT( type ) \\\n\tsize,\n\n#endif /* !defined( PyVarObject_HEAD_INIT ) */\n\n#if PY_MAJOR_VERSION >= 3\n#define Py_TPFLAGS_HAVE_ITER\t\t0\n#endif\n\n#if !defined( Py_TYPE )\n#define Py_TYPE( object ) \\\n\t( ( (PyObject *) object )->ob_type )\n\n#endif /* !defined( Py_TYPE ) */\n\n#endif /* !defined( _PYFSNTFS_PYTHON_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_reparse_point_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs reparse point attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_reparse_point_attribute.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_reparse_point_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_tag\",\n\t  (PyCFunction) pyfsntfs_reparse_point_attribute_get_tag,\n\t  METH_NOARGS,\n\t  \"get_tag() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the tag.\" },\n\n\t{ \"get_substitute_name\",\n\t  (PyCFunction) pyfsntfs_reparse_point_attribute_get_substitute_name,\n\t  METH_NOARGS,\n\t  \"get_substitute_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the substitute name.\" },\n\n\t{ \"get_print_name\",\n\t  (PyCFunction) pyfsntfs_reparse_point_attribute_get_print_name,\n\t  METH_NOARGS,\n\t  \"get_print_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the print name.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_reparse_point_attribute_object_get_set_definitions[] = {\n\n\t{ \"tag\",\n\t  (getter) pyfsntfs_reparse_point_attribute_get_tag,\n\t  (setter) 0,\n\t  \"The type and flags.\",\n\t  NULL },\n\n\t{ \"substitute_name\",\n\t  (getter) pyfsntfs_reparse_point_attribute_get_substitute_name,\n\t  (setter) 0,\n\t  \"The substitute name.\",\n\t  NULL },\n\n\t{ \"print_name\",\n\t  (getter) pyfsntfs_reparse_point_attribute_get_print_name,\n\t  (setter) 0,\n\t  \"The print name.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_reparse_point_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.reparse_point_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs reparse point attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_REPARSE_POINT)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_reparse_point_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_reparse_point_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the type and flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_reparse_point_attribute_get_tag(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_reparse_point_attribute_get_tag\";\n\tuint32_t tag             = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t          pyfsntfs_attribute->attribute,\n\t          &tag,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve type and flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) tag );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the substitute name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_reparse_point_attribute_get_substitute_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_reparse_point_attribute_get_substitute_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve substitute name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create substitute name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t  pyfsntfs_attribute->attribute,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve substitute name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the print name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_reparse_point_attribute_get_print_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_reparse_point_attribute_get_print_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve print name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create print name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t\t  pyfsntfs_attribute->attribute,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve print name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_reparse_point_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs reparse point attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_REPARSE_POINT_ATTRIBUTE_H )\n#define _PYFSNTFS_REPARSE_POINT_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_reparse_point_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_reparse_point_attribute_type_object;\n\nPyObject *pyfsntfs_reparse_point_attribute_get_tag(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_reparse_point_attribute_get_substitute_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_reparse_point_attribute_get_print_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_REPARSE_POINT_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_security_descriptor_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs security descriptor attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_security_descriptor_attribute.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_security_descriptor_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_data\",\n\t  (PyCFunction) pyfsntfs_security_descriptor_attribute_get_data,\n\t  METH_NOARGS,\n\t  \"get_data() -> String\\n\"\n\t  \"\\n\"\n\t  \"Returns the security descriptor data.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_security_descriptor_attribute_object_get_set_definitions[] = {\n\n\t{ \"data\",\n\t  (getter) pyfsntfs_security_descriptor_attribute_get_data,\n\t  (setter) 0,\n\t  \"The security descriptor data.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_security_descriptor_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.security_descriptor_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs security descriptor attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_security_descriptor_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_security_descriptor_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the security descriptor data\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_security_descriptor_attribute_get_data(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error            = NULL;\n\tPyObject *string_object             = NULL;\n\tstatic char *function               = \"pyfsntfs_security_descriptor_attribute_get_data\";\n\tchar *security_desciptor_data       = NULL;\n\tsize_t security_desciptor_data_size = 0;\n\tint result                          = 0;\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_security_descriptor_attribute_get_security_descriptor_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &security_desciptor_data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to determine security descriptor data size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 security_desciptor_data_size );\n\n\tsecurity_desciptor_data = PyBytes_AsString(\n\t                           string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 security_desciptor_data_size );\n\n\tsecurity_desciptor_data = PyString_AsString(\n\t                           string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_security_descriptor_attribute_get_security_descriptor(\n\t          pyfsntfs_attribute->attribute,\n\t          (uint8_t *) security_desciptor_data,\n\t          security_desciptor_data_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve security descriptor data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_security_descriptor_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs security descriptor attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H )\n#define _PYFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_security_descriptor_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_security_descriptor_attribute_type_object;\n\nPyObject *pyfsntfs_security_descriptor_attribute_get_data(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_SECURITY_DESCRIPTOR_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_standard_information_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs standard information attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_standard_information_attribute.h\"\n#include \"pyfsntfs_unused.h\"\n\nPyMethodDef pyfsntfs_standard_information_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_creation_time\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_creation_time,\n\t  METH_NOARGS,\n\t  \"get_creation_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time.\" },\n\n\t{ \"get_creation_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_creation_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_creation_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the creation date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_modification_time\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_modification_time,\n\t  METH_NOARGS,\n\t  \"get_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time.\" },\n\n\t{ \"get_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_access_time\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_access_time,\n\t  METH_NOARGS,\n\t  \"get_access_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time.\" },\n\n\t{ \"get_access_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_access_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_access_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the access date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_entry_modification_time\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_entry_modification_time,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time() -> Datetime or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time.\" },\n\n\t{ \"get_entry_modification_time_as_integer\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_entry_modification_time_as_integer,\n\t  METH_NOARGS,\n\t  \"get_entry_modification_time_as_integer() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the entry modification date and time as a 64-bit integer containing a FILETIME value.\" },\n\n\t{ \"get_file_attribute_flags\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_file_attribute_flags,\n\t  METH_NOARGS,\n\t  \"get_file_attribute_flags() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the file attribute flags.\" },\n\n\t{ \"get_owner_identifier\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_owner_identifier,\n\t  METH_NOARGS,\n\t  \"get_owner_identifier() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the owner identifier.\" },\n\n\t{ \"get_security_descriptor_identifier\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_security_descriptor_identifier,\n\t  METH_NOARGS,\n\t  \"get_security_descriptor_identifier() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the security descriptor identifier.\" },\n\n\t{ \"get_update_sequence_number\",\n\t  (PyCFunction) pyfsntfs_standard_information_attribute_get_update_sequence_number,\n\t  METH_NOARGS,\n\t  \"get_update_sequence_number() -> Integer or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the update sequence number.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_standard_information_attribute_object_get_set_definitions[] = {\n\n\t{ \"creation_time\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_creation_time,\n\t  (setter) 0,\n\t  \"The creation date and time.\",\n\t  NULL },\n\n\t{ \"modification_time\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_modification_time,\n\t  (setter) 0,\n\t  \"The modification date and time.\",\n\t  NULL },\n\n\t{ \"access_time\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_access_time,\n\t  (setter) 0,\n\t  \"The access date and time.\",\n\t  NULL },\n\n\t{ \"entry_modification_time\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_entry_modification_time,\n\t  (setter) 0,\n\t  \"The entry modification date and time.\",\n\t  NULL },\n\n\t{ \"file_attribute_flags\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_file_attribute_flags,\n\t  (setter) 0,\n\t  \"The file attribute flags.\",\n\t  NULL },\n\n\t{ \"owner_identifier\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_owner_identifier,\n\t  (setter) 0,\n\t  \"The owner identifier.\",\n\t  NULL },\n\n\t{ \"security_descriptor_identifier\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_security_descriptor_identifier,\n\t  (setter) 0,\n\t  \"The security descriptor identifier.\",\n\t  NULL },\n\n\t{ \"update_sequence_number\",\n\t  (getter) pyfsntfs_standard_information_attribute_get_update_sequence_number,\n\t  (setter) 0,\n\t  \"The update sequence number.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_standard_information_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.standard_information_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs standard information attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_STANDARD_INFORMATION)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_standard_information_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_standard_information_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the creation date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_creation_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_standard_information_attribute_get_creation_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_creation_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the creation date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_creation_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_standard_information_attribute_get_creation_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_creation_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve creation time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_standard_information_attribute_get_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_standard_information_attribute_get_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the access date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_access_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_standard_information_attribute_get_access_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_access_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the access date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_access_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_standard_information_attribute_get_access_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_access_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve access time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the entry modification date and time\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_entry_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error   = NULL;\n\tPyObject *date_time_object = NULL;\n\tstatic char *function      = \"pyfsntfs_standard_information_attribute_get_entry_modification_time\";\n\tuint64_t filetime          = 0;\n\tint result                 = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_entry_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tdate_time_object = pyfsntfs_datetime_new_from_filetime(\n\t                    filetime );\n\n\treturn( date_time_object );\n}\n\n/* Retrieves the entry modification date and time as an integer\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_entry_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_standard_information_attribute_get_entry_modification_time_as_integer\";\n\tuint64_t filetime        = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_entry_modification_time(\n\t          pyfsntfs_attribute->attribute,\n\t          &filetime,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve entry modification time.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  filetime );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the file attribute flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_file_attribute_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error      = NULL;\n\tPyObject *integer_object      = NULL;\n\tstatic char *function         = \"pyfsntfs_standard_information_attribute_get_file_attribute_flags\";\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_file_attribute_flags(\n\t          pyfsntfs_attribute->attribute,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file attribute flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) file_attribute_flags );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the owner identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_owner_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error  = NULL;\n\tPyObject *integer_object  = NULL;\n\tstatic char *function     = \"pyfsntfs_standard_information_attribute_get_owner_identifier\";\n\tuint32_t owner_identifier = 0;\n\tint result                = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_owner_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          &owner_identifier,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve owner identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) owner_identifier );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the security identifier\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error                = NULL;\n\tPyObject *integer_object                = NULL;\n\tstatic char *function                   = \"pyfsntfs_standard_information_attribute_get_security_descriptor_identifier\";\n\tuint32_t security_descriptor_identifier = 0;\n\tint result                              = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n\t          pyfsntfs_attribute->attribute,\n\t          &security_descriptor_identifier,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve security descriptor identifier.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) security_descriptor_identifier );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the update sequence number\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_standard_information_attribute_get_update_sequence_number(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error        = NULL;\n\tPyObject *integer_object        = NULL;\n\tstatic char *function           = \"pyfsntfs_standard_information_attribute_get_update_sequence_number\";\n\tuint64_t update_sequence_number = 0;\n\tint result                      = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_standard_information_attribute_get_update_sequence_number(\n\t          pyfsntfs_attribute->attribute,\n\t          &update_sequence_number,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve update sequence number.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  update_sequence_number );\n\n\treturn( integer_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_standard_information_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs standard information attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H )\n#define _PYFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_standard_information_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_standard_information_attribute_type_object;\n\nPyObject *pyfsntfs_standard_information_attribute_get_creation_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_creation_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_access_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_access_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_entry_modification_time(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_entry_modification_time_as_integer(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_file_attribute_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_owner_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_security_descriptor_identifier(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_standard_information_attribute_get_update_sequence_number(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_STANDARD_INFORMATION_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_string.c",
    "content": "/*\n * String functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_libuna.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_string.h\"\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\n/* Creates a new string object from an UTF-8 RFC 2279 encoded string\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_string_new_from_utf8_rfc2279(\n           const uint8_t *utf8_string,\n           size_t utf8_string_size )\n{\n\tPyObject *string_object                              = NULL;\n\tlibcerror_error_t *error                             = NULL;\n\tuint32_t *utf32_string                               = NULL;\n\tstatic char *function                                = \"pyfsntfs_string_new_from_utf8_rfc2279\";\n\tlibuna_unicode_character_t largest_unicode_character = 127;\n\tlibuna_unicode_character_t unicode_character         = 0;\n\tsize_t utf32_string_index                            = 0;\n\tsize_t utf32_string_length                           = 0;\n\tsize_t utf8_string_index                             = 0;\n\n\tif( utf8_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid UTF-8 string.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( utf8_string_size == 0 )\n\t || ( utf8_string_size > (size_t) ( SSIZE_MAX / 4 ) ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid UTF-8 string size value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tutf32_string = (uint32_t *) PyMem_Malloc(\n\t                             sizeof( uint32_t ) * utf8_string_size );\n\n\tif( utf32_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create UTF-32 string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\twhile( utf8_string_index < utf8_string_size )\n\t{\n\t\tif( libuna_unicode_character_copy_from_utf8_rfc2279(\n\t\t     &unicode_character,\n\t\t     (libuna_utf8_character_t *) utf8_string,\n\t\t     utf8_string_size,\n\t\t     &utf8_string_index,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to copy Unicode character from string.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tif( unicode_character == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tutf32_string[ utf32_string_index++ ] = unicode_character;\n\n\t\tif( ( unicode_character >= 0x0000d800UL )\n\t\t && ( unicode_character <= 0x0000dfffUL ) )\n\t\t{\n\t\t\tlargest_unicode_character = 0x0010ffffUL;\n\t\t}\n\t\telse if( unicode_character > largest_unicode_character )\n\t\t{\n\t\t\tlargest_unicode_character = unicode_character;\n\t\t}\n\t}\n\tutf32_string_length = utf32_string_index;\n\n\tif( largest_unicode_character > 65535 )\n\t{\n\t\tlargest_unicode_character = 0x0010ffffUL;\n\t}\n\telse if( largest_unicode_character > 255 )\n\t{\n\t\tlargest_unicode_character = 0x0000ffffUL;\n\t}\n\telse if( largest_unicode_character > 127 )\n\t{\n\t\tlargest_unicode_character = 0x000000ffUL;\n\t}\n\t/* Pass the string length to PyUnicode_New otherwise it the end of string\n\t * character is part of the string. The largest Unicode character is needed\n\t * to ensure Python Unicode strings are \"canonical\", otherwise string\n\t * comparison can fail.\n\t */\n\tstring_object = PyUnicode_New(\n\t                 utf32_string_length, largest_unicode_character);\n\n\tif( string_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create string object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( utf32_string_index = 0;\n\t     utf32_string_index < utf32_string_length;\n\t     utf32_string_index++ )\n\t{\n\t\tunicode_character = utf32_string[ utf32_string_index ];\n\n\t\tif( PyUnicode_WriteChar(\n\t\t     string_object,\n\t\t     (Py_ssize_t) utf32_string_index,\n\t\t     (Py_UCS4) unicode_character ) == -1 )\n\t\t{\n\t\t\tPyErr_Format(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to copy Unicode character: 0x%08\" PRIx32 \" at index: %\" PRIzd \" to string object.\",\n\t\t\t function,\n\t\t\t unicode_character,\n\t\t\t utf32_string_index );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tPyMem_Free(\n\t utf32_string );\n\n\treturn( string_object );\n\non_error:\n\tif( string_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\t}\n\tif( utf32_string != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t utf32_string );\n\t}\n\treturn( NULL );\n}\n\n/* Copies a Python Unicode string object to an UTF-8 RFC 2279 encoded string\n * Returns 1 if successful or -1 on error\n */\nint pyfsntfs_string_copy_to_utf8_rfc2279(\n     PyObject *string_object,\n     uint8_t **utf8_string,\n     size_t *utf8_string_size,\n     libcerror_error_t **error )\n{\n\tuint8_t *safe_utf8_string    = NULL;\n\tstatic char *function        = \"pyfsntfs_string_copy_to_utf8_rfc2279\";\n\tPy_UCS4 unicode_character    = 0;\n\tPy_ssize_t string_index      = 0;\n\tPy_ssize_t string_length     = 0;\n\tsize_t safe_utf8_string_size = 0;\n\tsize_t utf8_character_size   = 0;\n\tsize_t utf8_string_index     = 0;\n\n\tif( string_object == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string object.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-8 string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( utf8_string_size == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid UTF-8 string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tPyErr_Clear();\n\n\tstring_length = PyUnicode_GetLength(\n\t                 string_object );\n\n\tif( ( string_length == 0 )\n\t || ( (size_t) string_length > (size_t) ( SSIZE_MAX - 1 ) ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid string length value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_utf8_string_size = 1;\n\n\t/* Using RFC 2279 UTF-8 to support unpaired UTF-16 surrogates\n\t */\n\tfor( string_index = 0;\n\t     string_index < string_length;\n\t     string_index++ )\n\t{\n\t\tunicode_character = PyUnicode_ReadChar(\n\t\t                     string_object,\n\t\t                     string_index );\n\n\t\tif( libuna_unicode_character_size_to_utf8_rfc2279(\n\t\t     (libuna_unicode_character_t) unicode_character,\n\t\t     &utf8_character_size,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_GET_FAILED,\n\t\t\t \"%s: unable to determine size of Unicode character as UTF-8 string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tsafe_utf8_string_size += utf8_character_size;\n\t}\n\tsafe_utf8_string = (uint8_t *) PyMem_Malloc(\n\t                                sizeof( uint8_t ) * safe_utf8_string_size );\n\n\tif( safe_utf8_string == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create UTF-8 string.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tfor( string_index = 0;\n\t     string_index < string_length;\n\t     string_index++ )\n\t{\n\t\tunicode_character = PyUnicode_ReadChar(\n\t\t                     string_object,\n\t\t                     string_index );\n\n\t\tif( libuna_unicode_character_copy_to_utf8_rfc2279(\n\t\t     (libuna_unicode_character_t) unicode_character,\n\t\t     (libuna_utf8_character_t *) safe_utf8_string,\n\t\t     safe_utf8_string_size,\n\t\t     &utf8_string_index,\n\t\t     error ) != 1 )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_COPY_FAILED,\n\t\t\t \"%s: unable to copy Unicode character to UTF-8 string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t}\n\tif( utf8_string_index >= safe_utf8_string_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid UTF-8 string size value out of bounds.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tsafe_utf8_string[ utf8_string_index++ ] = 0;\n\n\t*utf8_string      = safe_utf8_string;\n\t*utf8_string_size = utf8_string_index;\n\n\treturn( 1 );\n\non_error:\n\tif( safe_utf8_string != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t safe_utf8_string );\n\t}\n\treturn( -1 );\n}\n\n#endif /* PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_string.h",
    "content": "/*\n * String functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_STRING_H )\n#define _PYFSNTFS_STRING_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\nPyObject *pyfsntfs_string_new_from_utf8_rfc2279(\n           const uint8_t *utf8_string,\n           size_t utf8_string_size );\n\nint pyfsntfs_string_copy_to_utf8_rfc2279(\n     PyObject *string_object,\n     uint8_t **utf8_string,\n     size_t *utf8_string_size,\n     libcerror_error_t **error );\n\n#endif /* PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_STRING_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_unused.h",
    "content": "/*\n * Definitions to silence compiler warnings about unused function attributes/parameters.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_UNUSED_H )\n#define _PYFSNTFS_UNUSED_H\n\n#include <common.h>\n\n#if !defined( PYFSNTFS_ATTRIBUTE_UNUSED )\n#if defined( __GNUC__ ) && __GNUC__ >= 3\n#define PYFSNTFS_ATTRIBUTE_UNUSED\t__attribute__ ((__unused__))\n#else\n#define PYFSNTFS_ATTRIBUTE_UNUSED\n#endif\n#endif\n\n#if defined( _MSC_VER )\n#define PYFSNTFS_UNREFERENCED_PARAMETER( parameter ) \\\n\tUNREFERENCED_PARAMETER( parameter );\n#else\n#define PYFSNTFS_UNREFERENCED_PARAMETER( parameter ) \\\n\t/* parameter */\n#endif\n\n#endif /* !defined( _PYFSNTFS_UNUSED_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_usn_change_journal.c",
    "content": "/*\n * Python object definition of the libfsntfs update (or change) journal\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_usn_change_journal.h\"\n\nPyMethodDef pyfsntfs_usn_change_journal_object_methods[] = {\n\n\t/* Functions to access the USN change journal */\n\n\t{ \"get_offset\",\n\t  (PyCFunction) pyfsntfs_usn_change_journal_get_offset,\n\t  METH_NOARGS,\n\t  \"get_offset() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the current offset within the USN change journal data.\" },\n\n\t{ \"read_usn_record\",\n\t  (PyCFunction) pyfsntfs_usn_change_journal_read_usn_record,\n\t  METH_NOARGS,\n\t  \"read_usn_record() -> String\\n\"\n\t  \"\\n\"\n\t  \"Reads USN record data.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_usn_change_journal_object_get_set_definitions[] = {\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_usn_change_journal_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.usn_change_journal\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_usn_change_journal_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_usn_change_journal_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs USN change journal object (wraps libfsntfs_usn_change_journal_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_usn_change_journal_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_usn_change_journal_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_usn_change_journal_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new USN change journal object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_usn_change_journal_new(\n           libfsntfs_usn_change_journal_t *usn_change_journal,\n           PyObject *parent_object )\n{\n\tpyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal = NULL;\n\tstatic char *function                                      = \"pyfsntfs_usn_change_journal_new\";\n\n\tif( usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* PyObject_New does not invoke tp_init\n\t */\n\tpyfsntfs_usn_change_journal = PyObject_New(\n\t                               struct pyfsntfs_usn_change_journal,\n\t                               &pyfsntfs_usn_change_journal_type_object );\n\n\tif( pyfsntfs_usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize USN change journal.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_usn_change_journal->usn_change_journal = usn_change_journal;\n\tpyfsntfs_usn_change_journal->parent_object      = parent_object;\n\n\tif( pyfsntfs_usn_change_journal->parent_object != NULL )\n\t{\n\t\tPy_IncRef(\n\t\t pyfsntfs_usn_change_journal->parent_object );\n\t}\n\treturn( (PyObject *) pyfsntfs_usn_change_journal );\n\non_error:\n\tif( pyfsntfs_usn_change_journal != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_usn_change_journal );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes an USN change journal object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_usn_change_journal_init(\n     pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal )\n{\n\tstatic char *function = \"pyfsntfs_usn_change_journal_init\";\n\n\tif( pyfsntfs_usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs USN change journal is set to NULL\n\t */\n\tpyfsntfs_usn_change_journal->usn_change_journal = NULL;\n\n\tPyErr_Format(\n\t PyExc_NotImplementedError,\n\t \"%s: initialize of USN change journal not supported.\",\n\t function );\n\n\treturn( -1 );\n}\n\n/* Frees an USN change journal object\n */\nvoid pyfsntfs_usn_change_journal_free(\n      pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_usn_change_journal_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_usn_change_journal );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_usn_change_journal->usn_change_journal != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_usn_change_journal_free(\n\t\t          &( pyfsntfs_usn_change_journal->usn_change_journal ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs USN change journal.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tif( pyfsntfs_usn_change_journal->parent_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t pyfsntfs_usn_change_journal->parent_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_usn_change_journal );\n}\n\n/* Retrieves the offset\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_usn_change_journal_get_offset(\n           pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_usn_change_journal_get_offset\";\n\toff64_t offset           = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_usn_change_journal_get_offset(\n\t          pyfsntfs_usn_change_journal->usn_change_journal,\n\t          &offset,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve offset.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_signed_new_from_64bit(\n\t                  (int64_t) offset );\n\n\treturn( integer_object );\n}\n\n/* Reads an USN record\n * Returns a Python object holding the data if successful or NULL on error\n */\nPyObject *pyfsntfs_usn_change_journal_read_usn_record(\n           pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error  = NULL;\n\tPyObject *string_object   = NULL;\n\tstatic char *function     = \"pyfsntfs_usn_change_journal_read_usn_record\";\n\tchar *usn_record_data     = NULL;\n\tsize_t journal_block_size = 0x1000;\n\tssize_t read_count        = 0;\n\n\tif( pyfsntfs_usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid USN change journal.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_usn_change_journal->usn_change_journal == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid USN change journal - missing libfsntfs USN change journal.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n/* TODO get journal block size from USN change journal */\n\tif( ( journal_block_size == 0 )\n\t || ( journal_block_size > (size_t) SSIZE_MAX ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid argument read size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tstring_object = PyBytes_FromStringAndSize(\n\t                 NULL,\n\t                 journal_block_size );\n\n\tusn_record_data = PyBytes_AsString(\n\t                   string_object );\n#else\n\t/* Note that a size of 0 is not supported\n\t */\n\tstring_object = PyString_FromStringAndSize(\n\t                 NULL,\n\t                 journal_block_size );\n\n\tusn_record_data = PyString_AsString(\n\t                   string_object );\n#endif\n\tPy_BEGIN_ALLOW_THREADS\n\n\tread_count = libfsntfs_usn_change_journal_read_usn_record(\n\t              pyfsntfs_usn_change_journal->usn_change_journal,\n\t              (uint8_t *) usn_record_data,\n\t              (size_t) journal_block_size,\n\t              &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( read_count <= -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to read data.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\t/* Need to resize the string here in case journal_block_size was not fully read.\n\t */\n#if PY_MAJOR_VERSION >= 3\n\tif( _PyBytes_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#else\n\tif( _PyString_Resize(\n\t     &string_object,\n\t     (Py_ssize_t) read_count ) != 0 )\n#endif\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) string_object );\n\n\t\treturn( NULL );\n\t}\n\treturn( string_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_usn_change_journal.h",
    "content": "/*\n * ython object wrapper of libfsntfs_usn_change_journal_t\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_USN_CHANGE_JOURNAL_H )\n#define _PYFSNTFS_USN_CHANGE_JOURNAL_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_usn_change_journal pyfsntfs_usn_change_journal_t;\n\nstruct pyfsntfs_usn_change_journal\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs USN change journal\n\t */\n\tlibfsntfs_usn_change_journal_t *usn_change_journal;\n\n\t/* The parent object\n\t */\n\tPyObject *parent_object;\n};\n\nextern PyMethodDef pyfsntfs_usn_change_journal_object_methods[];\nextern PyTypeObject pyfsntfs_usn_change_journal_type_object;\n\nPyObject *pyfsntfs_usn_change_journal_new(\n           libfsntfs_usn_change_journal_t *usn_change_journal,\n           PyObject *parent_object );\n\nint pyfsntfs_usn_change_journal_init(\n     pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal );\n\nvoid pyfsntfs_usn_change_journal_free(\n      pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal );\n\nPyObject *pyfsntfs_usn_change_journal_get_offset(\n           pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_usn_change_journal_read_usn_record(\n           pyfsntfs_usn_change_journal_t *pyfsntfs_usn_change_journal,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_USN_CHANGE_JOURNAL_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume.c",
    "content": "/*\n * Python object definition of the libfsntfs volume\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_file_object_io_handle.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_string.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_usn_change_journal.h\"\n#include \"pyfsntfs_volume.h\"\n#include \"pyfsntfs_volume_file_entries.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\nPyMethodDef pyfsntfs_volume_object_methods[] = {\n\n\t{ \"signal_abort\",\n\t  (PyCFunction) pyfsntfs_volume_signal_abort,\n\t  METH_NOARGS,\n\t  \"signal_abort() -> None\\n\"\n\t  \"\\n\"\n\t  \"Signals the volume to abort the current activity.\" },\n\n\t/* Functions to access the volume */\n\n\t{ \"open\",\n\t  (PyCFunction) pyfsntfs_volume_open,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open(filename, mode='r') -> None\\n\"\n\t  \"\\n\"\n\t  \"Opens a volume.\" },\n\n\t{ \"open_file_object\",\n\t  (PyCFunction) pyfsntfs_volume_open_file_object,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"open_file_object(file_object, mode='r') -> None\\n\"\n\t  \"\\n\"\n\t  \"Opens a volume using a file-like object.\" },\n\n\t{ \"close\",\n\t  (PyCFunction) pyfsntfs_volume_close,\n\t  METH_NOARGS,\n\t  \"close() -> None\\n\"\n\t  \"\\n\"\n\t  \"Closes a volume.\" },\n\n\t/* Functions to access the volume values */\n\n\t{ \"get_bytes_per_sector\",\n\t  (PyCFunction) pyfsntfs_volume_get_bytes_per_sector,\n\t  METH_NOARGS,\n\t  \"get_bytes_per_sector() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the bytes per sector.\" },\n\n\t{ \"get_cluster_block_size\",\n\t  (PyCFunction) pyfsntfs_volume_get_cluster_block_size,\n\t  METH_NOARGS,\n\t  \"get_cluster_block_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the cluster block size.\" },\n\n\t{ \"get_mft_entry_size\",\n\t  (PyCFunction) pyfsntfs_volume_get_mft_entry_size,\n\t  METH_NOARGS,\n\t  \"get_mft_entry_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the MFT entry size.\" },\n\n\t{ \"get_index_entry_size\",\n\t  (PyCFunction) pyfsntfs_volume_get_index_entry_size,\n\t  METH_NOARGS,\n\t  \"get_index_entry_size() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the index entry size.\" },\n\n\t{ \"get_name\",\n\t  (PyCFunction) pyfsntfs_volume_get_name,\n\t  METH_NOARGS,\n\t  \"get_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the name.\" },\n\n\t{ \"get_serial_number\",\n\t  (PyCFunction) pyfsntfs_volume_get_serial_number,\n\t  METH_NOARGS,\n\t  \"get_serial_number() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the serial number.\" },\n\n\t/* Functions to access the file entries */\n\n\t{ \"get_number_of_file_entries\",\n\t  (PyCFunction) pyfsntfs_volume_get_number_of_file_entries,\n\t  METH_NOARGS,\n\t  \"get_number_of_file_entries() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the number of file entries.\" },\n\n\t{ \"get_file_entry\",\n\t  (PyCFunction) pyfsntfs_volume_get_file_entry,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_file_entry(file_entry_index) -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a specific file entry.\" },\n\n\t{ \"get_root_directory\",\n\t  (PyCFunction) pyfsntfs_volume_get_root_directory,\n\t  METH_NOARGS,\n\t  \"get_root_directory() -> Object\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the root directory.\" },\n\n\t{ \"get_file_entry_by_path\",\n\t  (PyCFunction) pyfsntfs_volume_get_file_entry_by_path,\n\t  METH_VARARGS | METH_KEYWORDS,\n\t  \"get_file_entry_by_path(path) -> Object or None\\n\"\n\t  \"\\n\"\n\t  \"Retrieves a file entry specified by the path.\" },\n\n\t{ \"get_usn_change_journal\",\n\t  (PyCFunction) pyfsntfs_volume_get_usn_change_journal,\n\t  METH_NOARGS,\n\t  \"get_usn_change_journal() -> Object or None\\n\"\n\t  \"\\n\"\n\t  \"Retrieves the USN change journal.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_volume_object_get_set_definitions[] = {\n\n\t{ \"bytes_per_sector\",\n\t  (getter) pyfsntfs_volume_get_bytes_per_sector,\n\t  (setter) 0,\n\t  \"The bytes per sector.\",\n\t  NULL },\n\n\t{ \"cluster_block_size\",\n\t  (getter) pyfsntfs_volume_get_cluster_block_size,\n\t  (setter) 0,\n\t  \"The cluster block size.\",\n\t  NULL },\n\n\t{ \"mft_entry_size\",\n\t  (getter) pyfsntfs_volume_get_mft_entry_size,\n\t  (setter) 0,\n\t  \"The MFT entry size.\",\n\t  NULL },\n\n\t{ \"index_entry_size\",\n\t  (getter) pyfsntfs_volume_get_index_entry_size,\n\t  (setter) 0,\n\t  \"The index entry size.\",\n\t  NULL },\n\n\t{ \"name\",\n\t  (getter) pyfsntfs_volume_get_name,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t{ \"serial_number\",\n\t  (getter) pyfsntfs_volume_get_serial_number,\n\t  (setter) 0,\n\t  \"The serial number.\",\n\t  NULL },\n\n\t{ \"number_of_file_entries\",\n\t  (getter) pyfsntfs_volume_get_number_of_file_entries,\n\t  (setter) 0,\n\t  \"The number of file entries.\",\n\t  NULL },\n\n\t{ \"file_entries\",\n\t  (getter) pyfsntfs_volume_get_file_entries,\n\t  (setter) 0,\n\t  \"The file entries\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_volume_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.volume\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_volume_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_volume_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs volume object (wraps libfsntfs_volume_t)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_volume_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_volume_object_get_set_definitions,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_volume_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Initializes a volume object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_volume_init(\n     pyfsntfs_volume_t *pyfsntfs_volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_init\";\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure libfsntfs volume is set to NULL\n\t */\n\tpyfsntfs_volume->volume         = NULL;\n\tpyfsntfs_volume->file_io_handle = NULL;\n\n\tif( libfsntfs_volume_initialize(\n\t     &( pyfsntfs_volume->volume ),\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize volume.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( -1 );\n\t}\n\treturn( 0 );\n}\n\n/* Frees a volume object\n */\nvoid pyfsntfs_volume_free(\n      pyfsntfs_volume_t *pyfsntfs_volume )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_free\";\n\tint result                  = 0;\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_volume );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_volume->file_io_handle != NULL )\n\t{\n\t\tif( pyfsntfs_volume_close(\n\t\t     pyfsntfs_volume,\n\t\t     NULL ) == NULL )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\tif( pyfsntfs_volume->volume != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_volume_free(\n\t\t          &( pyfsntfs_volume->volume ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libfsntfs volume.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_volume );\n}\n\n/* Signals the volume to abort the current activity\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_signal_abort(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_signal_abort\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_signal_abort(\n\t          pyfsntfs_volume->volume,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to signal abort.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n}\n\n/* Opens a volume\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_open(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *string_object      = NULL;\n\tlibcerror_error_t *error     = NULL;\n\tconst char *filename_narrow  = NULL;\n\tstatic char *function        = \"pyfsntfs_volume_open\";\n\tstatic char *keyword_list[]  = { \"filename\", \"mode\", NULL };\n\tchar *mode                   = NULL;\n\tint result                   = 0;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tconst wchar_t *filename_wide = NULL;\n#else\n\tPyObject *utf8_string_object = NULL;\n#endif\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Note that PyArg_ParseTupleAndKeywords with \"s\" will force Unicode strings to be converted to narrow character string.\n\t * On Windows the narrow character strings contains an extended ASCII string with a codepage. Hence we get a conversion\n\t * exception. This will also fail if the default encoding is not set correctly. We cannot use \"u\" here either since that\n\t * does not allow us to pass non Unicode string objects and Python (at least 2.7) does not seems to automatically upcast them.\n\t */\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O|s\",\n\t     keyword_list,\n\t     &string_object,\n\t     &mode ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( ( mode != NULL )\n\t && ( mode[ 0 ] != 'r' ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unsupported mode: %s.\",\n\t\t function,\n\t\t mode );\n\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyUnicode_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t\t PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type Unicode.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsWideCharString(\n\t\t                             string_object,\n\t\t                             NULL );\n#else\n\t\tfilename_wide = (wchar_t *) PyUnicode_AsUnicode(\n\t\t                             string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_volume_open_wide(\n\t\t          pyfsntfs_volume->volume,\n\t\t          filename_wide,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tPyMem_Free(\n\t\t filename_wide );\n#endif\n#else\n\t\tutf8_string_object = PyUnicode_AsUTF8String(\n\t\t                      string_object );\n\n\t\tif( utf8_string_object == NULL )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to convert Unicode string to UTF-8.\",\n\t\t\t function );\n\n\t\t\treturn( NULL );\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t                   utf8_string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t                   utf8_string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_volume_open(\n\t\t          pyfsntfs_volume->volume,\n\t\t          filename_narrow,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n#endif\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to open volume.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyBytes_Type );\n#else\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyString_Type );\n#endif\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t\t PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type string.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\telse if( result != 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\t\tfilename_narrow = PyBytes_AsString(\n\t\t                   string_object );\n#else\n\t\tfilename_narrow = PyString_AsString(\n\t\t                   string_object );\n#endif\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libfsntfs_volume_open(\n\t\t          pyfsntfs_volume->volume,\n\t\t          filename_narrow,\n\t\t          LIBFSNTFS_OPEN_READ,\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_IOError,\n\t\t\t \"%s: unable to open volume.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tPyErr_Format(\n\t PyExc_TypeError,\n\t \"%s: unsupported string object type.\",\n\t function );\n\n\treturn( NULL );\n}\n\n/* Opens a volume using a file-like object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_open_file_object(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_object       = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_open_file_object\";\n\tstatic char *keyword_list[] = { \"file_object\", \"mode\", NULL };\n\tchar *mode                  = NULL;\n\tint result                  = 0;\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O|s\",\n\t     keyword_list,\n\t     &file_object,\n\t     &mode ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tif( ( mode != NULL )\n\t && ( mode[ 0 ] != 'r' ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: unsupported mode: %s.\",\n\t\t function,\n\t\t mode );\n\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_HasAttrString(\n\t          file_object,\n\t          \"read\" );\n\n\tif( result != 1 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: unsupported file object - missing read attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_HasAttrString(\n\t          file_object,\n\t          \"seek\" );\n\n\tif( result != 1 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: unsupported file object - missing seek attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume->file_io_handle != NULL )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: invalid volume - file IO handle already set.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_file_object_initialize(\n\t     &( pyfsntfs_volume->file_io_handle ),\n\t     file_object,\n\t     &error ) != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize file IO handle.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          pyfsntfs_volume->volume,\n\t          pyfsntfs_volume->file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to open volume.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n\non_error:\n\tif( pyfsntfs_volume->file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &( pyfsntfs_volume->file_io_handle ),\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Closes a volume\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_close(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_close\";\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_close(\n\t          pyfsntfs_volume->volume,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 0 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to close volume.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume->file_io_handle != NULL )\n\t{\n\t\tPy_BEGIN_ALLOW_THREADS\n\n\t\tresult = libbfio_handle_free(\n\t\t          &( pyfsntfs_volume->file_io_handle ),\n\t\t          &error );\n\n\t\tPy_END_ALLOW_THREADS\n\n\t\tif( result != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t\t PyExc_MemoryError,\n\t\t\t \"%s: unable to free libbfio file IO handle.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\treturn( NULL );\n\t\t}\n\t}\n\tPy_IncRef(\n\t Py_None );\n\n\treturn( Py_None );\n}\n\n/* Retrieves the bytes per sector\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_bytes_per_sector(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object  = NULL;\n\tlibcerror_error_t *error  = NULL;\n\tstatic char *function     = \"pyfsntfs_volume_get_bytes_per_sector\";\n\tuint16_t bytes_per_sector = 0;\n\tint result                = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_bytes_per_sector(\n\t          pyfsntfs_volume->volume,\n\t          &bytes_per_sector,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve bytes per sector.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3\n\tinteger_object = PyLong_FromLong(\n\t                  (long) bytes_per_sector );\n#else\n\tinteger_object = PyInt_FromLong(\n\t                  (long) bytes_per_sector );\n#endif\n\treturn( integer_object );\n}\n\n/* Retrieves the cluster block size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_cluster_block_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object    = NULL;\n\tlibcerror_error_t *error    = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_get_cluster_block_size\";\n\tsize32_t cluster_block_size = 0;\n\tint result                  = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_cluster_block_size(\n\t          pyfsntfs_volume->volume,\n\t          &cluster_block_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: failed to retrieve cluster block size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLong(\n\t                  (unsigned long) cluster_block_size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the MFT entry size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_mft_entry_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object = NULL;\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_get_mft_entry_size\";\n\tsize32_t mft_entry_size  = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_mft_entry_size(\n\t          pyfsntfs_volume->volume,\n\t          &mft_entry_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: failed to retrieve MFT entry size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLong(\n\t                  (unsigned long) mft_entry_size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the index entry size\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_index_entry_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object  = NULL;\n\tlibcerror_error_t *error  = NULL;\n\tstatic char *function     = \"pyfsntfs_volume_get_index_entry_size\";\n\tsize32_t index_entry_size = 0;\n\tint result                = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_index_entry_size(\n\t          pyfsntfs_volume->volume,\n\t          &index_entry_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: failed to retrieve index entry size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = PyLong_FromUnsignedLong(\n\t                  (unsigned long) index_entry_size );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_name(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_get_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_utf8_name_size(\n\t          pyfsntfs_volume->volume,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_utf8_name(\n\t\t  pyfsntfs_volume->volume,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the serial number\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_serial_number(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tPyObject *integer_object = NULL;\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_get_serial_number\";\n\tuint64_t value_64bit     = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_serial_number(\n\t          pyfsntfs_volume->volume,\n\t          &value_64bit,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve serial number.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) value_64bit );\n\n\treturn( integer_object );\n}\n\n/* Retrieves the number of file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_number_of_file_entries(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error        = NULL;\n\tPyObject *integer_object        = NULL;\n\tstatic char *function           = \"pyfsntfs_volume_get_number_of_file_entries\";\n\tuint64_t number_of_file_entries = 0;\n\tint result                      = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t          pyfsntfs_volume->volume,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  number_of_file_entries );\n\n\treturn( integer_object );\n}\n\n/* Retrieves a specific file entry by index\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_file_entry_by_index(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           uint64_t file_entry_index )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tPyObject *file_entry_object        = NULL;\n\tstatic char *function              = \"pyfsntfs_volume_get_file_entry_by_index\";\n\tint result                         = 0;\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          pyfsntfs_volume->volume,\n\t          file_entry_index,\n\t          &file_entry,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file entry: %\" PRIu64 \".\",\n\t\t function,\n\t\t file_entry_index );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_new(\n\t                     file_entry,\n\t                     (PyObject *) pyfsntfs_volume );\n\n\tif( file_entry_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entry object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( file_entry_object );\n\non_error:\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves a specific file entry\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_file_entry(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *keyword_list[] = { \"file_entry_index\", NULL };\n\tint file_entry_index        = 0;\n\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"i\",\n\t     keyword_list,\n\t     &file_entry_index ) == 0 )\n\t{\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_volume_get_file_entry_by_index(\n\t                     pyfsntfs_volume,\n\t                     file_entry_index );\n\n\treturn( file_entry_object );\n}\n\n/* Retrieves a file entries sequence and iterator object for the volume file entries\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_file_entries(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error             = NULL;\n\tPyObject *volume_file_entries_object = NULL;\n\tstatic char *function                = \"pyfsntfs_volume_get_file_entries\";\n\tuint64_t number_of_file_entries      = 0;\n\tint result                           = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t          pyfsntfs_volume->volume,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve number of file entries.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tvolume_file_entries_object = pyfsntfs_volume_file_entries_new(\n\t                              pyfsntfs_volume,\n\t                              &pyfsntfs_volume_get_file_entry_by_index,\n\t                              number_of_file_entries );\n\n\tif( volume_file_entries_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create volume file entries object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\treturn( volume_file_entries_object );\n}\n\n/* Retrieves the file entry specified by the path\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_file_entry_by_path(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords )\n{\n\tPyObject *file_entry_object        = NULL;\n\tPyObject *string_object            = NULL;\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tstatic char *function              = \"pyfsntfs_volume_get_file_entry_by_path\";\n\tstatic char *keyword_list[]        = { \"path\", NULL };\n\tchar *path                         = NULL;\n\tconst char *narrow_string          = NULL;\n\tsize_t path_length                 = 0;\n\tsize_t path_size                   = 0;\n\tint result                         = 0;\n\n#if PY_MAJOR_VERSION <= 2 || ( PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION <= 2 )\n\tPyObject *utf8_string_object       = NULL;\n#endif\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( PyArg_ParseTupleAndKeywords(\n\t     arguments,\n\t     keywords,\n\t     \"O\",\n\t     keyword_list,\n\t     &string_object ) == 0 )\n\t{\n\t\tgoto on_error;\n\t}\n\tPyErr_Clear();\n\n\tresult = PyObject_IsInstance(\n\t          string_object,\n\t          (PyObject *) &PyUnicode_Type );\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_fetch_and_raise(\n\t         PyExc_RuntimeError,\n\t\t \"%s: unable to determine if string object is of type Unicode.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\telse if( result != 0 )\n\t{\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\t\tif( pyfsntfs_string_copy_to_utf8_rfc2279(\n\t\t     string_object,\n\t\t     (uint8_t **) &path,\n\t\t     &path_size,\n\t\t     &error ) != 1 )\n\t\t{\n\t\t\tpyfsntfs_error_raise(\n\t\t\t error,\n\t\t         PyExc_RuntimeError,\n\t\t\t \"%s: unable to copy string object to UTF-8 string.\",\n\t\t\t function );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tnarrow_string = path;\n\t\tpath_length   = path_size - 1;\n#else\n\t\tPyErr_Clear();\n\n\t\tutf8_string_object = PyUnicode_AsUTF8String(\n\t\t                      string_object );\n\n\t\tif( utf8_string_object == NULL )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t\t PyExc_RuntimeError,\n\t\t\t \"%s: unable to convert Unicode string to UTF-8.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n#if PY_MAJOR_VERSION >= 3\n\t\tnarrow_string = PyBytes_AsString(\n\t\t                 utf8_string_object );\n#else\n\t\tnarrow_string = PyString_AsString(\n\t\t                 utf8_string_object );\n#endif\n\t\tpath_length = narrow_string_length(\n\t\t               narrow_string );\n#endif\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\t\tresult = PyObject_IsInstance(\n\t\t\t  string_object,\n\t\t\t  (PyObject *) &PyBytes_Type );\n#else\n\t\tresult = PyObject_IsInstance(\n\t\t\t  string_object,\n\t\t\t  (PyObject *) &PyString_Type );\n#endif\n\t\tif( result == -1 )\n\t\t{\n\t\t\tpyfsntfs_error_fetch_and_raise(\n\t\t         PyExc_RuntimeError,\n\t\t\t \"%s: unable to determine if string object is of type string.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\telse if( result == 0 )\n\t\t{\n\t\t\tPyErr_Format(\n\t\t\t PyExc_TypeError,\n\t\t\t \"%s: unsupported string object type.\",\n\t\t\t function );\n\n\t\t\tgoto on_error;\n\t\t}\n\t\tPyErr_Clear();\n\n#if PY_MAJOR_VERSION >= 3\n\t\tnarrow_string = PyBytes_AsString(\n\t\t                 string_object );\n#else\n\t\tnarrow_string = PyString_AsString(\n\t\t                 string_object );\n#endif\n\t\tpath_length = narrow_string_length(\n\t\t               narrow_string );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t           pyfsntfs_volume->volume,\n\t           (uint8_t *) narrow_string,\n\t           path_length,\n\t           &file_entry,\n\t           &error );\n\n\tPy_END_ALLOW_THREADS\n\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\tif( path != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t path );\n\n\t\tpath = NULL;\n\t}\n#else\n\tif( utf8_string_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n\n\t\tutf8_string_object = NULL;\n\t}\n#endif\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve file entry.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Check if the file entry is present\n\t */\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_new(\n\t                     file_entry,\n\t                     (PyObject *) pyfsntfs_volume );\n\n\tif( file_entry_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entry object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( file_entry_object );\n\non_error:\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3\n\tif( path != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t path );\n\t}\n#else\n\tif( utf8_string_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t utf8_string_object );\n\t}\n#endif\n\treturn( NULL );\n}\n\n/* Retrieves the root directory\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_root_directory(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error               = NULL;\n\tlibfsntfs_file_entry_t *root_directory = NULL;\n\tPyObject *file_entry_object            = NULL;\n\tstatic char *function                  = \"pyfsntfs_volume_get_root_directory\";\n\tint result                             = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_root_directory(\n\t          pyfsntfs_volume->volume,\n\t          &root_directory,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve root directory.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\tfile_entry_object = pyfsntfs_file_entry_new(\n\t                     root_directory,\n\t                     (PyObject *) pyfsntfs_volume );\n\n\tif( file_entry_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create file entry object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( file_entry_object );\n\non_error:\n\tif( root_directory != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &root_directory,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n/* Retrieves the USN change journal\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_get_usn_change_journal(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_usn_change_journal_t *usn_change_journal = NULL;\n\tPyObject *usn_change_journal_object                = NULL;\n\tstatic char *function                              = \"pyfsntfs_volume_get_usn_change_journal\";\n\tint result                                         = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_volume == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_get_usn_change_journal(\n\t          pyfsntfs_volume->volume,\n\t          &usn_change_journal,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve USN change journal.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tusn_change_journal_object = pyfsntfs_usn_change_journal_new(\n\t                             usn_change_journal,\n\t                             (PyObject *) pyfsntfs_volume );\n\n\tif( usn_change_journal_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create USN change journal object.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( usn_change_journal_object );\n\non_error:\n\tif( usn_change_journal != NULL )\n\t{\n\t\tlibfsntfs_usn_change_journal_free(\n\t\t &usn_change_journal,\n\t\t NULL );\n\t}\n\treturn( NULL );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume.h",
    "content": "/*\n * Python object definition of the libfsntfs volume\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_VOLUME_H )\n#define _PYFSNTFS_VOLUME_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_libbfio.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_volume pyfsntfs_volume_t;\n\nstruct pyfsntfs_volume\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The libfsntfs volume\n\t */\n\tlibfsntfs_volume_t *volume;\n\n\t/* The libbfio file IO handle\n\t */\n\tlibbfio_handle_t *file_io_handle;\n};\n\nextern PyMethodDef pyfsntfs_volume_object_methods[];\nextern PyTypeObject pyfsntfs_volume_type_object;\n\nint pyfsntfs_volume_init(\n     pyfsntfs_volume_t *pyfsntfs_volume );\n\nvoid pyfsntfs_volume_free(\n      pyfsntfs_volume_t *pyfsntfs_volume );\n\nPyObject *pyfsntfs_volume_signal_abort(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_open(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_volume_open_file_object(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_volume_close(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_bytes_per_sector(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_cluster_block_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_mft_entry_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_index_entry_size(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_name(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_serial_number(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_number_of_file_entries(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_file_entry_by_index(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           uint64_t file_entry_index );\n\nPyObject *pyfsntfs_volume_get_file_entry(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_volume_get_file_entries(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_file_entry_by_path(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments,\n           PyObject *keywords );\n\nPyObject *pyfsntfs_volume_get_root_directory(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_get_usn_change_journal(\n           pyfsntfs_volume_t *pyfsntfs_volume,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_VOLUME_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_file_entries.c",
    "content": "/*\n * Python object definition of the volume file entries sequence and iterator\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_volume_file_entries.h\"\n\nPySequenceMethods pyfsntfs_volume_file_entries_sequence_methods = {\n\t/* sq_length */\n\t(lenfunc) pyfsntfs_volume_file_entries_len,\n\t/* sq_concat */\n\t0,\n\t/* sq_repeat */\n\t0,\n\t/* sq_item */\n\t(ssizeargfunc) pyfsntfs_volume_file_entries_getitem,\n\t/* sq_slice */\n\t0,\n\t/* sq_ass_item */\n\t0,\n\t/* sq_ass_slice */\n\t0,\n\t/* sq_contains */\n\t0,\n\t/* sq_inplace_concat */\n\t0,\n\t/* sq_inplace_repeat */\n\t0\n};\n\nPyTypeObject pyfsntfs_volume_file_entries_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs._volume_file_entries\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_volume_file_entries_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t(destructor) pyfsntfs_volume_file_entries_free,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t&pyfsntfs_volume_file_entries_sequence_methods,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,\n\t/* tp_doc */\n\t\"internal pyfsntfs volume file entries sequence and iterator object\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t(getiterfunc) pyfsntfs_volume_file_entries_iter,\n\t/* tp_iternext */\n\t(iternextfunc) pyfsntfs_volume_file_entries_iternext,\n\t/* tp_methods */\n\t0,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\t0,\n\t/* tp_base */\n\t0,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t(initproc) pyfsntfs_volume_file_entries_init,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Creates a new volume file entries object\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_file_entries_new(\n           pyfsntfs_volume_t *volume_object,\n           PyObject* (*get_file_entry_by_index)(\n                        pyfsntfs_volume_t *volume_object,\n                        uint64_t file_entry_index ),\n           uint64_t number_of_file_entries )\n{\n\tpyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries = NULL;\n\tstatic char *function                                       = \"pyfsntfs_volume_file_entries_new\";\n\n\tif( volume_object == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume object.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\t/* Make sure the volume file entries values are initialized\n\t */\n\tpyfsntfs_volume_file_entries = PyObject_New(\n\t                                struct pyfsntfs_volume_file_entries,\n\t                                &pyfsntfs_volume_file_entries_type_object );\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize volume file entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( pyfsntfs_volume_file_entries_init(\n\t     pyfsntfs_volume_file_entries ) != 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to initialize volume file entries.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tpyfsntfs_volume_file_entries->volume_object            = volume_object;\n\tpyfsntfs_volume_file_entries->get_file_entry_by_index = get_file_entry_by_index;\n\tpyfsntfs_volume_file_entries->number_of_file_entries  = number_of_file_entries;\n\n\tPy_IncRef(\n\t (PyObject *) pyfsntfs_volume_file_entries->volume_object );\n\n\treturn( (PyObject *) pyfsntfs_volume_file_entries );\n\non_error:\n\tif( pyfsntfs_volume_file_entries != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_volume_file_entries );\n\t}\n\treturn( NULL );\n}\n\n/* Initializes a volume file entries object\n * Returns 0 if successful or -1 on error\n */\nint pyfsntfs_volume_file_entries_init(\n     pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_volume_file_entries_init\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t/* Make sure the volume file entries values are initialized\n\t */\n\tpyfsntfs_volume_file_entries->volume_object           = NULL;\n\tpyfsntfs_volume_file_entries->get_file_entry_by_index = NULL;\n\tpyfsntfs_volume_file_entries->file_entry_index        = 0;\n\tpyfsntfs_volume_file_entries->number_of_file_entries  = 0;\n\n\treturn( 0 );\n}\n\n/* Frees a volume file entries object\n */\nvoid pyfsntfs_volume_file_entries_free(\n      pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries )\n{\n\tstruct _typeobject *ob_type = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_file_entries_free\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tob_type = Py_TYPE(\n\t           pyfsntfs_volume_file_entries );\n\n\tif( ob_type == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: missing ob_type.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( ob_type->tp_free == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid ob_type - missing tp_free.\",\n\t\t function );\n\n\t\treturn;\n\t}\n\tif( pyfsntfs_volume_file_entries->volume_object != NULL )\n\t{\n\t\tPy_DecRef(\n\t\t (PyObject *) pyfsntfs_volume_file_entries->volume_object );\n\t}\n\tob_type->tp_free(\n\t (PyObject*) pyfsntfs_volume_file_entries );\n}\n\n/* The volume file entries len() function\n */\nPy_ssize_t pyfsntfs_volume_file_entries_len(\n            pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_volume_file_entries_len\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( (Py_ssize_t) pyfsntfs_volume_file_entries->number_of_file_entries );\n}\n\n/* The volume file entries getitem() function\n */\nPyObject *pyfsntfs_volume_file_entries_getitem(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries,\n           Py_ssize_t item_index )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_file_entries_getitem\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries - missing get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->number_of_file_entries < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries - invalid number of file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( ( item_index < 0 )\n\t || ( item_index >= (Py_ssize_t) pyfsntfs_volume_file_entries->number_of_file_entries ) )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid invalid item index value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_volume_file_entries->get_file_entry_by_index(\n\t                     pyfsntfs_volume_file_entries->volume_object,\n\t                     (uint64_t) item_index );\n\n\treturn( file_entry_object );\n}\n\n/* The volume file entries iter() function\n */\nPyObject *pyfsntfs_volume_file_entries_iter(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries )\n{\n\tstatic char *function = \"pyfsntfs_volume_file_entries_iter\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_IncRef(\n\t (PyObject *) pyfsntfs_volume_file_entries );\n\n\treturn( (PyObject *) pyfsntfs_volume_file_entries );\n}\n\n/* The volume file entries iternext() function\n */\nPyObject *pyfsntfs_volume_file_entries_iternext(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries )\n{\n\tPyObject *file_entry_object = NULL;\n\tstatic char *function       = \"pyfsntfs_volume_file_entries_iternext\";\n\n\tif( pyfsntfs_volume_file_entries == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->get_file_entry_by_index == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries - missing get file entry by index function.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->file_entry_index < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries - invalid file entry index.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->number_of_file_entries < 0 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_ValueError,\n\t\t \"%s: invalid volume file entries - invalid number of file entries.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( pyfsntfs_volume_file_entries->file_entry_index >= pyfsntfs_volume_file_entries->number_of_file_entries )\n\t{\n\t\tPyErr_SetNone(\n\t\t PyExc_StopIteration );\n\n\t\treturn( NULL );\n\t}\n\tfile_entry_object = pyfsntfs_volume_file_entries->get_file_entry_by_index(\n\t                     pyfsntfs_volume_file_entries->volume_object,\n\t                     pyfsntfs_volume_file_entries->file_entry_index );\n\n\tif( file_entry_object != NULL )\n\t{\n\t\tpyfsntfs_volume_file_entries->file_entry_index++;\n\t}\n\treturn( file_entry_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_file_entries.h",
    "content": "/*\n * Python object definition of the volume file entries sequence and iterator\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_VOLUME_FILE_ENTRIES_H )\n#define _PYFSNTFS_VOLUME_FILE_ENTRIES_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_file_entry.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_volume.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\ntypedef struct pyfsntfs_volume_file_entries pyfsntfs_volume_file_entries_t;\n\nstruct pyfsntfs_volume_file_entries\n{\n\t/* Python object initialization\n\t */\n\tPyObject_HEAD\n\n\t/* The volume object\n\t */\n\tpyfsntfs_volume_t *volume_object;\n\n\t/* The get file entry by index callback function\n\t */\n\tPyObject* (*get_file_entry_by_index)(\n\t             pyfsntfs_volume_t *volume_object,\n\t             uint64_t file_entry_index );\n\n\t/* The (current) file entry index\n\t */\n\tuint64_t file_entry_index;\n\n\t/* The number of file entries\n\t */\n\tuint64_t number_of_file_entries;\n};\n\nextern PyTypeObject pyfsntfs_volume_file_entries_type_object;\n\nPyObject *pyfsntfs_volume_file_entries_new(\n           pyfsntfs_volume_t *volume,\n           PyObject* (*get_file_entry_by_index)(\n                        pyfsntfs_volume_t *volume_object,\n                        uint64_t file_entry_index ),\n           uint64_t number_of_file_entries );\n\nint pyfsntfs_volume_file_entries_init(\n     pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries );\n\nvoid pyfsntfs_volume_file_entries_free(\n      pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries );\n\nPy_ssize_t pyfsntfs_volume_file_entries_len(\n            pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries );\n\nPyObject *pyfsntfs_volume_file_entries_getitem(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries,\n           Py_ssize_t item_index );\n\nPyObject *pyfsntfs_volume_file_entries_iter(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries );\n\nPyObject *pyfsntfs_volume_file_entries_iternext(\n           pyfsntfs_volume_file_entries_t *pyfsntfs_volume_file_entries );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_VOLUME_FILE_ENTRIES_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_information_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs volume information attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_datetime.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_volume_information_attribute.h\"\n\nPyMethodDef pyfsntfs_volume_information_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_version\",\n\t  (PyCFunction) pyfsntfs_volume_information_attribute_get_version,\n\t  METH_NOARGS,\n\t  \"get_version() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the version.\" },\n\n\t{ \"get_flags\",\n\t  (PyCFunction) pyfsntfs_volume_information_attribute_get_flags,\n\t  METH_NOARGS,\n\t  \"get_flags() -> Integer\\n\"\n\t  \"\\n\"\n\t  \"Returns the flags.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_volume_information_attribute_object_get_set_definitions[] = {\n\n\t{ \"version\",\n\t  (getter) pyfsntfs_volume_information_attribute_get_version,\n\t  (setter) 0,\n\t  \"The version.\",\n\t  NULL },\n\n\t{ \"flags\",\n\t  (getter) pyfsntfs_volume_information_attribute_get_flags,\n\t  (setter) 0,\n\t  \"The flags.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_volume_information_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.volume_information_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs volume information attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_INFORMATION)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_volume_information_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_volume_information_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the version\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_information_attribute_get_version(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tchar version_string[ 4 ];\n\n\tPyObject *string_object  = NULL;\n\tlibcerror_error_t *error = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_information_attribute_get_version\";\n\tuint8_t major_version    = 0;\n\tuint8_t minor_version    = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          pyfsntfs_attribute->attribute,\n\t          &major_version,\n\t          &minor_version,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve version.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\telse if( result == 0 )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tif( major_version > 9 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid major version value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tif( minor_version > 9 )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid minor version value out of bounds.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tversion_string[ 0 ] = '0' + major_version;\n\tversion_string[ 1 ] = '.';\n\tversion_string[ 2 ] = '0' + minor_version;\n\tversion_string[ 3 ] = 0;\n\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t                 version_string,\n\t                 (Py_ssize_t) 3,\n\t                 NULL );\n\n\treturn( string_object );\n}\n\n/* Retrieves the flags\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_information_attribute_get_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *integer_object = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_information_attribute_get_flags\";\n\tuint16_t flags           = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          pyfsntfs_attribute->attribute,\n\t          &flags,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve flags.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\treturn( NULL );\n\t}\n\tinteger_object = pyfsntfs_integer_unsigned_new_from_64bit(\n\t                  (uint64_t) flags );\n\n\treturn( integer_object );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_information_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs volume information attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H )\n#define _PYFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_volume_information_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_volume_information_attribute_type_object;\n\nPyObject *pyfsntfs_volume_information_attribute_get_version(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\nPyObject *pyfsntfs_volume_information_attribute_get_flags(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_VOLUME_INFORMATION_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_name_attribute.c",
    "content": "/*\n * Python object definition of the libfsntfs volume name attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_error.h\"\n#include \"pyfsntfs_integer.h\"\n#include \"pyfsntfs_libcerror.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n#include \"pyfsntfs_unused.h\"\n#include \"pyfsntfs_volume_name_attribute.h\"\n\nPyMethodDef pyfsntfs_volume_name_attribute_object_methods[] = {\n\n\t/* Functions to access the attribute values */\n\n\t{ \"get_name\",\n\t  (PyCFunction) pyfsntfs_volume_name_attribute_get_name,\n\t  METH_NOARGS,\n\t  \"get_name() -> Unicode string or None\\n\"\n\t  \"\\n\"\n\t  \"Returns the name.\" },\n\n\t/* Sentinel */\n\t{ NULL, NULL, 0, NULL }\n};\n\nPyGetSetDef pyfsntfs_volume_name_attribute_object_get_set_definitions[] = {\n\n\t{ \"name\",\n\t  (getter) pyfsntfs_volume_name_attribute_get_name,\n\t  (setter) 0,\n\t  \"The name.\",\n\t  NULL },\n\n\t/* Sentinel */\n\t{ NULL, NULL, NULL, NULL, NULL }\n};\n\nPyTypeObject pyfsntfs_volume_name_attribute_type_object = {\n\tPyVarObject_HEAD_INIT( NULL, 0 )\n\n\t/* tp_name */\n\t\"pyfsntfs.volume_name_attribute\",\n\t/* tp_basicsize */\n\tsizeof( pyfsntfs_attribute_t ),\n\t/* tp_itemsize */\n\t0,\n\t/* tp_dealloc */\n\t0,\n\t/* tp_print */\n\t0,\n\t/* tp_getattr */\n\t0,\n\t/* tp_setattr */\n\t0,\n\t/* tp_compare */\n\t0,\n\t/* tp_repr */\n\t0,\n\t/* tp_as_number */\n\t0,\n\t/* tp_as_sequence */\n\t0,\n\t/* tp_as_mapping */\n\t0,\n\t/* tp_hash */\n\t0,\n\t/* tp_call */\n\t0,\n\t/* tp_str */\n\t0,\n\t/* tp_getattro */\n\t0,\n\t/* tp_setattro */\n\t0,\n\t/* tp_as_buffer */\n\t0,\n\t/* tp_flags */\n\tPy_TPFLAGS_DEFAULT,\n\t/* tp_doc */\n\t\"pyfsntfs volume name attribute object (wraps libfsntfs_attribute_t type LIBFSNTFS_ATTRIBUTE_TYPE_VOLUME_NAME)\",\n\t/* tp_traverse */\n\t0,\n\t/* tp_clear */\n\t0,\n\t/* tp_richcompare */\n\t0,\n\t/* tp_weaklistoffset */\n\t0,\n\t/* tp_iter */\n\t0,\n\t/* tp_iternext */\n\t0,\n\t/* tp_methods */\n\tpyfsntfs_volume_name_attribute_object_methods,\n\t/* tp_members */\n\t0,\n\t/* tp_getset */\n\tpyfsntfs_volume_name_attribute_object_get_set_definitions,\n\t/* tp_base */\n\t&pyfsntfs_attribute_type_object,\n\t/* tp_dict */\n\t0,\n\t/* tp_descr_get */\n\t0,\n\t/* tp_descr_set */\n\t0,\n\t/* tp_dictoffset */\n\t0,\n\t/* tp_init */\n\t0,\n\t/* tp_alloc */\n\t0,\n\t/* tp_new */\n\t0,\n\t/* tp_free */\n\t0,\n\t/* tp_is_gc */\n\t0,\n\t/* tp_bases */\n\tNULL,\n\t/* tp_mro */\n\tNULL,\n\t/* tp_cache */\n\tNULL,\n\t/* tp_subclasses */\n\tNULL,\n\t/* tp_weaklist */\n\tNULL,\n\t/* tp_del */\n\t0\n};\n\n/* Retrieves the name\n * Returns a Python object if successful or NULL on error\n */\nPyObject *pyfsntfs_volume_name_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )\n{\n\tlibcerror_error_t *error = NULL;\n\tPyObject *string_object  = NULL;\n\tuint8_t *name            = NULL;\n\tstatic char *function    = \"pyfsntfs_volume_name_attribute_get_name\";\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\tPYFSNTFS_UNREFERENCED_PARAMETER( arguments )\n\n\tif( pyfsntfs_attribute == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_TypeError,\n\t\t \"%s: invalid attribute.\",\n\t\t function );\n\n\t\treturn( NULL );\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          pyfsntfs_attribute->attribute,\n\t          &name_size,\n\t          &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result == -1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name size.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\telse if( ( result == 0 )\n\t      || ( name_size == 0 ) )\n\t{\n\t\tPy_IncRef(\n\t\t Py_None );\n\n\t\treturn( Py_None );\n\t}\n\tname = (uint8_t *) PyMem_Malloc(\n\t                    sizeof( uint8_t ) * name_size );\n\n\tif( name == NULL )\n\t{\n\t\tPyErr_Format(\n\t\t PyExc_MemoryError,\n\t\t \"%s: unable to create name.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tPy_BEGIN_ALLOW_THREADS\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t\t  pyfsntfs_attribute->attribute,\n\t\t  name,\n\t\t  name_size,\n\t\t  &error );\n\n\tPy_END_ALLOW_THREADS\n\n\tif( result != 1 )\n\t{\n\t\tpyfsntfs_error_raise(\n\t\t error,\n\t\t PyExc_IOError,\n\t\t \"%s: unable to retrieve name.\",\n\t\t function );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tgoto on_error;\n\t}\n\t/* Pass the string length to PyUnicode_DecodeUTF8\n\t * otherwise it makes the end of string character is part\n\t * of the string\n\t */\n\tstring_object = PyUnicode_DecodeUTF8(\n\t\t\t (char *) name,\n\t\t\t (Py_ssize_t) name_size - 1,\n\t\t\t NULL );\n\n\tPyMem_Free(\n\t name );\n\n\treturn( string_object );\n\non_error:\n\tif( name != NULL )\n\t{\n\t\tPyMem_Free(\n\t\t name );\n\t}\n\treturn( NULL );\n}\n\n"
  },
  {
    "path": "pyfsntfs/pyfsntfs_volume_name_attribute.h",
    "content": "/*\n * Python object definition of the libfsntfs volume name attribute\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _PYFSNTFS_VOLUME_NAME_ATTRIBUTE_H )\n#define _PYFSNTFS_VOLUME_NAME_ATTRIBUTE_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"pyfsntfs_attribute.h\"\n#include \"pyfsntfs_libfsntfs.h\"\n#include \"pyfsntfs_python.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nextern PyMethodDef pyfsntfs_volume_name_attribute_object_methods[];\nextern PyTypeObject pyfsntfs_volume_name_attribute_type_object;\n\nPyObject *pyfsntfs_volume_name_attribute_get_name(\n           pyfsntfs_attribute_t *pyfsntfs_attribute,\n           PyObject *arguments );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _PYFSNTFS_VOLUME_NAME_ATTRIBUTE_H ) */\n\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n"
  },
  {
    "path": "runtests.ps1",
    "content": "# Script that runs the tests\n#\n# Version: 20220103\n\n$ExitSuccess = 0\n$ExitFailure = 1\n$ExitIgnore = 77\n\nSet-Location -Path \"tests\"\n\n$Result = ${ExitSuccess}\n\n$Lines = Get-Content \"Makefile.am\"\n$InTests = $FALSE\n\nForeach (${Line} in ${Lines})\n{\n\tIf (${InTests})\n\t{\n\t\tIf (-Not ${Line})\n\t\t{\n\t\t\t${InTests} = $FALSE\n\n\t\t\tContinue\n\t\t}\n\t\t${Line} = ${Line}.TrimStart()\n\n\t\tIf (${Line}.EndsWith(\" \\\"))\n\t\t{\n\t\t\t${Line} = ${Line}.Substring(0, ${Line}.Length - 2)\n\t\t}\n\t\tIf (-Not (${Line}.EndsWith(\".sh\")))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\t${Line} = ${Line}.Substring(0, ${Line}.Length - 3)\n\t\t${Line} = \".\\${Line}.ps1\"\n\n\t\tTry\n\t\t{\n\t\t\tInvoke-Expression ${Line}\n\t\t}\n\t\tCatch\n\t\t{\n\t\t\t$LastExitCode = ${ExitIgnore}\n\t\t}\n\t\tIf (${LastExitCode} -eq ${ExitFailure})\n\t\t{\n\t\t\t$Result = ${ExitFailure}\n\t\t\tWrite-Host \"FAIL\" -foreground Red -nonewline\n\t\t}\n\t\tElseIf (${LastExitCode} -eq ${ExitIgnore})\n\t\t{\n\t\t\tWrite-Host \"SKIP\" -foreground Cyan -nonewline\n\t\t}\n\t\tElse\n\t\t{\n\t\t\tWrite-Host \"PASS\" -foreground Green -nonewline\n\t\t}\n\t\tWrite-Host \": ${Line}\"\n\t}\n\tElseIf (${Line}.StartsWith(\"TESTS = \"))\n\t{\n\t\t${InTests} = $TRUE\n\t}\n}\n\nSet-Location -Path \"..\"\n\nExit ${Result}\n"
  },
  {
    "path": "runtests.sh",
    "content": "#!/usr/bin/env bash\n# Script that runs the tests\n#\n# Version: 20231119\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\n\nrun_configure_make()\n{\n\tlocal CONFIGURE_OPTIONS=$@;\n\n\t./configure ${CONFIGURE_OPTIONS[@]};\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: './configure' failed\";\n\n\t\treturn ${RESULT};\n\tfi\n\n\tmake clean > /dev/null;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'make clean' failed\";\n\n\t\treturn ${RESULT};\n\tfi\n\n\tmake > /dev/null;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'make' failed\";\n\n\t\treturn ${RESULT};\n\tfi\n\treturn ${EXIT_SUCCESS};\n}\n\nrun_configure_make_check()\n{\n\trun_configure_make $@;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\treturn ${RESULT};\n\tfi\n\n\tmake check CHECK_WITH_STDERR=1;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'make check' failed\";\n\n\t\tif test -f tests/test-suite.log;\n\t\tthen\n\t\t\tcat tests/test-suite.log;\n\t\tfi\n\n\t\treturn ${RESULT};\n\tfi\n\treturn ${EXIT_SUCCESS};\n}\n\nrun_configure_make_check_with_asan()\n{\n\tlocal LDCONFIG=`which ldconfig 2> /dev/null`;\n\n\tif test -z ${LDCONFIG} || test ! -x ${LDCONFIG};\n\tthen\n\t\treturn ${EXIT_SUCCESS};\n\tfi\n\tlocal LIBASAN=`ldconfig -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`;\n\n\tif test -z ${LIBASAN} || test ! -f ${LIBASAN};\n\tthen\n\t\treturn ${EXIT_SUCCESS};\n\tfi\n\n\t# Using libasan is platform dependent.\n\texport CPPFLAGS=\"-DHAVE_ASAN\";\n\texport CFLAGS=\"-fno-omit-frame-pointer -fsanitize=address -g\";\n\texport LDFLAGS=\"-fsanitize=address -g\";\n\n\tif test -z ${CC} || test ${CC} != \"clang\";\n\tthen\n\t\tLDFLAGS=\"${LDFLAGS} -lasan\";\n\tfi\n\n\trun_configure_make $@;\n\tRESULT=$?;\n\n\texport CPPFLAGS=;\n\texport CFLAGS=;\n\texport LDFLAGS=;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\treturn ${RESULT};\n\tfi\n\n\tmake check CHECK_WITH_ASAN=1 CHECK_WITH_STDERR=1;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'make check' failed\";\n\n\t\tif test -f tests/test-suite.log;\n\t\tthen\n\t\t\tcat tests/test-suite.log;\n\t\tfi\n\n\t\treturn ${RESULT};\n\tfi\n\treturn ${RESULT};\n}\n\nrun_configure_make_check_with_coverage()\n{\n\t# Disable optimization so we can hook malloc and realloc.\n\texport CPPFLAGS=\"-DOPTIMIZATION_DISABLED\";\n\texport CFLAGS=\"--coverage -O0\";\n\texport LDFLAGS=\"--coverage\";\n\n\t# Disable creating a shared library so we can hook memset.\n\trun_configure_make_check $@;\n\tRESULT=$?;\n\n\texport CPPFLAGS=;\n\texport CFLAGS=;\n\texport LDFLAGS=;\n\n\treturn ${RESULT};\n}\n\nrun_configure_make_check_python()\n{\n\trun_configure_make $@;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\treturn ${RESULT};\n\tfi\n\n\tmake check CHECK_WITH_STDERR=1 SKIP_LIBRARY_TESTS=1 SKIP_TOOLS_TESTS=1;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'make check' failed\";\n\n\t\tif test -f tests/test-suite.log;\n\t\tthen\n\t\t\tcat tests/test-suite.log;\n\t\tfi\n\n\t\treturn ${RESULT};\n\tfi\n\treturn ${EXIT_SUCCESS};\n}\n\nrun_setup_py_tests()\n{\n\t# Skip this test when running Cygwin on AppVeyor.\n\tif test -n \"${APPVEYOR}\" && test ${TARGET} = \"cygwin\";\n\tthen\n\t\techo \"Running: 'setup.py build' skipped\";\n\n\t\treturn ${EXIT_SUCCESS};\n\tfi\n\tPYTHON=$1;\n\n\t${PYTHON} setup.py build;\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Running: 'setup.py build' failed\";\n\n\t\treturn ${RESULT};\n\tfi\n\treturn ${EXIT_SUCCESS};\n}\n\nPROJECT_NAME=`basename $PWD`;\n\nCONFIGURE_HELP=`./configure --help`;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--enable-wide-character-type' > /dev/null;\n\nHAVE_ENABLE_WIDE_CHARACTER_TYPE=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--enable-verbose-output' > /dev/null;\n\nHAVE_ENABLE_VERBOSE_OUTPUT=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--enable-debug-output' > /dev/null;\n\nHAVE_ENABLE_DEBUG_OUTPUT=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-bzip2' > /dev/null;\n\nHAVE_WITH_BZIP2=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-libfuse' > /dev/null;\n\nHAVE_WITH_LIBFUSE=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-lzma' > /dev/null;\n\nHAVE_WITH_LZMA=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-pthread' > /dev/null;\n\nHAVE_WITH_PTHREAD=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-openssl' > /dev/null;\n\nHAVE_WITH_OPENSSL=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--with-zlib' > /dev/null;\n\nHAVE_WITH_ZLIB=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--enable-python' > /dev/null;\n\nHAVE_ENABLE_PYTHON=$?;\n\necho \"${CONFIGURE_HELP}\" | grep -- '--enable-static-executables' > /dev/null;\n\nHAVE_ENABLE_STATIC_EXECUTABLES=$?;\n\nPYTHON_CONFIG=\"\";\n\nif test -x /usr/bin/whereis;\nthen\n\tPYTHON_CONFIG=`/usr/bin/whereis python-config | sed 's/^.*:[ ]*//' 2> /dev/null`;\nfi\n\n# Test \"./configure && make && make check\" without options.\n\nrun_configure_make_check;\nRESULT=$?;\n\nif test ${RESULT} -ne ${EXIT_SUCCESS};\nthen\n\texit ${EXIT_FAILURE};\nfi\n\nif test ${HAVE_ENABLE_VERBOSE_OUTPUT} -eq 0 && test ${HAVE_ENABLE_DEBUG_OUTPUT} -eq 0;\nthen\n\t# Test \"./configure && make && make check\" with verbose and debug output.\n\n\trun_configure_make_check \"--enable-verbose-output --enable-debug-output\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test ${HAVE_WITH_PTHREAD} -eq 0 && test ${PROJECT_NAME} != \"libcthreads\";\nthen\n\t# Test \"./configure && make && make check\" without multi-threading support.\n\n\trun_configure_make_check \"--with-pthread=no\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test ${HAVE_WITH_ZLIB} -eq 0;\nthen\n\t# Test \"./configure && make && make check\" with fallback zlib implementation.\n\n\trun_configure_make_check \"--with-zlib=no\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test ${HAVE_WITH_OPENSSL} -eq 0;\nthen\n\t# Test \"./configure && make && make check\" with fallback crypto implementation.\n\n\trun_configure_make_check \"--with-openssl=no\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\n\n\t# Test \"./configure && make && make check\" with OpenSSL non-EVP implementation.\n\n\trun_configure_make_check \"--enable-openssl-evp-cipher=no --enable-openssl-evp-md=no\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\n\n\t# Test \"./configure && make && make check\" with OpenSSL EVP implementation.\n\n\trun_configure_make_check \"--enable-openssl-evp-cipher=yes --enable-openssl-evp-md=yes\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test ${HAVE_ENABLE_PYTHON} -eq 0 && test -n \"${PYTHON_CONFIG}\";\nthen\n\trun_configure_make_check_python \"--enable-python\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\n\n\tPYTHON=`which python 2> /dev/null`;\n\n\tif test -f \"setup.py\" && ! run_setup_py_tests ${PYTHON};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\nif test ${HAVE_ENABLE_STATIC_EXECUTABLES} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"--enable-static-executables --enable-multi-threading-support=no\";\n\n\tif test ${HAVE_WITH_BZIP2} -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-bzip2=no\";\n\tfi\n\tif test ${HAVE_WITH_LIBFUSE} -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-libfuse=no\";\n\tfi\n\tif test ${HAVE_WITH_LZMA} -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-lzma=no\";\n\tfi\n\tif test ${HAVE_WITH_OPENSSL} -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-openssl=no\";\n\tfi\n\tif test ${HAVE_WITH_ZLIB} -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-zlib=no\";\n\tfi\n\trun_configure_make_check ${CONFIGURE_OPTIONS};\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\texit ${EXIT_FAILURE};\n\tfi\nfi\n\n# Run tests with asan.\nCONFIGURE_OPTIONS=\"\";\n\nif test ${HAVE_ENABLE_WIDE_CHARACTER_TYPE} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --enable-wide-character-type\";\nfi\nif test ${HAVE_WITH_BZIP2} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-bzip2=no\";\nfi\nif test ${HAVE_WITH_LZMA} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-lzma=no\";\nfi\nif test ${HAVE_WITH_OPENSSL} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-openssl=no\";\nfi\nif test ${HAVE_WITH_ZLIB} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-zlib=no\";\nfi\nif test ${HAVE_ENABLE_PYTHON} -eq 0 && test -n \"${PYTHON_CONFIG}\";\nthen\n\t# Issue with running the python bindings with asan disabled for now.\n\t# CONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --enable-python\";\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS}\";\nfi\n\nrun_configure_make_check_with_asan ${CONFIGURE_OPTIONS};\nRESULT=$?;\n\nif test ${RESULT} -ne ${EXIT_SUCCESS};\nthen\n\texit ${EXIT_FAILURE};\nfi\n\n# Run tests with coverage.\nCONFIGURE_OPTIONS=\"--enable-shared=no\";\n\nif test ${HAVE_ENABLE_WIDE_CHARACTER_TYPE} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --enable-wide-character-type\";\nfi\nif test ${HAVE_WITH_BZIP2} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-bzip2=no\";\nfi\nif test ${HAVE_WITH_LZMA} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-lzma=no\";\nfi\nif test ${HAVE_WITH_OPENSSL} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-openssl=no\";\nfi\nif test ${HAVE_WITH_ZLIB} -eq 0;\nthen\n\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --with-zlib=no\";\nfi\n\nrun_configure_make_check_with_coverage ${CONFIGURE_OPTIONS};\nRESULT=$?;\n\nif test ${RESULT} -ne ${EXIT_SUCCESS};\nthen\n\texit ${EXIT_FAILURE};\nfi\n\nexit ${EXIT_SUCCESS};\n\n"
  },
  {
    "path": "setup.cfg.in",
    "content": "[metadata]\nname = libfsntfs-python\nversion = @VERSION@\ndescription = Python bindings module for libfsntfs\nlong_description = Python bindings module for libfsntfs\nlong_description_content_type = text/plain\nauthor = Joachim Metz\nauthor_email = joachim.metz@gmail.com\nlicense = GNU Lesser General Public License v3 or later (LGPLv3+)\nlicense_files = COPYING*\nclassifiers =\n  Development Status :: 2 - Pre-Alpha\n  Programming Language :: Python\n\n[options]\npython_requires = >=3.10\n"
  },
  {
    "path": "setup.py",
    "content": "#!/usr/bin/env python\n#\n# Script to build and install Python-bindings.\n# Version: 20251125\n\nimport copy\nimport datetime\nimport glob\nimport gzip\nimport platform\nimport os\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nimport tarfile\nimport zipfile\n\nfrom setuptools import Extension\nfrom setuptools import setup\nfrom setuptools._distutils.ccompiler import new_compiler\nfrom setuptools.command.build_ext import build_ext\nfrom setuptools.command.sdist import sdist\n\n\nif (sys.version_info[0], sys.version_info[1]) < (3, 7):\n  print((\"Unsupported Python version: {0:s}, version 3.7 or higher \"\n         \"required.\").format(sys.version))\n  sys.exit(1)\n\n\nclass custom_build_ext(build_ext):\n  \"\"\"Custom handler for the build_ext command.\"\"\"\n\n  def _RunCommand(self, command):\n    \"\"\"Runs the command.\"\"\"\n    arguments = shlex.split(command)\n    process = subprocess.Popen(\n        arguments, stderr=subprocess.PIPE, stdout=subprocess.PIPE,\n        universal_newlines=True)\n    if not process:\n      raise RuntimeError(\"Running: {0:s} failed.\".format(command))\n\n    output, error = process.communicate()\n    if process.returncode != 0:\n      error = \"\\n\".join(error.split(\"\\n\")[-5:])\n      raise RuntimeError(\"Running: {0:s} failed with error:\\n{1:s}.\".format(\n          command, error))\n\n    return output\n\n  def build_extensions(self):\n    \"\"\"Set up the build extensions.\"\"\"\n    # TODO: move build customization here?\n    build_ext.build_extensions(self)\n\n  def run(self):\n    \"\"\"Runs the build extension.\"\"\"\n    compiler = new_compiler(compiler=self.compiler)\n    if compiler.compiler_type == \"msvc\":\n      self.define = [\n          (\"_CRT_SECURE_NO_WARNINGS\", \"\"),\n          (\"UNICODE\", \"\"),\n      ]\n\n    else:\n      command = \"sh configure --disable-nls --disable-shared-libs\"\n      output = self._RunCommand(command)\n\n      print_line = False\n      for line in output.split(\"\\n\"):\n        line = line.rstrip()\n        if line == \"configure:\":\n          print_line = True\n\n        if print_line:\n          print(line)\n\n      self.define = [\n          (\"HAVE_CONFIG_H\", \"\"),\n      ]\n\n    build_ext.run(self)\n\n\nclass custom_sdist(sdist):\n  \"\"\"Custom handler for the sdist command.\"\"\"\n\n  def run(self):\n    \"\"\"Builds a source distribution (sdist) package.\"\"\"\n    if self.formats != [\"gztar\"] and self.formats != [\"zip\"]:\n      print(\"'setup.py sdist' unsupported format.\")\n      sys.exit(1)\n\n    if glob.glob(\"*.tar.gz\"):\n      print(\"'setup.py sdist' remove existing *.tar.gz files from \"\n            \"source directory.\")\n      sys.exit(1)\n\n    command = \"make dist\"\n    exit_code = subprocess.call(command, shell=True)\n    if exit_code != 0:\n      raise RuntimeError(\"Running: {0:s} failed.\".format(command))\n\n    if not os.path.exists(self.dist_dir):\n      os.mkdir(self.dist_dir)\n\n    source_package_file = glob.glob(\"*.tar.gz\")[0]\n    source_package_prefix, _, source_package_suffix = (\n        source_package_file.partition(\"-\"))\n    sdist_package_file = \"{0:s}_python-{1:s}\".format(\n        source_package_prefix, source_package_suffix)\n    sdist_package_file = os.path.join(self.dist_dir, sdist_package_file)\n    os.rename(source_package_file, sdist_package_file)\n\n    # Create and add the PKG-INFO file to the source package.\n    with gzip.open(sdist_package_file, \"rb\") as input_file:\n      with open(sdist_package_file[:-3], \"wb\") as output_file:\n        shutil.copyfileobj(input_file, output_file)\n    os.remove(sdist_package_file)\n\n    self.distribution.metadata.write_pkg_info(\".\")\n    pkg_info_path = \"{0:s}-{1:s}/PKG-INFO\".format(\n        source_package_prefix, source_package_suffix[:-7])\n    with tarfile.open(sdist_package_file[:-3], \"a:\") as tar_file:\n      tar_file.add(\"PKG-INFO\", arcname=pkg_info_path)\n    os.remove(\"PKG-INFO\")\n\n    with open(sdist_package_file[:-3], \"rb\") as input_file:\n      with gzip.open(sdist_package_file, \"wb\") as output_file:\n        shutil.copyfileobj(input_file, output_file)\n    os.remove(sdist_package_file[:-3])\n\n    # Convert the .tar.gz into a .zip\n    if self.formats == [\"zip\"]:\n      zip_sdist_package_file = \"{0:s}.zip\".format(sdist_package_file[:-7])\n\n      with tarfile.open(sdist_package_file, \"r|gz\") as tar_file:\n        with zipfile.ZipFile(\n            zip_sdist_package_file, \"w\", zipfile.ZIP_DEFLATED) as zip_file:\n          for tar_file_entry in tar_file:\n            file_entry = tar_file.extractfile(tar_file_entry)\n            if tar_file_entry.isfile():\n              modification_time = datetime.datetime.fromtimestamp(\n                  tar_file_entry.mtime)\n              zip_modification_time = (\n                  modification_time.year, modification_time.month,\n                  modification_time.day, modification_time.hour,\n                  modification_time.minute, modification_time.second)\n              zip_info = zipfile.ZipInfo(\n                  date_time=zip_modification_time,\n                  filename=tar_file_entry.name)\n              zip_info.external_attr = (tar_file_entry.mode & 0xff) << 16\n\n              file_data = file_entry.read()\n              zip_file.writestr(zip_info, file_data)\n\n      os.remove(sdist_package_file)\n      sdist_package_file = zip_sdist_package_file\n\n    # Inform setuptools what files were created.\n    dist_files = getattr(self.distribution, \"dist_files\", [])\n    dist_files.append((\"sdist\", \"\", sdist_package_file))\n\n\nclass ProjectInformation(object):\n  \"\"\"Project information.\"\"\"\n\n  def __init__(self):\n    \"\"\"Initializes project information.\"\"\"\n    super(ProjectInformation, self).__init__()\n    self.include_directories = []\n    self.library_name = None\n    self.library_names = []\n    self.library_version = None\n\n    self._ReadConfigureAc()\n    self._ReadMakefileAm()\n\n  @property\n  def module_name(self):\n    \"\"\"The Python module name.\"\"\"\n    return \"py{0:s}\".format(self.library_name[3:])\n\n  def _ReadConfigureAc(self):\n    \"\"\"Reads configure.ac to initialize the project information.\"\"\"\n    with open(\"configure.ac\", \"r\", encoding=\"utf-8\") as file_object:\n      found_ac_init = False\n      found_library_name = False\n      for line in file_object.readlines():\n        line = line.strip()\n        if found_library_name:\n          library_version = line[1:-2]\n          self.library_version = library_version\n          break\n\n        elif found_ac_init:\n          library_name = line[1:-2]\n          self.library_name = library_name\n          found_library_name = True\n\n        elif line.startswith(\"AC_INIT\"):\n          found_ac_init = True\n\n    if not self.library_name or not self.library_version:\n      raise RuntimeError(\n          \"Unable to find library name and version in: configure.ac\")\n\n  def _ReadMakefileAm(self):\n    \"\"\"Reads Makefile.am to initialize the project information.\"\"\"\n    if not self.library_name:\n      raise RuntimeError(\"Missing library name\")\n\n    with open(\"Makefile.am\", \"r\", encoding=\"utf-8\") as file_object:\n      found_subdirs = False\n      for line in file_object.readlines():\n        line = line.strip()\n        if found_subdirs:\n          library_name, _, _ = line.partition(\" \")\n\n          self.include_directories.append(library_name)\n\n          if library_name.startswith(\"lib\"):\n            self.library_names.append(library_name)\n\n          if library_name == self.library_name:\n            break\n\n        elif line.startswith(\"SUBDIRS\"):\n          found_subdirs = True\n\n    if not self.include_directories or not self.library_names:\n      raise RuntimeError(\n          \"Unable to find include directories and library names in: \"\n          \"Makefile.am\")\n\n\nproject_information = ProjectInformation()\n\nCMDCLASS = {\n  \"build_ext\": custom_build_ext,\n  \"sdist\": custom_sdist}\n\nSOURCES = []\n\n# TODO: replace by detection of MSC\nDEFINE_MACROS = []\nif platform.system() == \"Windows\":\n  DEFINE_MACROS.append((\"WINVER\", \"0x0501\"))\n  # TODO: determine how to handle third party DLLs.\n  for library_name in project_information.library_names:\n    if library_name != project_information.library_name:\n      definition = \"HAVE_LOCAL_{0:s}\".format(library_name.upper())\n\n    DEFINE_MACROS.append((definition, \"\"))\n\n# Put everything inside the Python module to prevent issues with finding\n# shared libaries since pip does not integrate well with the system package\n# management.\nfor library_name in project_information.library_names:\n  for source_file in glob.glob(os.path.join(library_name, \"*.[ly]\")):\n    generated_source_file = \"{0:s}.c\".format(source_file[:-2])\n    if not os.path.exists(generated_source_file):\n      raise RuntimeError(\"Missing generated source file: {0:s}\".format(\n          generated_source_file))\n\n  source_files = glob.glob(os.path.join(library_name, \"*.c\"))\n  SOURCES.extend(source_files)\n\nsource_files = glob.glob(os.path.join(project_information.module_name, \"*.c\"))\nSOURCES.extend(source_files)\n\n# TODO: find a way to detect missing python.h\n# e.g. on Ubuntu python-dev is not installed by python-pip\n\nsetup_args = dict(\n    cmdclass=CMDCLASS,\n    ext_modules=[\n        Extension(\n            project_information.module_name,\n            define_macros=DEFINE_MACROS,\n            include_dirs=project_information.include_directories,\n            libraries=[],\n            library_dirs=[],\n            sources=SOURCES\n        )\n    ]\n)\nsetup(**setup_args)\n\n"
  },
  {
    "path": "syncdokan.ps1",
    "content": "# Script that synchronizes dokan\n#\n# Version: 20190810\n\nParam (\n\t[switch]$UseHead = $false,\n\t[switch]$UseLegacyVersion = $false\n)\n\n$Git = \"git\"\n\nIf (${UseLegacyVersion})\n{\n\t# Patched version of dokan 0.6.0\n\t$GitUrl = \"https://github.com/joachimmetz/dokan.git\"\n\t$Destination = \"..\\dokan\"\n}\nElse\n{\n\t$GitUrl = \"https://github.com/dokan-dev/dokany.git\"\n\t$Destination = \"..\\dokany\"\n}\n\n# PowerShell will raise NativeCommandError if git writes to stdout or stderr\n# therefore 2>&1 is added and the output is stored in a variable.\n$Output = Invoke-Expression -Command \"${Git} clone ${GitUrl} ${Destination} 2>&1\"\n\nPush-Location ${Destination}\n\nTry\n{\n\t$Output = Invoke-Expression -Command \"${Git} fetch --quiet --all --tags --prune 2>&1\"\n\n\t$LatestTag = Invoke-Expression -Command \"${Git} describe --tags --abbrev=0 2>&1\"\n\n\tIf (${LatestTag} -and -not ${UseHead})\n\t{\n\t\tWrite-Host \"Synchronizing: dokan from ${GitUrl} tag ${LatestTag}\"\n\n\t\t$Output = Invoke-Expression -Command \"${Git} checkout --quiet tags/${LatestTag} 2>&1\"\n\t}\n\tElse\n\t{\n\t\tWrite-Host \"Synchronizing: dokan from ${GitUrl} HEAD\"\n\t}\n\tIf (-Not ${UseLegacyVersion})\n\t{\n\t\t# AppVeyor does not come with platform toolset version 142\n\t\t((Get-Content -Path \"..\\dokany\\dokan\\dokan.vcxproj\" -Raw) -Replace '<PlatformToolset>v142</PlatformToolset>','<PlatformToolset>v141</PlatformToolset>') | Set-Content -Path \"..\\dokany\\dokan\\dokan.vcxproj\"\n\t}\n}\nFinally\n{\n\tPop-Location\n}\n\n"
  },
  {
    "path": "synclibs.ps1",
    "content": "# Script that synchronizes the local library dependencies\n#\n# Version: 20180125\n\nParam (\n\t[switch]$UseHead = $false\n)\n\n$GitUrlPrefix = \"https://github.com/libyal\"\n$LocalLibs = \"libbfio libcdata libcerror libcfile libclocale libcnotify libcpath libcsplit libcthreads libfcache libfdata libfdatetime libfguid libfusn libfwnt libhmac libuna\"\n$LocalLibs = ${LocalLibs} -split \" \"\n\n$Git = \"git\"\n$WinFlex = \"..\\win_flex_bison\\win_flex.exe\"\n$WinBison = \"..\\win_flex_bison\\win_bison.exe\"\n\nForEach (${LocalLib} in ${LocalLibs})\n{\n\t# Split will return an array of a single empty string when LocalLibs is empty.\n\tIf (-Not (${LocalLib}))\n\t{\n\t\tContinue\n\t}\n\t$GitUrl = \"${GitUrlPrefix}/${LocalLib}.git\"\n\n\t# PowerShell will raise NativeCommandError if git writes to stdout or stderr\n\t# therefore 2>&1 is added and the output is stored in a variable.\n\t$Output = Invoke-Expression -Command \"${Git} clone ${GitUrl} ${LocalLib}-${pid} 2>&1\"\n\n\tPush-Location \"${LocalLib}-${pid}\"\n\n\tTry\n\t{\n\t\t$Output = Invoke-Expression -Command \"${Git} fetch --quiet --all --tags --prune 2>&1\"\n\n\t\t$LatestTag = Invoke-Expression -Command \"${Git} describe --tags --abbrev=0 2>&1\"\n\n\t\tIf (${LatestTag} -and -not ${UseHead})\n\t\t{\n\t\t\tWrite-Host \"Synchronizing: ${LocalLib} from ${GitUrl} tag ${LatestTag}\"\n\n\t\t\t$Output = Invoke-Expression -Command \"${Git} checkout --quiet tags/${LatestTag} 2>&1\"\n\t\t}\n\t\tElse\n\t\t{\n\t\t\tWrite-Host \"Synchronizing: ${LocalLib} from ${GitUrl} HEAD\"\n\t\t}\n\t}\n\tFinally\n\t{\n\t\tPop-Location\n\t}\n\tIf (Test-Path ${LocalLib}-${pid})\n\t{\n\t\t$LocalLibVersion = Get-Content -Path ${LocalLib}-${pid}\\configure.ac | select -skip 4 -first 1 | % { $_ -Replace \" \\[\",\"\" } | % { $_ -Replace \"\\],\",\"\" }\n\n\t\tIf (Test-Path ${LocalLib})\n\t\t{\n\t\t\tRemove-Item -Path ${LocalLib} -Force -Recurse\n\t\t}\n\t\tNew-Item -ItemType directory -Path ${LocalLib} -Force | Out-Null\n\n\t\tIf (Test-Path ${LocalLib})\n\t\t{\n\t\t\tCopy-Item -Path ${LocalLib}-${pid}\\${LocalLib}\\*.[chly] -Destination ${LocalLib}\\\n\t\t\tGet-Content -Path ${LocalLib}-${pid}\\${LocalLib}\\${LocalLib}_definitions.h.in | % { $_ -Replace \"@VERSION@\",${LocalLibVersion} } > ${LocalLib}\\${LocalLib}_definitions.h\n\t\t}\n\t\tRemove-Item -Path ${LocalLib}-${pid} -Force -Recurse\n\n\t\t$NamePrefix = \"\"\n\n\t\tForEach (${DirectoryElement} in Get-ChildItem -Path \"${LocalLib}\\*.l\")\n\t\t{\n\t\t\t$OutputFile = ${DirectoryElement} -Replace \".l$\",\".c\"\n\n\t\t\t$NamePrefix = Split-Path -path ${DirectoryElement} -leaf\n\t\t\t$NamePrefix = ${NamePrefix} -Replace \"^${LocalLib}_\",\"\"\n\t\t\t$NamePrefix = ${NamePrefix} -Replace \".l$\",\"_\"\n\n\t\t\t# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr\n\t\t\t# therefore 2>&1 is added and the output is stored in a variable.\n\t\t\t$Output = Invoke-Expression -Command \"& '${WinFlex}' -Cf ${DirectoryElement} 2>&1\"\n\t\t\tWrite-Host ${Output}\n\n\t\t\t# Moving manually sicne win_flex -o <filename> does not provide the expected behavior.\n\t\t\tMove-Item \"lex.yy.c\" ${OutputFile} -force\n\t\t}\n\n\t\tForEach (${DirectoryElement} in Get-ChildItem -Path \"${LocalLib}\\*.y\")\n\t\t{\n\t\t\t$OutputFile = ${DirectoryElement} -Replace \".y$\",\".c\"\n\n\t\t\t# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr\n\t\t\t# therefore 2>&1 is added and the output is stored in a variable.\n\t\t\t$Output = Invoke-Expression -Command \"& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1\"\n\t\t\tWrite-Host ${Output}\n\t\t}\n\t}\n}\n\n"
  },
  {
    "path": "synclibs.sh",
    "content": "#!/bin/sh\n# Script that synchronizes the local library dependencies\n#\n# Version: 20240414\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\n\nGIT_URL_PREFIX=\"https://github.com/libyal\";\nLOCAL_LIBS=\"libbfio libcdata libcerror libcfile libclocale libcnotify libcpath libcsplit libcthreads libfcache libfdata libfdatetime libfguid libfusn libfwnt libhmac libuna\";\n\nOLDIFS=$IFS;\nIFS=\" \";\n\nfor LOCAL_LIB in ${LOCAL_LIBS};\ndo\n\tGIT_URL=\"${GIT_URL_PREFIX}/${LOCAL_LIB}.git\";\n\n\tgit clone --quiet ${GIT_URL} ${LOCAL_LIB}-$$;\n\n\tif ! test -d ${LOCAL_LIB}-$$;\n\tthen\n\t\techo \"Unable to git clone: ${GIT_URL}\";\n\n\t\tIFS=$OLDIFS;\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\t(cd ${LOCAL_LIB}-$$ && git fetch --quiet --all --tags --prune)\n\n\tLATEST_TAG=`cd ${LOCAL_LIB}-$$ && git describe --tags --abbrev=0`;\n\n\tif test -n ${LATEST_TAG} && test \"$1\" != \"--use-head\";\n\tthen\n\t\techo \"Synchronizing: ${LOCAL_LIB} from ${GIT_URL} tag ${LATEST_TAG}\";\n\n\t\t(cd ${LOCAL_LIB}-$$ && git checkout --quiet tags/${LATEST_TAG});\n\telse\n\t\techo \"Synchronizing: ${LOCAL_LIB} from ${GIT_URL} HEAD\";\n\tfi\n\n\trm -rf ${LOCAL_LIB};\n\tmkdir ${LOCAL_LIB};\n\n\tif ! test -d ${LOCAL_LIB};\n\tthen\n\t\techo \"Missing directory: ${LOCAL_LIB}\";\n\n\t\tIFS=$OLDIFS;\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\n\tLOCAL_LIB_UPPER=`echo \"${LOCAL_LIB}\" | tr \"[a-z]\" \"[A-Z]\"`;\n\t# Note that sed on FreeBSD does not support \\s hence that we use [[:space:]] instead.\n\tLOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^[[:space:]]*\\[\\([0-9]*\\)\\],[[:space:]]*$/\\1/'`;\n\tLOCAL_LIB_MAKEFILE_AM=\"${LOCAL_LIB}/Makefile.am\";\n\n\tcp ${LOCAL_LIB}-$$/${LOCAL_LIB}/*.[chly] ${LOCAL_LIB};\n\tcp ${LOCAL_LIB}-$$/${LOCAL_LIB_MAKEFILE_AM} ${LOCAL_LIB_MAKEFILE_AM};\n\n\t# Make the necessary changes to libyal/Makefile.am\n\nSED_SCRIPT=\"/AM_CPPFLAGS = / {\n\ti\\\\\nif HAVE_LOCAL_${LOCAL_LIB_UPPER}\n}\n\n/lib_LTLIBRARIES = / {\n\ts/lib_LTLIBRARIES/noinst_LTLIBRARIES/\n}\n\n/${LOCAL_LIB}\\.c/ {\n\td\n}\n\n/${LOCAL_LIB}_la_LIBADD/ {\n:loop1\n\t/${LOCAL_LIB}_la_LDFLAGS/ {\n\t\tN\n\t\ti\\\\\nendif\n\t\td\n\t}\n\t/${LOCAL_LIB}_la_LDFLAGS/ !{\n\t\tN\n\t\tb loop1\n\t}\n}\n\n/${LOCAL_LIB}_la_LDFLAGS/ {\n\tN\n\ti\\\\\nendif\n\td\n}\n\n/DISTCLEANFILES = / {\n\tn\n\t/${LOCAL_LIB}_definitions.h/ {\n\t\td\n\t}\n}\";\n\techo \"${SED_SCRIPT}\" >> ${LOCAL_LIB}-$$.sed;\n\tsed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM};\n\trm -f ${LOCAL_LIB}-$$.sed;\n\n\tsed -i'~' \"/AM_CPPFLAGS = /,/noinst_LTLIBRARIES = / { N; s/\\\\\\\\\\\\n.@${LOCAL_LIB_UPPER}_DLL_EXPORT@//; P; D; }\" ${LOCAL_LIB_MAKEFILE_AM};\n\tsed -i'~' \"/${LOCAL_LIB}_definitions.h.in/d\" ${LOCAL_LIB_MAKEFILE_AM};\n\tsed -i'~' \"/${LOCAL_LIB}\\\\.rc/d\" ${LOCAL_LIB_MAKEFILE_AM};\n\n\tif test ${LOCAL_LIB} = \"libfplist\";\n\tthen\n\t\t# TODO: make this more generic to strip the last \\\\\n\t\tsed -i'~' '/EXTRA_DIST = /,/^$/s/libfplist_xml_scanner.c \\\\/libfplist_xml_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};\n\n\telif test ${LOCAL_LIB} = \"libodraw\";\n\tthen\n\t\t# TODO: make this more generic to strip the last \\\\\n\t\tsed -i'~' '/EXTRA_DIST = /,/^$/s/libodraw_cue_scanner.c \\\\/libodraw_cue_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};\n\n\telse\n\t\tsed -i'~' '/EXTRA_DIST = /,/^$/d' ${LOCAL_LIB_MAKEFILE_AM};\n\tfi\n\nSED_SCRIPT=\"/^$/ {\n\tx\n\tN\n\t/endif$/ {\n\t\ta\\\\\n\n\t\tD\n\t}\n}\";\n\techo \"${SED_SCRIPT}\" >> ${LOCAL_LIB}-$$.sed;\n\tsed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM};\n\trm -f ${LOCAL_LIB}-$$.sed;\n\n\t# Make the necessary changes to libcfile/Makefile.am\n\tif test ${LOCAL_LIB} = \"libcfile\";\n\tthen\n\t\tif ! test -f \"m4/libuna.m4\";\n\t\tthen\n\t\t\tsed -i'~' 's?@LIBUNA_CPPFLAGS@?-I../libuna -I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\tfi\n\n\t# Make the necessary changes to libfplist/Makefile.am\n\tif test ${LOCAL_LIB} = \"libfplist\";\n\tthen\n\t\tif test -f \"m4/libfdatetime.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFGUID_CPPFLAGS@/{h; s/FGUID/FDATETIME/; p; g;}' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\tfi\n\n\t# Make the necessary changes to libfvalue/Makefile.am\n\tif test ${LOCAL_LIB} = \"libfvalue\";\n\tthen\n\t\tif ! test -f \"m4/libfdatetime.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFDATETIME_CPPFLAGS@/d' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\t\tif ! test -f \"m4/libfguid.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFGUID_CPPFLAGS@/d' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\t\tif ! test -f \"m4/libfwnt.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFWNT_CPPFLAGS@/d' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\t\tif ! test -f \"m4/libuna.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBUNA_CPPFLAGS@/d' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\tfi\n\n\t# Make the necessary changes to libsmraw/Makefile.am\n\tif test ${LOCAL_LIB} = \"libsmraw\";\n\tthen\n\t\tif test -f \"m4/libfdatetime.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFVALUE_CPPFLAGS@/{h; s/FVALUE/FDATETIME/; p; g;}' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\t\tif test -f \"m4/libfguid.m4\";\n\t\tthen\n\t\t\tsed -i'~' '/@LIBFVALUE_CPPFLAGS@/{h; s/FVALUE/FGUID/; p; g;}' ${LOCAL_LIB_MAKEFILE_AM};\n\t\tfi\n\tfi\n\n\t# Remove libyal/libyal.c\n\trm -f ${LOCAL_LIB}/${LOCAL_LIB}.c;\n\n\t# Make the necessary changes to libyal/libyal_defitions.h\n\tcp ${LOCAL_LIB}-$$/${LOCAL_LIB}/${LOCAL_LIB}_definitions.h.in ${LOCAL_LIB}/${LOCAL_LIB}_definitions.h;\n\tsed -i'~' \"s/@VERSION@/${LOCAL_LIB_VERSION}/\" ${LOCAL_LIB}/${LOCAL_LIB}_definitions.h;\n\n\trm -rf ${LOCAL_LIB}-$$;\ndone\n\nIFS=$OLDIFS;\n\nexit ${EXIT_SUCCESS};\n\n"
  },
  {
    "path": "synctestdata.ps1",
    "content": "# Script that synchronizes the local test data\n#\n# Version: 20251217\n\n$Repository = \"log2timeline/dfvfs\"\n$TestDataPath = \"test_data\"\n$TestSet = \"public\"\n$TestInputDirectory = \"tests/input\"\n$TestFiles = \"ntfs.raw\"\n\nIf (-Not (Test-Path ${TestInputDirectory}))\n{\n\tNew-Item -Name ${TestInputDirectory} -ItemType \"directory\" | Out-Null\n}\nIf (-Not (Test-Path \"${TestInputDirectory}\\${TestSet}\"))\n{\n\tNew-Item -Name \"${TestInputDirectory}\\${TestSet}\" -ItemType \"directory\" | Out-Null\n}\nForEach ($TestFile in ${TestFiles} -split \" \")\n{\n\t$Url = \"https://raw.githubusercontent.com/${Repository}/refs/heads/main/${TestDataPath}/${TestFile}\"\n\n\tInvoke-WebRequest -Uri ${Url} -OutFile \"${TestInputDirectory}\\${TestSet}\\${TestFile}\"\n}\n\n"
  },
  {
    "path": "synctestdata.sh",
    "content": "#!/bin/sh\n# Script that synchronizes the local test data\n#\n# Version: 20251217\n\nREPOSITORY=\"log2timeline/dfvfs\";\nTEST_DATA_PATH=\"test_data\";\nTEST_SET=\"public\";\nTEST_INPUT_DIRECTORY=\"tests/input\";\nTEST_FILES=\"ntfs.raw\";\n\nmkdir -p \"${TEST_INPUT_DIRECTORY}/${TEST_SET}\";\n\nfor TEST_FILE in ${TEST_FILES};\ndo\n\tURL=\"https://raw.githubusercontent.com/${REPOSITORY}/refs/heads/main/${TEST_DATA_PATH}/${TEST_FILE}\";\n\n\tcurl -L -o \"${TEST_INPUT_DIRECTORY}/${TEST_SET}/${TEST_FILE}\" ${URL};\ndone\n\n"
  },
  {
    "path": "tests/Makefile.am",
    "content": "AUTOMAKE_OPTIONS = subdir-objects\n\nAM_CPPFLAGS = \\\n\t-I../include -I$(top_srcdir)/include \\\n\t-I../common -I$(top_srcdir)/common \\\n\t@LIBCERROR_CPPFLAGS@ \\\n\t@LIBCTHREADS_CPPFLAGS@ \\\n\t@LIBCDATA_CPPFLAGS@ \\\n\t@LIBCLOCALE_CPPFLAGS@ \\\n\t@LIBCNOTIFY_CPPFLAGS@ \\\n\t@LIBCSPLIT_CPPFLAGS@ \\\n\t@LIBUNA_CPPFLAGS@ \\\n\t@LIBCFILE_CPPFLAGS@ \\\n\t@LIBCPATH_CPPFLAGS@ \\\n\t@LIBBFIO_CPPFLAGS@ \\\n\t@LIBFCACHE_CPPFLAGS@ \\\n\t@LIBFDATA_CPPFLAGS@ \\\n\t@LIBFDATETIME_CPPFLAGS@ \\\n\t@LIBFGUID_CPPFLAGS@ \\\n\t@LIBFUSN_CPPFLAGS@ \\\n\t@LIBFWNT_CPPFLAGS@ \\\n\t@LIBHMAC_CPPFLAGS@ \\\n\t@LIBCRYPTO_CPPFLAGS@ \\\n\t@PTHREAD_CPPFLAGS@ \\\n\t@LIBFSNTFS_DLL_IMPORT@\n\nif HAVE_PYTHON_TESTS\nTESTS_PYFSNTFS = \\\n\ttest_python_module.sh\nendif\n\nTESTS = \\\n\ttest_library.sh \\\n\ttest_tools.sh \\\n\ttest_fsntfsinfo.sh \\\n\ttest_fsntfsinfo_bodyfile.sh \\\n\t$(TESTS_PYFSNTFS)\n\ncheck_SCRIPTS = \\\n\tpyfsntfs_test_attribute.py \\\n\tpyfsntfs_test_file_entry.py \\\n\tpyfsntfs_test_support.py \\\n\tpyfsntfs_test_volume.py \\\n\ttest_fsntfsinfo.sh \\\n\ttest_fsntfsinfo_bodyfile.sh \\\n\ttest_library.sh \\\n\ttest_manpage.sh \\\n\ttest_python_module.sh \\\n\ttest_runner.sh \\\n\ttest_tools.sh\n\nEXTRA_DIST = \\\n\t$(check_SCRIPTS)\n\ncheck_PROGRAMS = \\\n\tfsntfs_test_attribute \\\n\tfsntfs_test_attribute_list_entry \\\n\tfsntfs_test_bitmap_values \\\n\tfsntfs_test_buffer_data_handle \\\n\tfsntfs_test_cluster_block \\\n\tfsntfs_test_cluster_block_data \\\n\tfsntfs_test_cluster_block_stream \\\n\tfsntfs_test_cluster_block_vector \\\n\tfsntfs_test_compressed_block \\\n\tfsntfs_test_compressed_block_data_handle \\\n\tfsntfs_test_compressed_block_vector \\\n\tfsntfs_test_compressed_data_handle \\\n\tfsntfs_test_compression \\\n\tfsntfs_test_compression_unit_data_handle \\\n\tfsntfs_test_compression_unit_descriptor \\\n\tfsntfs_test_data_run \\\n\tfsntfs_test_data_stream \\\n\tfsntfs_test_directory_entries_tree \\\n\tfsntfs_test_directory_entry \\\n\tfsntfs_test_error \\\n\tfsntfs_test_extent \\\n\tfsntfs_test_file_entry \\\n\tfsntfs_test_file_name_attribute \\\n\tfsntfs_test_file_name_values \\\n\tfsntfs_test_file_system \\\n\tfsntfs_test_fixup_values \\\n\tfsntfs_test_index \\\n\tfsntfs_test_index_entry \\\n\tfsntfs_test_index_entry_header \\\n\tfsntfs_test_index_entry_vector \\\n\tfsntfs_test_index_node \\\n\tfsntfs_test_index_node_header \\\n\tfsntfs_test_index_root_header \\\n\tfsntfs_test_index_value \\\n\tfsntfs_test_io_handle \\\n\tfsntfs_test_logged_utility_stream_values \\\n\tfsntfs_test_mft \\\n\tfsntfs_test_mft_attribute \\\n\tfsntfs_test_mft_attribute_list \\\n\tfsntfs_test_mft_attribute_list_entry \\\n\tfsntfs_test_mft_entry \\\n\tfsntfs_test_mft_entry_header \\\n\tfsntfs_test_mft_metadata_file \\\n\tfsntfs_test_name \\\n\tfsntfs_test_notify \\\n\tfsntfs_test_object_identifier_values \\\n\tfsntfs_test_path_hint \\\n\tfsntfs_test_profiler \\\n\tfsntfs_test_reparse_point_attribute \\\n\tfsntfs_test_reparse_point_values \\\n\tfsntfs_test_sds_index_value \\\n\tfsntfs_test_security_descriptor_index \\\n\tfsntfs_test_security_descriptor_index_value \\\n\tfsntfs_test_security_descriptor_values \\\n\tfsntfs_test_standard_information_values \\\n\tfsntfs_test_support \\\n\tfsntfs_test_tools_bodyfile \\\n\tfsntfs_test_tools_digest_hash \\\n\tfsntfs_test_tools_info_handle \\\n\tfsntfs_test_tools_mount_path_string \\\n\tfsntfs_test_tools_output \\\n\tfsntfs_test_tools_path_string \\\n\tfsntfs_test_tools_signal \\\n\tfsntfs_test_txf_data_values \\\n\tfsntfs_test_usn_change_journal \\\n\tfsntfs_test_volume \\\n\tfsntfs_test_volume_header \\\n\tfsntfs_test_volume_information_attribute \\\n\tfsntfs_test_volume_information_values \\\n\tfsntfs_test_volume_name_attribute \\\n\tfsntfs_test_volume_name_values\n\nfsntfs_test_attribute_SOURCES = \\\n\tfsntfs_test_attribute.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_attribute_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_attribute_list_entry_SOURCES = \\\n\tfsntfs_test_attribute_list_entry.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_attribute_list_entry_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_bitmap_values_SOURCES = \\\n\tfsntfs_test_bitmap_values.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_bitmap_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_buffer_data_handle_SOURCES = \\\n\tfsntfs_test_buffer_data_handle.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_buffer_data_handle_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_cluster_block_SOURCES = \\\n\tfsntfs_test_cluster_block.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_cluster_block_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_cluster_block_data_SOURCES = \\\n\tfsntfs_test_cluster_block_data.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_cluster_block_data_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_cluster_block_stream_SOURCES = \\\n\tfsntfs_test_cluster_block_stream.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_cluster_block_stream_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_cluster_block_vector_SOURCES = \\\n\tfsntfs_test_cluster_block_vector.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfcache.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_cluster_block_vector_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t@LIBFCACHE_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compressed_block_SOURCES = \\\n\tfsntfs_test_compressed_block.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compressed_block_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compressed_block_data_handle_SOURCES = \\\n\tfsntfs_test_compressed_block_data_handle.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compressed_block_data_handle_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compressed_block_vector_SOURCES = \\\n\tfsntfs_test_compressed_block_vector.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfcache.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compressed_block_vector_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t@LIBFCACHE_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compressed_data_handle_SOURCES = \\\n\tfsntfs_test_compressed_data_handle.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compressed_data_handle_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compression_SOURCES = \\\n\tfsntfs_test_compression.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compression_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compression_unit_data_handle_SOURCES = \\\n\tfsntfs_test_compression_unit_data_handle.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compression_unit_data_handle_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_compression_unit_descriptor_SOURCES = \\\n\tfsntfs_test_compression_unit_descriptor.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_compression_unit_descriptor_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_data_run_SOURCES = \\\n\tfsntfs_test_data_run.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_data_run_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_data_stream_SOURCES = \\\n\tfsntfs_test_data_stream.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_data_stream_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_directory_entries_tree_SOURCES = \\\n\tfsntfs_test_directory_entries_tree.c \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_directory_entries_tree_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_directory_entry_SOURCES = \\\n\tfsntfs_test_directory_entry.c \\\n\tfsntfs_test_libcdata.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_directory_entry_LDADD = \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_error_SOURCES = \\\n\tfsntfs_test_error.c \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_error_LDADD = \\\n\t../libfsntfs/libfsntfs.la\n\nfsntfs_test_extent_SOURCES = \\\n\tfsntfs_test_extent.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_extent_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_file_entry_SOURCES = \\\n\tfsntfs_test_file_entry.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_file_entry_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_file_name_attribute_SOURCES = \\\n\tfsntfs_test_file_name_attribute.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_file_name_attribute_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_file_name_values_SOURCES = \\\n\tfsntfs_test_file_name_values.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_file_name_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_file_system_SOURCES = \\\n\tfsntfs_test_file_system.c \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_file_system_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_fixup_values_SOURCES = \\\n\tfsntfs_test_fixup_values.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_fixup_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_SOURCES = \\\n\tfsntfs_test_index.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_entry_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_index_entry.c \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_entry_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_entry_header_SOURCES = \\\n\tfsntfs_test_index_entry_header.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_entry_header_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_entry_vector_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_index_entry_vector.c \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfcache.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_entry_vector_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t@LIBFCACHE_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_node_SOURCES = \\\n\tfsntfs_test_index_node.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_node_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_node_header_SOURCES = \\\n\tfsntfs_test_index_node_header.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_node_header_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_root_header_SOURCES = \\\n\tfsntfs_test_index_root_header.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_root_header_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_index_value_SOURCES = \\\n\tfsntfs_test_index_value.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_index_value_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_io_handle_SOURCES = \\\n\tfsntfs_test_io_handle.c \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_io_handle_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_logged_utility_stream_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_logged_utility_stream_values.c \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_logged_utility_stream_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_attribute_SOURCES = \\\n\tfsntfs_test_libcdata.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_attribute.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_attribute_LDADD = \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_attribute_list_SOURCES = \\\n\tfsntfs_test_libcdata.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_attribute_list.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_attribute_list_LDADD = \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_attribute_list_entry_SOURCES = \\\n\tfsntfs_test_libcdata.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_attribute_list_entry.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_attribute_list_entry_LDADD = \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_entry_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_entry.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_entry_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_entry_header_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_entry_header.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_mft_entry_header_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_mft_metadata_file_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_getopt.c fsntfs_test_getopt.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libclocale.h \\\n\tfsntfs_test_libcnotify.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_libuna.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_mft_metadata_file.c \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h\n\nfsntfs_test_mft_metadata_file_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_name_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_libuna.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_name.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_name_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_notify_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_notify.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_notify_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_object_identifier_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_object_identifier_values.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_object_identifier_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_path_hint_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_path_hint.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_path_hint_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_profiler_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_profiler.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_profiler_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_reparse_point_attribute_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_reparse_point_attribute.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_reparse_point_attribute_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_reparse_point_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_reparse_point_values.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_reparse_point_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_sds_index_value_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_sds_index_value.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_sds_index_value_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_security_descriptor_index_SOURCES = \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_security_descriptor_index.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_security_descriptor_index_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_security_descriptor_index_value_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_security_descriptor_index_value.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_security_descriptor_index_value_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_security_descriptor_values_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfdata.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_security_descriptor_values.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_security_descriptor_values_LDADD = \\\n\t@LIBFDATA_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_standard_information_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_standard_information_values.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_standard_information_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_support_SOURCES = \\\n\tfsntfs_test_getopt.c fsntfs_test_getopt.h \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libclocale.h \\\n\tfsntfs_test_libcnotify.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_libuna.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_support.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_support_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_bodyfile_SOURCES = \\\n\t../fsntfstools/bodyfile.c ../fsntfstools/bodyfile.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libcpath.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_bodyfile.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_bodyfile_LDADD = \\\n\t@LIBUNA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_digest_hash_SOURCES = \\\n\t../fsntfstools/digest_hash.c ../fsntfstools/digest_hash.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_digest_hash.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_digest_hash_LDADD = \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_info_handle_SOURCES = \\\n\t../fsntfstools/bodyfile.c ../fsntfstools/bodyfile.h \\\n\t../fsntfstools/digest_hash.c ../fsntfstools/digest_hash.h \\\n\t../fsntfstools/info_handle.c ../fsntfstools/info_handle.h \\\n\t../fsntfstools/path_string.c ../fsntfstools/path_string.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_tools_info_handle.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_info_handle_LDADD = \\\n\t@LIBHMAC_LIBADD@ \\\n\t@LIBCRYPTO_LIBADD@ \\\n\t@LIBDL_LIBADD@ \\\n\t@LIBFWNT_LIBADD@ \\\n\t@LIBFUSN_LIBADD@ \\\n\t@LIBFGUID_LIBADD@ \\\n\t@LIBFDATETIME_LIBADD@ \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_mount_path_string_SOURCES = \\\n\t../fsntfstools/mount_path_string.c ../fsntfstools/mount_path_string.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_mount_path_string.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_mount_path_string_LDADD = \\\n\t@LIBUNA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_output_SOURCES = \\\n\t../fsntfstools/fsntfstools_output.c ../fsntfstools/fsntfstools_output.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_output.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_output_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_path_string_SOURCES = \\\n\t../fsntfstools/path_string.c ../fsntfstools/path_string.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libcpath.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_path_string.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_path_string_LDADD = \\\n\t@LIBUNA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_tools_signal_SOURCES = \\\n\t../fsntfstools/fsntfstools_signal.c ../fsntfstools/fsntfstools_signal.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_tools_signal.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_tools_signal_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_txf_data_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_txf_data_values.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_txf_data_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_usn_change_journal_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_usn_change_journal.c\n\nfsntfs_test_usn_change_journal_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_volume_SOURCES = \\\n\tfsntfs_test_getopt.c fsntfs_test_getopt.h \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libclocale.h \\\n\tfsntfs_test_libcnotify.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_libuna.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_rwlock.c fsntfs_test_rwlock.h \\\n\tfsntfs_test_volume.c \\\n\tfsntfs_test_unused.h\n\nfsntfs_test_volume_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@ \\\n\t@PTHREAD_LIBADD@\n\nfsntfs_test_volume_header_SOURCES = \\\n\tfsntfs_test_functions.c fsntfs_test_functions.h \\\n\tfsntfs_test_libbfio.h \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_volume_header.c\n\nfsntfs_test_volume_header_LDADD = \\\n\t@LIBBFIO_LIBADD@ \\\n\t@LIBCPATH_LIBADD@ \\\n\t@LIBCFILE_LIBADD@ \\\n\t@LIBUNA_LIBADD@ \\\n\t@LIBCSPLIT_LIBADD@ \\\n\t@LIBCNOTIFY_LIBADD@ \\\n\t@LIBCLOCALE_LIBADD@ \\\n\t@LIBCDATA_LIBADD@ \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_volume_information_attribute_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_volume_information_attribute.c\n\nfsntfs_test_volume_information_attribute_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_volume_information_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_volume_information_values.c\n\nfsntfs_test_volume_information_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_volume_name_attribute_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_volume_name_attribute.c\n\nfsntfs_test_volume_name_attribute_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nfsntfs_test_volume_name_values_SOURCES = \\\n\tfsntfs_test_libcerror.h \\\n\tfsntfs_test_libfsntfs.h \\\n\tfsntfs_test_macros.h \\\n\tfsntfs_test_memory.c fsntfs_test_memory.h \\\n\tfsntfs_test_unused.h \\\n\tfsntfs_test_volume_name_values.c\n\nfsntfs_test_volume_name_values_LDADD = \\\n\t../libfsntfs/libfsntfs.la \\\n\t@LIBCERROR_LIBADD@\n\nDISTCLEANFILES = \\\n\tMakefile \\\n\tMakefile.in \\\n\tnotify_stream.log\n\n"
  },
  {
    "path": "tests/build.sh",
    "content": "#!/bin/sh\n# Script to build from source\n#\n# Version: 20201121\n\nset -e\n\n./synclibs.sh --use-head\n./autogen.sh\n./configure \"$@\"\nmake > /dev/null\n\n"
  },
  {
    "path": "tests/fsntfs_test_attribute.c",
    "content": "/*\n * Library attribute type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_rwlock.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\n/* $BITMAP attribute\n */\nuint8_t fsntfs_test_attribute_data1[ 40 ] = {\n\t0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_attribute_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 2;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_initialize(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tattribute = (libfsntfs_attribute_t *) 0x12345678UL;\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tattribute = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_attribute_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_attribute_initialize(\n\t\t          &attribute,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( attribute != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_internal_attribute_free(\n\t\t\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"attribute\",\n\t\t\t attribute );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_attribute_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_attribute_initialize(\n\t\t          &attribute,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( attribute != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_internal_attribute_free(\n\t\t\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"attribute\",\n\t\t\t attribute );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_attribute_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_free(\n     void )\n{\n\tlibfsntfs_attribute_t *attribute = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tattribute = (libfsntfs_attribute_t *) 0x12345678UL;\n\n\tresult = libfsntfs_attribute_free(\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_internal_attribute_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_attribute_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_internal_attribute_read_value function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_attribute_read_value(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_attribute_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          NULL,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_internal_attribute_get_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_attribute_get_type(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_type(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_type(\n\t          NULL,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_attribute_get_type(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_type(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_type(\n\t          attribute,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_type(\n\t          NULL,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_type(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_type with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_type(\n\t          attribute,\n\t          &type,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_type with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_type(\n\t          attribute,\n\t          &type,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_data_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_data_flags(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint16_t data_flags      = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_data_flags(\n\t          attribute,\n\t          &data_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_data_flags(\n\t          NULL,\n\t          &data_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_data_flags(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_data_flags with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_flags(\n\t          attribute,\n\t          &data_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_data_flags with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_flags(\n\t          attribute,\n\t          &data_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_internal_attribute_get_value function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_attribute_get_value(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tintptr_t *value          = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          &value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_value(\n\t          NULL,\n\t          &value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_attribute_get_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_utf8_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_utf8_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint8_t utf8_name[ 64 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          NULL,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_utf8_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          64,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_utf8_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          64,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_utf16_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_utf16_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint16_t utf16_name[ 64 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          NULL,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_utf16_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          64,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_utf16_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          64,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_data_vcn_range function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_data_vcn_range(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t data_first_vcn  = 0;\n\tuint64_t data_last_vcn   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          NULL,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          NULL,\n\t          &data_last_vcn,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_data_vcn_range with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_data_vcn_range with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_vcn_range(\n\t          attribute,\n\t          &data_first_vcn,\n\t          &data_last_vcn,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_internal_attribute_get_data_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_attribute_get_data_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t data_size       = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_data_size(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_attribute_get_data_size(\n\t          NULL,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_attribute_get_data_size(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_data_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_data_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t data_size       = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_data_size(\n\t          attribute,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_data_size(\n\t          NULL,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_data_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_data_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_size(\n\t          attribute,\n\t          &data_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_data_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_data_size(\n\t          attribute,\n\t          &data_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_get_valid_data_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_get_valid_data_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t valid_data_size = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          attribute,\n\t          &valid_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          NULL,\n\t          &valid_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_attribute_get_valid_data_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          attribute,\n\t          &valid_data_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_attribute_get_valid_data_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_attribute_get_valid_data_size(\n\t          attribute,\n\t          &valid_data_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_attribute_initialize\",\n\t fsntfs_test_attribute_initialize );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_attribute_free\",\n\t fsntfs_test_attribute_free );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_internal_attribute_free\",\n\t fsntfs_test_internal_attribute_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_internal_attribute_read_value\",\n\t fsntfs_test_internal_attribute_read_value );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_attribute_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_internal_attribute_get_type\",\n\t fsntfs_test_internal_attribute_get_type,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_type\",\n\t fsntfs_test_attribute_get_type,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_data_flags\",\n\t fsntfs_test_attribute_get_data_flags,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_internal_attribute_get_value\",\n\t fsntfs_test_internal_attribute_get_value,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_utf8_name_size\",\n\t fsntfs_test_attribute_get_utf8_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_utf8_name\",\n\t fsntfs_test_attribute_get_utf8_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_utf16_name_size\",\n\t fsntfs_test_attribute_get_utf16_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_utf16_name\",\n\t fsntfs_test_attribute_get_utf16_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_data_vcn_range\",\n\t fsntfs_test_attribute_get_data_vcn_range,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_internal_attribute_get_data_size\",\n\t fsntfs_test_internal_attribute_get_data_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_data_size\",\n\t fsntfs_test_attribute_get_data_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_get_valid_data_size\",\n\t fsntfs_test_attribute_get_valid_data_size,\n\t attribute );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t\t (libfsntfs_internal_attribute_t **) &attribute,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_attribute_list_entry.c",
    "content": "/*\n * Library attribute_list_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute_list_entry.h\"\n\nuint8_t fsntfs_test_attribute_list_entry_data1[ 40 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00,\n\t0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_attribute_list_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_attribute_list_entry_t *attribute_list_entry         = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                = 1;\n\tint number_of_memset_fail_tests                                = 1;\n\tint test_number                                                = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_initialize(\n\t          &attribute_list_entry,\n\t          mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute_list_entry\",\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_list_entry_free(\n\t          &attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute_list_entry\",\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_initialize(\n\t          NULL,\n\t          mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tattribute_list_entry = (libfsntfs_attribute_list_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_attribute_list_entry_initialize(\n\t          &attribute_list_entry,\n\t          mft_attribute_list_entry,\n\t          &error );\n\n\tattribute_list_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_initialize(\n\t          &attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_attribute_list_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_attribute_list_entry_initialize(\n\t\t          &attribute_list_entry,\n\t\t          mft_attribute_list_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( attribute_list_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_attribute_list_entry_free(\n\t\t\t\t &attribute_list_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"attribute_list_entry\",\n\t\t\t attribute_list_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_attribute_list_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_attribute_list_entry_initialize(\n\t\t          &attribute_list_entry,\n\t\t          mft_attribute_list_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( attribute_list_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_attribute_list_entry_free(\n\t\t\t\t &attribute_list_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"attribute_list_entry\",\n\t\t\t attribute_list_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_attribute_list_entry_free(\n\t\t &attribute_list_entry,\n\t\t NULL );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_attribute_list_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_attribute_list_entry_get_attribute_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_attribute_type(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tuint32_t attribute_type                                        = 0;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_attribute_type(\n\t          attribute_list_entry,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_attribute_type(\n\t          NULL,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_attribute_type(\n\t          attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_list_entry_get_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_file_reference(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tuint64_t file_reference                                        = 0;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_file_reference(\n\t          attribute_list_entry,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_file_reference(\n\t          NULL,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_file_reference(\n\t          attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_list_entry_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tsize_t utf8_string_size                                        = 0;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name_size(\n\t          attribute_list_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name_size(\n\t          attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_list_entry_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_utf8_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tuint8_t utf8_string[ 512 ];\n\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t          attribute_list_entry,\n\t          utf8_string,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t          NULL,\n\t          utf8_string,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t          attribute_list_entry,\n\t          NULL,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t          attribute_list_entry,\n\t          utf8_string,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf8_name(\n\t          attribute_list_entry,\n\t          utf8_string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_list_entry_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tsize_t utf16_string_size                                       = 0;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name_size(\n\t          attribute_list_entry,\n\t          &utf16_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name_size(\n\t          attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_attribute_list_entry_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_attribute_list_entry_get_utf16_name(\n     libfsntfs_attribute_list_entry_t *attribute_list_entry )\n{\n\tuint16_t utf16_string[ 512 ];\n\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t          attribute_list_entry,\n\t          utf16_string,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t          NULL,\n\t          utf16_string,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t          attribute_list_entry,\n\t          NULL,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t          attribute_list_entry,\n\t          utf16_string,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_attribute_list_entry_get_utf16_name(\n\t          attribute_list_entry,\n\t          utf16_string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_attribute_list_entry_t *attribute_list_entry         = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_attribute_list_entry_initialize\",\n\t fsntfs_test_attribute_list_entry_initialize );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_attribute_list_entry_free\",\n\t fsntfs_test_attribute_list_entry_free );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize attribute_list_entry for tests\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_list_entry_initialize(\n\t          &attribute_list_entry,\n\t          mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute_list_entry\",\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_attribute_type\",\n\t fsntfs_test_attribute_list_entry_get_attribute_type,\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_file_reference\",\n\t fsntfs_test_attribute_list_entry_get_file_reference,\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_utf8_name_size\",\n\t fsntfs_test_attribute_list_entry_get_utf8_name_size,\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_utf8_name\",\n\t fsntfs_test_attribute_list_entry_get_utf8_name,\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_utf16_name_size\",\n\t fsntfs_test_attribute_list_entry_get_utf16_name_size,\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_attribute_list_entry_get_utf16_name\",\n\t fsntfs_test_attribute_list_entry_get_utf16_name,\n\t attribute_list_entry );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_attribute_list_entry_free(\n\t          &attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute_list_entry\",\n\t attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_attribute_list_entry_free(\n\t\t &attribute_list_entry,\n\t\t NULL );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_bitmap_values.c",
    "content": "/*\n * Library bitmap_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_bitmap_values.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_bitmap_values_data1[ 40 ] = {\n\t0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_bitmap_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_bitmap_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_bitmap_values_t *bitmap_values = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_bitmap_values_initialize(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_bitmap_values_free(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_bitmap_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tbitmap_values = (libfsntfs_bitmap_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_bitmap_values_initialize(\n\t          &bitmap_values,\n\t          &error );\n\n\tbitmap_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_bitmap_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_bitmap_values_initialize(\n\t\t          &bitmap_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( bitmap_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_bitmap_values_free(\n\t\t\t\t &bitmap_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"bitmap_values\",\n\t\t\t bitmap_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_bitmap_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_bitmap_values_initialize(\n\t\t          &bitmap_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( bitmap_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_bitmap_values_free(\n\t\t\t\t &bitmap_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"bitmap_values\",\n\t\t\t bitmap_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( bitmap_values != NULL )\n\t{\n\t\tlibfsntfs_bitmap_values_free(\n\t\t &bitmap_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_bitmap_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_bitmap_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_bitmap_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_bitmap_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_bitmap_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_bitmap_values_t *bitmap_values = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\toff64_t base_offset                      = 0;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_bitmap_values_initialize(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_bitmap_values_read_data(\n\t          bitmap_values,\n\t          &( fsntfs_test_bitmap_values_data1[ 32 ] ),\n\t          8,\n\t          512,\n\t          &base_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_bitmap_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_bitmap_values_data1[ 32 ] ),\n\t          8,\n\t          512,\n\t          &base_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_bitmap_values_read_data(\n\t          bitmap_values,\n\t          NULL,\n\t          8,\n\t          512,\n\t          &base_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_bitmap_values_read_data(\n\t          bitmap_values,\n\t          &( fsntfs_test_bitmap_values_data1[ 32 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          512,\n\t          &base_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_bitmap_values_read_data(\n\t          bitmap_values,\n\t          &( fsntfs_test_bitmap_values_data1[ 32 ] ),\n\t          8,\n\t          512,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_bitmap_values_free(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( bitmap_values != NULL )\n\t{\n\t\tlibfsntfs_bitmap_values_free(\n\t\t &bitmap_values,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_bitmap_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_bitmap_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_bitmap_values_t *bitmap_values = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_bitmap_values_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_bitmap_values_initialize(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_bitmap_values_read_from_mft_attribute(\n\t          bitmap_values,\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          512,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_bitmap_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          512,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_bitmap_values_read_from_mft_attribute(\n\t          bitmap_values,\n\t          NULL,\n\t          io_handle,\n\t          NULL,\n\t          512,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_bitmap_values_free(\n\t          &bitmap_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"bitmap_values\",\n\t bitmap_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( bitmap_values != NULL )\n\t{\n\t\tlibfsntfs_bitmap_values_free(\n\t\t &bitmap_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_bitmap_values_initialize\",\n\t fsntfs_test_bitmap_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_bitmap_values_free\",\n\t fsntfs_test_bitmap_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_bitmap_values_read_data\",\n\t fsntfs_test_bitmap_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_bitmap_values_read_from_mft_attribute\",\n\t fsntfs_test_bitmap_values_read_from_mft_attribute );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_buffer_data_handle.c",
    "content": "/*\n * Library buffer_data_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_buffer_data_handle.h\"\n\nuint8_t fsntfs_test_buffer_data_handle_data1[ 16 ] = {\n\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_buffer_data_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_buffer_data_handle_initialize(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_buffer_data_handle_t *buffer_data_handle = NULL;\n\tint result                                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                    = 1;\n\tint number_of_memset_fail_tests                    = 1;\n\tint test_number                                    = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_buffer_data_handle_free(\n\t          &buffer_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_buffer_data_handle_free(\n\t          &buffer_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          NULL,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tbuffer_data_handle = (libfsntfs_buffer_data_handle_t *) 0x12345678UL;\n\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          16,\n\t          &error );\n\n\tbuffer_data_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_buffer_data_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_buffer_data_handle_initialize(\n\t\t          &buffer_data_handle,\n\t\t          fsntfs_test_buffer_data_handle_data1,\n\t\t          16,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( buffer_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_buffer_data_handle_free(\n\t\t\t\t &buffer_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"buffer_data_handle\",\n\t\t\t buffer_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_buffer_data_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_buffer_data_handle_initialize(\n\t\t          &buffer_data_handle,\n\t\t          fsntfs_test_buffer_data_handle_data1,\n\t\t          16,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( buffer_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_buffer_data_handle_free(\n\t\t\t\t &buffer_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"buffer_data_handle\",\n\t\t\t buffer_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( buffer_data_handle != NULL )\n\t{\n\t\tlibfsntfs_buffer_data_handle_free(\n\t\t &buffer_data_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_buffer_data_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_buffer_data_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_buffer_data_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_buffer_data_handle_read_segment_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_buffer_data_handle_read_segment_data(\n     void )\n{\n\tuint8_t segment_data[ 16 ];\n\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_buffer_data_handle_t *buffer_data_handle = NULL;\n\tssize_t read_count                                 = 0;\n\toff64_t offset                                     = 0;\n\tint result                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          12 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer on last segment boundary\n\t */\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              8,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          &( fsntfs_test_buffer_data_handle_data1[ 12 ] ),\n\t          4 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer beyond last segment\n\t */\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\toffset = libfsntfs_buffer_data_handle_seek_segment_offset(\n\t          buffer_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              NULL,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tbuffer_data_handle->current_offset = -1;\n\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tbuffer_data_handle->current_offset = 0;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              -1,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              NULL,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_buffer_data_handle_read_segment_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_buffer_data_handle_read_segment_data(\n\t              buffer_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_buffer_data_handle_free(\n\t          &buffer_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( buffer_data_handle != NULL )\n\t{\n\t\tlibfsntfs_buffer_data_handle_free(\n\t\t &buffer_data_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_buffer_data_handle_seek_segment_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_buffer_data_handle_seek_segment_offset(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_buffer_data_handle_t *buffer_data_handle = NULL;\n\toff64_t offset                                     = 0;\n\tint result                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_buffer_data_handle_initialize(\n\t          &buffer_data_handle,\n\t          fsntfs_test_buffer_data_handle_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_buffer_data_handle_seek_segment_offset(\n\t          buffer_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_buffer_data_handle_seek_segment_offset(\n\t          NULL,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_buffer_data_handle_seek_segment_offset(\n\t          buffer_data_handle,\n\t          NULL,\n\t          -1,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_buffer_data_handle_seek_segment_offset(\n\t          buffer_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_buffer_data_handle_free(\n\t          &buffer_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"buffer_data_handle\",\n\t buffer_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( buffer_data_handle != NULL )\n\t{\n\t\tlibfsntfs_buffer_data_handle_free(\n\t\t &buffer_data_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_buffer_data_handle_initialize\",\n\t fsntfs_test_buffer_data_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_buffer_data_handle_free\",\n\t fsntfs_test_buffer_data_handle_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_buffer_data_handle_read_segment_data\",\n\t fsntfs_test_buffer_data_handle_read_segment_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_buffer_data_handle_seek_segment_offset\",\n\t fsntfs_test_buffer_data_handle_seek_segment_offset );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_cluster_block.c",
    "content": "/*\n * Library cluster_block type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_cluster_block.h\"\n\nuint8_t fsntfs_test_cluster_block_data1[ 1024 ] = {\n\t0x52, 0x21, 0x00, 0x00, 0x53, 0x21, 0x00, 0x00, 0x54, 0x21, 0x00, 0x00, 0x55, 0x21, 0x00, 0x00,\n\t0x56, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_cluster_block_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 2;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_initialize(\n\t          &cluster_block,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_cluster_block_free(\n\t          &cluster_block,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_initialize(\n\t          NULL,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcluster_block = (libfsntfs_cluster_block_t *) 0x12345678UL;\n\n\tresult = libfsntfs_cluster_block_initialize(\n\t          &cluster_block,\n\t          1024,\n\t          &error );\n\n\tcluster_block = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_initialize(\n\t          &cluster_block,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_initialize(\n\t\t          &cluster_block,\n\t\t          1024,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_cluster_block_free(\n\t\t\t\t &cluster_block,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block\",\n\t\t\t cluster_block );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_initialize(\n\t\t          &cluster_block,\n\t\t          1024,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_cluster_block_free(\n\t\t\t\t &cluster_block,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block\",\n\t\t\t cluster_block );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block != NULL )\n\t{\n\t\tlibfsntfs_cluster_block_free(\n\t\t &cluster_block,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_clear function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_clear(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_initialize(\n\t          &cluster_block,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_clear(\n\t          cluster_block,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_clear(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_cluster_block_clear with memset failing\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tresult = libfsntfs_cluster_block_clear(\n\t          cluster_block,\n\t          &error );\n\n\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_cluster_block_free(\n\t          &cluster_block,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block != NULL )\n\t{\n\t\tlibfsntfs_cluster_block_free(\n\t\t &cluster_block,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_read_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_read_file_io_handle(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle         = NULL;\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_cluster_block_t *cluster_block = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_initialize(\n\t          &cluster_block,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_cluster_block_data1,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_read_file_io_handle(\n\t          cluster_block,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_read_file_io_handle(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_read_file_io_handle(\n\t          cluster_block,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_read_file_io_handle(\n\t          cluster_block,\n\t          file_io_handle,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data too small\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_cluster_block_data1,\n\t          8,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_cluster_block_read_file_io_handle(\n\t          cluster_block,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_cluster_block_free(\n\t          &cluster_block,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block\",\n\t cluster_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( cluster_block != NULL )\n\t{\n\t\tlibfsntfs_cluster_block_free(\n\t\t &cluster_block,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_initialize\",\n\t fsntfs_test_cluster_block_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_free\",\n\t fsntfs_test_cluster_block_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_clear\",\n\t fsntfs_test_cluster_block_clear );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_read_file_io_handle\",\n\t fsntfs_test_cluster_block_read_file_io_handle );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_cluster_block_data.c",
    "content": "/*\n * Library cluster_block_data type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_cluster_block_data.h\"\n\nuint8_t fsntfs_test_cluster_block_data1[ 16384 ] = {\n\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53, 0x53, 0x45, 0x52, 0x20,\n\t0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x4c,\n\t0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x39, 0x20, 0x4a, 0x75, 0x6e, 0x65,\n\t0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,\n\t0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x30, 0x37, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,\n\t0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a,\n\t0x2f, 0x2f, 0x66, 0x73, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x45, 0x76, 0x65,\n\t0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74,\n\t0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64,\n\t0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x72, 0x62, 0x61, 0x74,\n\t0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e,\n\t0x67, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f,\n\t0x77, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,\n\t0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69,\n\t0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x74, 0x68, 0x65, 0x20,\n\t0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65,\n\t0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,\n\t0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20,\n\t0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x30, 0x2e, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x44,\n\t0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41,\n\t0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x20, 0x22,\n\t0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73,\n\t0x73, 0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x22, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20,\n\t0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x67,\n\t0x6f, 0x76, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74,\n\t0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x22, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x6e, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x6b,\n\t0x65, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74,\n\t0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a,\n\t0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20,\n\t0x62, 0x75, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64,\n\t0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e,\n\t0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x63,\n\t0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20,\n\t0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x65, 0x6d, 0x65, 0x64,\n\t0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x0a, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67,\n\t0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72,\n\t0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,\n\t0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62,\n\t0x79, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x6c,\n\t0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a, 0x77,\n\t0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x61, 0x73, 0x20,\n\t0x6d, 0x61, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x61, 0x6c,\n\t0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a,\n\t0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65,\n\t0x20, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69,\n\t0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,\n\t0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73,\n\t0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x6f, 0x6c, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f,\n\t0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,\n\t0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c,\n\t0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x61,\n\t0x6e, 0x64, 0x20, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,\n\t0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72,\n\t0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x66, 0x72, 0x6f,\n\t0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31,\n\t0x2e, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x53,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76,\n\t0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,\n\t0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x33, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x34,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,\n\t0x0a, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x62,\n\t0x6f, 0x75, 0x6e, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x32, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e,\n\t0x67, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d,\n\t0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64,\n\t0x2c, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20,\n\t0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61,\n\t0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20,\n\t0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x28, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,\n\t0x74, 0x68, 0x65, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20,\n\t0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20,\n\t0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69,\n\t0x66, 0x69, 0x65, 0x64, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x0a, 0x20,\n\t0x20, 0x20, 0x61, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,\n\t0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,\n\t0x61, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x61, 0x69, 0x74, 0x68, 0x20, 0x65, 0x66, 0x66,\n\t0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65,\n\t0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76,\n\t0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70,\n\t0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x6f,\n\t0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x65, 0x72,\n\t0x66, 0x6f, 0x72, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,\n\t0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x75,\n\t0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x62, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x6e, 0x65,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,\n\t0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,\n\t0x66, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x33, 0x2e,\n\t0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72,\n\t0x69, 0x61, 0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64,\n\t0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70,\n\t0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,\n\t0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x61, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20,\n\t0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x63, 0x6f,\n\t0x64, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x70,\n\t0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x66,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65,\n\t0x64, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f,\n\t0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6d,\n\t0x65, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,\n\t0x73, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,\n\t0x65, 0x0a, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x63,\n\t0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6d, 0x61, 0x6c,\n\t0x6c, 0x20, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x2c, 0x20, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,\n\t0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74,\n\t0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x28, 0x74, 0x65, 0x6e, 0x20, 0x6f, 0x72,\n\t0x20, 0x66, 0x65, 0x77, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20,\n\t0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20,\n\t0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,\n\t0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69,\n\t0x76, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74,\n\t0x69, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f,\n\t0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,\n\t0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,\n\t0x20, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65,\n\t0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64,\n\t0x20, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20,\n\t0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20,\n\t0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62,\n\t0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x34, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65,\n\t0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,\n\t0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,\n\t0x68, 0x6f, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x0a, 0x74, 0x61, 0x6b, 0x65,\n\t0x6e, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x20, 0x65, 0x66, 0x66, 0x65,\n\t0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72,\n\t0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x6f, 0x72, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x0a, 0x65,\n\t0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,\n\t0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6d, 0x6f,\n\t0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x69, 0x66, 0x20,\n\t0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68,\n\t0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,\n\t0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70,\n\t0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20,\n\t0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69,\n\t0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f,\n\t0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x41, 0x63,\n\t0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x63, 0x6f, 0x70, 0x79,\n\t0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x64, 0x75,\n\t0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e,\n\t0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20,\n\t0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x64,\n\t0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65,\n\t0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x69,\n\t0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50,\n\t0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,\n\t0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x64, 0x29, 0x20, 0x44, 0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c,\n\t0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70,\n\t0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x6e,\n\t0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,\n\t0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,\n\t0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x6c, 0x69, 0x6e,\n\t0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,\n\t0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74,\n\t0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65,\n\t0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,\n\t0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x29, 0x20, 0x55, 0x73, 0x65,\n\t0x20, 0x61, 0x20, 0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x61, 0x72,\n\t0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61,\n\t0x6e, 0x69, 0x73, 0x6d, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x73, 0x75, 0x69,\n\t0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x20,\n\t0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x61, 0x29, 0x20,\n\t0x75, 0x73, 0x65, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65,\n\t0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6c,\n\t0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70,\n\t0x75, 0x74, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x62, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c,\n\t0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x6c,\n\t0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,\n\t0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74,\n\t0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65,\n\t0x72, 0x77, 0x69, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75,\n\t0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47,\n\t0x50, 0x4c, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79,\n\t0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x72,\n\t0x65, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65,\n\t0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,\n\t0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64,\n\t0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x28, 0x49, 0x66, 0x0a, 0x20, 0x20,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x34, 0x64, 0x30, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,\n\t0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,\n\t0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x64,\n\t0x31, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76,\n\t0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65,\n\t0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63,\n\t0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x29, 0x0a,\n\t0x0a, 0x20, 0x20, 0x35, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75,\n\t0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61,\n\t0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20,\n\t0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73,\n\t0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f,\n\t0x6e, 0x76, 0x65, 0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x75, 0x6e, 0x64,\n\t0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72,\n\t0x0a, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20,\n\t0x64, 0x6f, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,\n\t0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29,\n\t0x20, 0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73,\n\t0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69,\n\t0x65, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e,\n\t0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70, 0x72, 0x6f,\n\t0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x77, 0x69,\n\t0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,\n\t0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65,\n\t0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20,\n\t0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x61,\n\t0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x63, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x36, 0x2e, 0x20, 0x52, 0x65, 0x76, 0x69, 0x73, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20,\n\t0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,\n\t0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77,\n\t0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,\n\t0x61, 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73,\n\t0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,\n\t0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,\n\t0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x69, 0x6d,\n\t0x65, 0x2e, 0x20, 0x53, 0x75, 0x63, 0x68, 0x20, 0x6e, 0x65, 0x77, 0x0a, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6d,\n\t0x69, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x20, 0x74,\n\t0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x64,\n\t0x69, 0x66, 0x66, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20,\n\t0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70,\n\t0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65,\n\t0x72, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20,\n\t0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x49,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74, 0x65,\n\t0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n\t0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,\n\t0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,\n\t0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,\n\t0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x70, 0x75, 0x62,\n\t0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,\n\t0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e,\n\t0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65,\n\t0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e,\n\t0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x0a, 0x47, 0x65,\n\t0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,\n\t0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68,\n\t0x6f, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73,\n\t0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,\n\t0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x70,\n\t0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f,\n\t0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x73,\n\t0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20,\n\t0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65,\n\t0x0a, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20,\n\t0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x74,\n\t0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x27, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20,\n\t0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,\n\t0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x70, 0x65, 0x72,\n\t0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20,\n\t0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_cluster_block_data_read_segment_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_data_read_segment_data(\n     void )\n{\n\tuint8_t segment_data[ 16 ];\n\n\tuint8_t expected_segment_data1[ 12 ] = {\n\t\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53 };\n\tuint8_t expected_segment_data2[ 4 ] = {\n\t\t0x00, 0x00, 0x00, 0x00 };\n\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tssize_t read_count               = 0;\n\toff64_t offset                   = 0;\n\tint result                       = 0;\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_cluster_block_data1,\n\t          16384,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          expected_segment_data1,\n\t          12 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer on last segment boundary\n\t */\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          0,\n\t          16384 - 4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 16384 - 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              8,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          expected_segment_data2,\n\t          4 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer beyond last segment\n\t */\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              NULL,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_cluster_block_data_read_segment_data with memset failing\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_cluster_block_data_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = libbfio_handle_free(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_data_seek_segment_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_data_seek_segment_offset(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\toff64_t offset                   = 0;\n\tint result                       = 0;\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_cluster_block_data1,\n\t          16384,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_cluster_block_data_seek_segment_offset(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          0,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = libbfio_handle_free(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_data_read_segment_data\",\n\t fsntfs_test_cluster_block_data_read_segment_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_data_seek_segment_offset\",\n\t fsntfs_test_cluster_block_data_seek_segment_offset );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_cluster_block_stream.c",
    "content": "/*\n * Library cluster_block_stream type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_cluster_block_stream.h\"\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_cluster_block_stream_data1[ 72 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_cluster_block_stream_data2[ 80 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x01, 0x01, 0x0e, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_cluster_block_stream_data3[ 112 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x01, 0x11, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x56, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x57, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x72, 0x00,\n\t0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x44, 0x00, 0x61, 0x00, 0x74, 0x00,\n\t0x61, 0x00, 0x11, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_cluster_block_stream_initialize_from_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_stream_initialize_from_data(\n     void )\n{\n\tuint8_t buffer[ 64 ];\n\n\tlibcerror_error_t *error                = NULL;\n\tlibfdata_stream_t *cluster_block_stream = NULL;\n\tvoid *memset_result                     = NULL;\n\tint result                              = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests         = 2;\n\tint test_number                         = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tmemset_result = memory_set(\n\t                 buffer,\n\t                 0,\n\t                 64 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &cluster_block_stream,\n\t          buffer,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &cluster_block_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_stream\",\n\t cluster_block_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          NULL,\n\t          buffer,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &cluster_block_stream,\n\t          NULL,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &cluster_block_stream,\n\t          buffer,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_stream_initialize_from_data with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t\t          &cluster_block_stream,\n\t\t          buffer,\n\t\t          64,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_stream_free(\n\t\t\t\t &cluster_block_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_stream\",\n\t\t\t cluster_block_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_stream_initialize_from_data_runs function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_stream_initialize_from_data_runs(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfdata_stream_t *cluster_block_stream  = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_stream_data1,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &cluster_block_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_stream\",\n\t cluster_block_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t          &cluster_block_stream,\n\t          NULL,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tio_handle->cluster_block_size = 0;\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          NULL,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_stream_initialize_from_data_runs with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_data_runs(\n\t\t          &cluster_block_stream,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          4096,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_stream_free(\n\t\t\t\t &cluster_block_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_stream\",\n\t\t\t cluster_block_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_stream_initialize_from_compressed_data_runs(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfdata_stream_t *cluster_block_stream  = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 2;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_stream_data2,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &cluster_block_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_stream\",\n\t cluster_block_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t          &cluster_block_stream,\n\t          NULL,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          NULL,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs(\n\t\t          &cluster_block_stream,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          4096,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_stream_free(\n\t\t\t\t &cluster_block_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_stream\",\n\t\t\t cluster_block_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_stream_initialize_from_compressed_stream function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_stream_initialize_from_compressed_stream(\n     void )\n{\n\tuint8_t buffer[ 64 ];\n\n\tlibcerror_error_t *error                  = NULL;\n\tlibfdata_stream_t *cluster_block_stream   = NULL;\n\tlibfdata_stream_t *compressed_data_stream = NULL;\n\tlibfsntfs_io_handle_t *io_handle          = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute  = NULL;\n\tint result                                = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests           = 2;\n\tint test_number                           = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_stream_data2,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          buffer,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t          &cluster_block_stream,\n\t          compressed_data_stream,\n\t          mft_attribute,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tcompressed_data_stream = NULL;\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &cluster_block_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_stream\",\n\t cluster_block_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          buffer,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t          NULL,\n\t          compressed_data_stream,\n\t          mft_attribute,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t          &cluster_block_stream,\n\t          NULL,\n\t          mft_attribute,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t          &cluster_block_stream,\n\t          compressed_data_stream,\n\t          NULL,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_stream_initialize_from_compressed_stream with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_stream_initialize_from_compressed_stream(\n\t\t          &cluster_block_stream,\n\t\t          compressed_data_stream,\n\t\t          mft_attribute,\n\t\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_stream_free(\n\t\t\t\t &cluster_block_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_stream\",\n\t\t\t cluster_block_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &compressed_data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\tif( compressed_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &compressed_data_stream,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_stream_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_stream_initialize(\n     void )\n{\n\tlibcerror_error_t *error                  = NULL;\n\tlibfdata_stream_t *cluster_block_stream   = NULL;\n\tlibfsntfs_io_handle_t *io_handle          = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute  = NULL;\n\tint result                                = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests           = 1;\n\tint test_number                           = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_stream_data2,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          mft_attribute,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfdata_stream_free(\n\t          &cluster_block_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_stream\",\n\t cluster_block_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize(\n\t          &cluster_block_stream,\n\t          NULL,\n\t          mft_attribute,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_stream_initialize(\n\t          &cluster_block_stream,\n\t          io_handle,\n\t          NULL,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_stream_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_stream_initialize(\n\t\t          &cluster_block_stream,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          NULL,\n\t\t          0,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_stream_free(\n\t\t\t\t &cluster_block_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_stream\",\n\t\t\t cluster_block_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &cluster_block_stream,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_stream_initialize_from_data\",\n\t fsntfs_test_cluster_block_stream_initialize_from_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_stream_initialize_from_data_runs\",\n\t fsntfs_test_cluster_block_stream_initialize_from_data_runs );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_stream_initialize_from_compressed_data_runs\",\n\t fsntfs_test_cluster_block_stream_initialize_from_compressed_data_runs );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_stream_initialize_from_compressed_stream\",\n\t fsntfs_test_cluster_block_stream_initialize_from_compressed_stream );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_stream_initialize\",\n\t fsntfs_test_cluster_block_stream_initialize );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_cluster_block_vector.c",
    "content": "/*\n * Library cluster_block_vector type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfcache.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_cluster_block_vector.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_cluster_block_vector_data1[ 72 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_cluster_block_vector_data2[ 24576 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53, 0x53, 0x45, 0x52, 0x20,\n\t0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x4c,\n\t0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x39, 0x20, 0x4a, 0x75, 0x6e, 0x65,\n\t0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,\n\t0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x30, 0x37, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,\n\t0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a,\n\t0x2f, 0x2f, 0x66, 0x73, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x45, 0x76, 0x65,\n\t0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74,\n\t0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64,\n\t0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x72, 0x62, 0x61, 0x74,\n\t0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e,\n\t0x67, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f,\n\t0x77, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,\n\t0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69,\n\t0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x74, 0x68, 0x65, 0x20,\n\t0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65,\n\t0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,\n\t0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20,\n\t0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x30, 0x2e, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x44,\n\t0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41,\n\t0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x20, 0x22,\n\t0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73,\n\t0x73, 0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x22, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20,\n\t0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x67,\n\t0x6f, 0x76, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74,\n\t0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x22, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x6e, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x6b,\n\t0x65, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74,\n\t0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a,\n\t0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20,\n\t0x62, 0x75, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64,\n\t0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e,\n\t0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x63,\n\t0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20,\n\t0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x65, 0x6d, 0x65, 0x64,\n\t0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x0a, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67,\n\t0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72,\n\t0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,\n\t0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62,\n\t0x79, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x6c,\n\t0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a, 0x77,\n\t0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x61, 0x73, 0x20,\n\t0x6d, 0x61, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x61, 0x6c,\n\t0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a,\n\t0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65,\n\t0x20, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69,\n\t0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,\n\t0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73,\n\t0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x6f, 0x6c, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f,\n\t0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,\n\t0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c,\n\t0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x61,\n\t0x6e, 0x64, 0x20, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,\n\t0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72,\n\t0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x66, 0x72, 0x6f,\n\t0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31,\n\t0x2e, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x53,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76,\n\t0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,\n\t0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x33, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x34,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,\n\t0x0a, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x62,\n\t0x6f, 0x75, 0x6e, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x32, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e,\n\t0x67, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d,\n\t0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64,\n\t0x2c, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20,\n\t0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61,\n\t0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20,\n\t0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x28, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,\n\t0x74, 0x68, 0x65, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20,\n\t0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20,\n\t0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69,\n\t0x66, 0x69, 0x65, 0x64, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x0a, 0x20,\n\t0x20, 0x20, 0x61, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,\n\t0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,\n\t0x61, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x61, 0x69, 0x74, 0x68, 0x20, 0x65, 0x66, 0x66,\n\t0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65,\n\t0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76,\n\t0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70,\n\t0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x6f,\n\t0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x65, 0x72,\n\t0x66, 0x6f, 0x72, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,\n\t0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x75,\n\t0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x62, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x6e, 0x65,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,\n\t0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,\n\t0x66, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x33, 0x2e,\n\t0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72,\n\t0x69, 0x61, 0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64,\n\t0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70,\n\t0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,\n\t0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x61, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20,\n\t0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x63, 0x6f,\n\t0x64, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x70,\n\t0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x66,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65,\n\t0x64, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f,\n\t0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6d,\n\t0x65, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,\n\t0x73, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,\n\t0x65, 0x0a, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x63,\n\t0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6d, 0x61, 0x6c,\n\t0x6c, 0x20, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x2c, 0x20, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,\n\t0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74,\n\t0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x28, 0x74, 0x65, 0x6e, 0x20, 0x6f, 0x72,\n\t0x20, 0x66, 0x65, 0x77, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20,\n\t0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20,\n\t0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,\n\t0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69,\n\t0x76, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74,\n\t0x69, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f,\n\t0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,\n\t0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,\n\t0x20, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65,\n\t0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64,\n\t0x20, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20,\n\t0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20,\n\t0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62,\n\t0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x34, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65,\n\t0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,\n\t0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,\n\t0x68, 0x6f, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x0a, 0x74, 0x61, 0x6b, 0x65,\n\t0x6e, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x20, 0x65, 0x66, 0x66, 0x65,\n\t0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72,\n\t0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x6f, 0x72, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x0a, 0x65,\n\t0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,\n\t0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6d, 0x6f,\n\t0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x69, 0x66, 0x20,\n\t0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68,\n\t0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,\n\t0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70,\n\t0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20,\n\t0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69,\n\t0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f,\n\t0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x41, 0x63,\n\t0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x63, 0x6f, 0x70, 0x79,\n\t0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x64, 0x75,\n\t0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e,\n\t0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20,\n\t0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x64,\n\t0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65,\n\t0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x69,\n\t0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50,\n\t0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,\n\t0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x64, 0x29, 0x20, 0x44, 0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c,\n\t0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70,\n\t0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x6e,\n\t0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,\n\t0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,\n\t0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x6c, 0x69, 0x6e,\n\t0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,\n\t0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74,\n\t0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65,\n\t0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,\n\t0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x29, 0x20, 0x55, 0x73, 0x65,\n\t0x20, 0x61, 0x20, 0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x61, 0x72,\n\t0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61,\n\t0x6e, 0x69, 0x73, 0x6d, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x73, 0x75, 0x69,\n\t0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x20,\n\t0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x61, 0x29, 0x20,\n\t0x75, 0x73, 0x65, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65,\n\t0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6c,\n\t0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70,\n\t0x75, 0x74, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x62, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c,\n\t0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x6c,\n\t0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,\n\t0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74,\n\t0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65,\n\t0x72, 0x77, 0x69, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75,\n\t0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47,\n\t0x50, 0x4c, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79,\n\t0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x72,\n\t0x65, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65,\n\t0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,\n\t0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64,\n\t0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x28, 0x49, 0x66, 0x0a, 0x20, 0x20,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x34, 0x64, 0x30, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,\n\t0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,\n\t0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x64,\n\t0x31, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76,\n\t0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65,\n\t0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63,\n\t0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x29, 0x0a,\n\t0x0a, 0x20, 0x20, 0x35, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75,\n\t0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61,\n\t0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20,\n\t0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73,\n\t0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f,\n\t0x6e, 0x76, 0x65, 0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x75, 0x6e, 0x64,\n\t0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72,\n\t0x0a, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20,\n\t0x64, 0x6f, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,\n\t0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29,\n\t0x20, 0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73,\n\t0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69,\n\t0x65, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e,\n\t0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70, 0x72, 0x6f,\n\t0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x77, 0x69,\n\t0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,\n\t0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65,\n\t0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20,\n\t0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x61,\n\t0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x63, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x36, 0x2e, 0x20, 0x52, 0x65, 0x76, 0x69, 0x73, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20,\n\t0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,\n\t0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77,\n\t0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,\n\t0x61, 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73,\n\t0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,\n\t0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,\n\t0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x69, 0x6d,\n\t0x65, 0x2e, 0x20, 0x53, 0x75, 0x63, 0x68, 0x20, 0x6e, 0x65, 0x77, 0x0a, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6d,\n\t0x69, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x20, 0x74,\n\t0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x64,\n\t0x69, 0x66, 0x66, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20,\n\t0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70,\n\t0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65,\n\t0x72, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20,\n\t0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x49,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74, 0x65,\n\t0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n\t0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,\n\t0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,\n\t0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,\n\t0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x70, 0x75, 0x62,\n\t0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,\n\t0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e,\n\t0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65,\n\t0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e,\n\t0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x0a, 0x47, 0x65,\n\t0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,\n\t0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68,\n\t0x6f, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73,\n\t0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,\n\t0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x70,\n\t0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f,\n\t0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x73,\n\t0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20,\n\t0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65,\n\t0x0a, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20,\n\t0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x74,\n\t0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x27, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20,\n\t0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,\n\t0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x70, 0x65, 0x72,\n\t0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20,\n\t0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_cluster_block_vector_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_vector_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfdata_vector_t *cluster_block_vector  = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_vector_data1,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cluster_block_vector\",\n\t cluster_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &cluster_block_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_vector\",\n\t cluster_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcluster_block_vector = (libfdata_vector_t *) 0x12345678UL;\n\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tcluster_block_vector = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tio_handle->cluster_block_size = 0;\n\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK set */\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_vector_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_vector_initialize(\n\t\t          &cluster_block_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &cluster_block_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_vector\",\n\t\t\t cluster_block_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_cluster_block_vector_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_cluster_block_vector_initialize(\n\t\t          &cluster_block_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( cluster_block_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &cluster_block_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"cluster_block_vector\",\n\t\t\t cluster_block_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( cluster_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &cluster_block_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_cluster_block_vector_read_element_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_cluster_block_vector_read_element_data(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle         = NULL;\n\tlibcerror_error_t *error                 = NULL;\n\tlibfcache_cache_t *cache                 = NULL;\n\tlibfdata_vector_t *cluster_block_vector  = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_cluster_block_vector_data1,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_cluster_block_vector_initialize(\n\t          &cluster_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cluster_block_vector\",\n\t cluster_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfcache_cache_initialize(\n\t          &cache,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_cluster_block_vector_data2,\n\t          24576,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          0,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          (size64_t) SSIZE_MAX + 1,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          NULL,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO implement read from file IO handle failing */\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_cluster_block_vector_read_element_data with malloc failing in libfsntfs_cluster_block_initialize\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_cluster_block_vector_read_element_data with memset failing in libfsntfs_cluster_block_clear\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tresult = libfsntfs_cluster_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          cluster_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_SPARSE,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfcache_cache_free(\n\t          &cache,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &cluster_block_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cluster_block_vector\",\n\t cluster_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &cache,\n\t\t NULL );\n\t}\n\tif( cluster_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &cluster_block_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_vector_initialize\",\n\t fsntfs_test_cluster_block_vector_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_cluster_block_vector_read_element_data\",\n\t fsntfs_test_cluster_block_vector_read_element_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compressed_block.c",
    "content": "/*\n * Library compressed_block type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compressed_block.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compressed_block_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_initialize(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_compressed_block_t *compressed_block = NULL;\n\tint result                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                = 2;\n\tint number_of_memset_fail_tests                = 1;\n\tint test_number                                = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compressed_block_initialize(\n\t          &compressed_block,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block\",\n\t compressed_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_free(\n\t          &compressed_block,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block\",\n\t compressed_block );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_initialize(\n\t          NULL,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompressed_block = (libfsntfs_compressed_block_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compressed_block_initialize(\n\t          &compressed_block,\n\t          1024,\n\t          &error );\n\n\tcompressed_block = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_initialize(\n\t          &compressed_block,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_initialize(\n\t\t          &compressed_block,\n\t\t          1024,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compressed_block_free(\n\t\t\t\t &compressed_block,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block\",\n\t\t\t compressed_block );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_initialize(\n\t\t          &compressed_block,\n\t\t          1024,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compressed_block_free(\n\t\t\t\t &compressed_block,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block\",\n\t\t\t compressed_block );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_block != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_free(\n\t\t &compressed_block,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_block_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_initialize\",\n\t fsntfs_test_compressed_block_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_free\",\n\t fsntfs_test_compressed_block_free );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compressed_block_data_handle.c",
    "content": "/*\n * Library compressed_block_data_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compressed_block_data_handle.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_compressed_block_data_handle_data1[ 80 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x01, 0x01, 0x0e, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_compressed_block_data_handle_lznt1_compressed_data1[ 24576 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x65, 0xb8, 0x00, 0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x00, 0x20, 0x4c, 0x45, 0x53,\n\t0x53, 0x45, 0x52, 0x20, 0x00, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x80, 0x50, 0x55,\n\t0x42, 0x4c, 0x49, 0x43, 0x20, 0x00, 0x18, 0x60, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x00, 0x90, 0x11,\n\t0x08, 0x56, 0x00, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x00, 0x2c, 0x20, 0x32, 0x39,\n\t0x20, 0x4a, 0x75, 0x6e, 0x00, 0x65, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x00, 0x20, 0x43,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x40, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x02, 0x28, 0x20,\n\t0x00, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x00, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,\n\t0x46, 0x6f, 0x20, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x00, 0x7a, 0x2c, 0x20, 0x00, 0x49, 0x6e, 0x63,\n\t0x2e, 0x20, 0x3c, 0x68, 0x74, 0x00, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x66, 0x73, 0x66, 0x00, 0x2e,\n\t0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x40, 0x45, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x00, 0x54,\n\t0x69, 0x00, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x00, 0x74, 0x65, 0x64, 0x20, 0x74,\n\t0x6f, 0x20, 0x63, 0x01, 0x00, 0x5d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x00, 0x73, 0x74,\n\t0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2a, 0x20, 0x00, 0x2b, 0x62, 0x00, 0x4f, 0x6d, 0x01, 0x1c,\n\t0x69, 0x65, 0x00, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x01, 0x00, 0x39, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x08, 0x74,\n\t0x2c, 0x20, 0x00, 0x2f, 0x20, 0x63, 0x68, 0x61, 0x00, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x69,\n\t0x74, 0x02, 0x20, 0x00, 0x12, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x80, 0x6c, 0x6f, 0x77, 0x65,\n\t0x64, 0x2e, 0x0a, 0x80, 0x5f, 0xbc, 0x20, 0x54, 0x01, 0x1d, 0x80, 0x29, 0x82, 0x6f, 0x02, 0x25,\n\t0x65, 0x83, 0x93, 0x00, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x00, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x12, 0x62, 0x80, 0x2f, 0x20, 0x4c, 0x84, 0x31, 0x69, 0x6e, 0x63,\n\t0x80, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x80, 0x40, 0xa0, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x00, 0x5b, 0x73, 0x02, 0x55, 0xa0, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x81, 0x77, 0x73, 0x81, 0x4c,\n\t0x5d, 0x85, 0x2c, 0x33, 0x03, 0x53, 0x83, 0x2d, 0x0b, 0x2a, 0x0a, 0x04, 0x2a, 0x2c, 0x80, 0x20,\n\t0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x81, 0x5d, 0x09, 0x00, 0x7f, 0x62, 0x79, 0x00, 0x6b, 0x65,\n\t0x20, 0x61, 0x64, 0x17, 0x83, 0x26, 0x80, 0x41, 0x02, 0x8d, 0x73, 0x01, 0x54, 0x73, 0x20, 0x6c,\n\t0x1b, 0x00, 0x88, 0x01, 0x12, 0x65, 0x00, 0x65, 0x00, 0x64, 0x20, 0x20, 0x30, 0x08, 0x2e, 0x20,\n\t0x41, 0x07, 0x15, 0x44, 0x65, 0x66, 0x69, 0x06, 0x6e, 0x83, 0x42, 0x82, 0x0e, 0x41, 0x73, 0x20,\n\t0x75, 0x73, 0x01, 0xc0, 0x0b, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x0c, 0x20, 0x22, 0x42,\n\t0x4c, 0x04, 0x1e, 0x22, 0x20, 0x72, 0x65, 0xae, 0x66, 0x40, 0x78, 0x41, 0x5c, 0xd2, 0x2b, 0x4c,\n\t0xc2, 0x42, 0x0a, 0xd3, 0x42, 0x16, 0x2c, 0x42, 0x3d, 0xc1, 0x40, 0x22, 0xc1, 0x97, 0x47, 0x50,\n\t0x4c, 0x27, 0xdd, 0x13, 0x14, 0x12, 0x02, 0x2a, 0x22, 0x54, 0x00, 0x53, 0x4c, 0x69, 0xa0, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0xc9, 0x11, 0x61, 0x80, 0x7b, 0x03, 0xc0, 0x26, 0x80, 0x30, 0x77, 0x6f,\n\t0x72, 0x6b, 0x20, 0x67, 0x7a, 0x6f, 0x00, 0x03, 0x6e, 0x40, 0x03, 0x42, 0x49, 0xc0, 0x75, 0xc5,\n\t0x50, 0x0a, 0x4a, 0x6f, 0x40, 0x22, 0x72, 0x40, 0x4e, 0x61, 0x6e, 0xc0, 0x25, 0x20, 0x12, 0x41,\n\t0x00, 0x54, 0x69, 0x63, 0x82, 0x9f, 0x20, 0x6f, 0x72, 0x44, 0x20, 0x61, 0xc0, 0xab, 0x6d, 0x62,\n\t0x69, 0x01, 0x0e, 0x57, 0xe1, 0x81, 0x11, 0x61, 0x73, 0x20, 0x64, 0x41, 0x4a, 0x01, 0x12, 0x46,\n\t0x52, 0x50, 0x41, 0x6e, 0x20, 0x22, 0xc8, 0x0d, 0x22, 0x81, 0x8d, 0x61, 0x08, 0x6e, 0x79, 0x20,\n\t0x02, 0x1e, 0x74, 0x68, 0x61, 0x74, 0xe0, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x02, 0x54, 0x01, 0x75,\n\t0x00, 0x1a, 0x04, 0x69, 0x6e, 0x80, 0x7f, 0x66, 0x61, 0x63, 0x65, 0x20, 0x00, 0x70, 0x72, 0x6f,\n\t0x76, 0x69, 0x64, 0x65, 0x64, 0x0e, 0x0a, 0x44, 0x6f, 0x44, 0x32, 0x83, 0xa2, 0x77, 0x68, 0x69,\n\t0x63, 0x26, 0x68, 0x05, 0xa1, 0xc2, 0x29, 0x77, 0x69, 0xc0, 0xab, 0x62, 0x61, 0x4f, 0x41, 0x66,\n\t0x40, 0xd7, 0xc1, 0x50, 0x04, 0x0c, 0x2e, 0x0a, 0x43, 0x70, 0x6e, 0x02, 0x67, 0xc0, 0x2c, 0x73,\n\t0x75, 0x62, 0x63, 0x6c, 0x61, 0xfe, 0x73, 0xc2, 0x93, 0xc0, 0x41, 0x82, 0x02, 0x86, 0x2d, 0x43,\n\t0x89, 0x84, 0x0d, 0x01, 0x17, 0x14, 0x64, 0x65, 0x40, 0x90, 0x64, 0x80, 0x0d, 0x6d, 0x6f, 0x64,\n\t0x64, 0x65, 0x0a, 0x40, 0xb4, 0x75, 0x73, 0x81, 0xbf, 0xd2, 0x14, 0x20, 0xc3, 0xcb, 0x14, 0x43,\n\t0x45, 0x20, 0x22, 0x43, 0x6f, 0x88, 0x24, 0xe3, 0x1f, 0xa3, 0xa3, 0x1f, 0xc0, 0x1b, 0x64, 0x75,\n\t0x63, 0xc3, 0x2e, 0x63, 0x82, 0x04, 0x43, 0x41, 0x0b, 0x00, 0x2b, 0x6c, 0x69, 0x6e, 0x6b, 0xa3,\n\t0x0c, 0x0a, 0xa1, 0x49, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x60, 0x31, 0x65, 0xe0, 0x66, 0x19, 0x22,\n\t0x3a, 0x2e, 0x20, 0xe0, 0x6d, 0xa0, 0x24, 0x61, 0x72, 0x74, 0xc0, 0x69, 0x63, 0x75, 0x6c, 0x61,\n\t0x72, 0xa1, 0x79, 0x29, 0x6f, 0x3d, 0xe4, 0x18, 0x0a, 0x02, 0x07, 0xe3, 0x25, 0xa1, 0x22, 0x0a,\n\t0x12, 0x20, 0x77, 0x21, 0xc0, 0x36, 0x6d, 0x61, 0x64, 0x65, 0xa1, 0x1d, 0x61, 0x6c, 0x9e, 0x73,\n\t0xc0, 0x84, 0x20, 0x7a, 0x80, 0x12, 0x21, 0x05, 0x22, 0x4c, 0x20, 0x11, 0x9b, 0xe0, 0x2f, 0x24,\n\t0x96, 0x22, 0x42, 0x1a, 0x61, 0x4a, 0x22, 0x4d, 0x00, 0x62, 0x02, 0x6d, 0xa0, 0x68, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x06, 0x70, 0xa1, 0x74, 0xa0, 0x2b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x10,\n\t0x65, 0x22, 0x20, 0x66, 0xb0, 0x43, 0x6d, 0x65, 0x61, 0x74, 0x6e, 0x73, 0xc1, 0x17, 0x0a, 0x71,\n\t0x06, 0x42, 0x06, 0x8e, 0x13, 0x2c, 0x80, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x83, 0x21,\n\t0xf8, 0x79, 0x20, 0x73, 0xe2, 0x0b, 0x80, 0x57, 0x60, 0x31, 0x61, 0x0c, 0x60, 0x86, 0xb7, 0x66,\n\t0x83, 0x8e, 0x07, 0x60, 0x0d, 0x61, 0xc0, 0x96, 0x20, 0x88, 0x73, 0x80, 0x48, 0x92, 0x72, 0x40,\n\t0x1a, 0x69, 0x6e, 0x80, 0x1c, 0x6f, 0x6c, 0x02, 0x58, 0xf1, 0x00, 0x6d, 0x72, 0x65, 0x0a, 0xaa,\n\t0x45, 0x68, 0x2d, 0xc3, 0x70, 0xc1, 0x9b, 0xf9, 0x26, 0x49, 0x6e, 0x6b, 0x20, 0x08, 0x04, 0x21,\n\t0xe7, 0x20, 0x6b, 0x19, 0xa9, 0x35, 0x06, 0x43, 0x00, 0x46, 0x3d, 0x21, 0x6f, 0x62, 0x6a, 0x65,\n\t0x63, 0xf6, 0x74, 0xe2, 0x19, 0xe1, 0x7e, 0x2f, 0xc0, 0x26, 0x48, 0x1c, 0x66, 0x22, 0x0a, 0x13,\n\t0x27, 0x80, 0xa5, 0x28, 0x22, 0x80, 0xc1, 0x61, 0x0a, 0x61, 0xba, 0x75, 0x74, 0x20, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x61, 0x66, 0x67, 0x72, 0x80, 0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x40,\n\t0x67, 0x39, 0x62, 0x08, 0x72, 0x65, 0x43, 0x4d, 0xc1, 0x28, 0xcf, 0x24, 0x66, 0x72, 0x7c, 0x6f,\n\t0x6d, 0xe2, 0x32, 0xca, 0x0c, 0xa1, 0xbd, 0x87, 0x2f, 0xa1, 0x06, 0x53, 0xe0, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x84, 0x4f, 0x60, 0xc5, 0x65, 0xb0, 0x03, 0xca, 0x49, 0x22, 0x23, 0x31, 0x2e, 0x20,\n\t0x45, 0x78, 0x63, 0xec, 0x65, 0x70, 0x61, 0x33, 0xc1, 0xa0, 0x53, 0x80, 0x1c, 0x02, 0xde, 0x45,\n\t0x06, 0xa3, 0x44, 0x9b, 0x82, 0x05, 0x59, 0x6f, 0x75, 0x40, 0x80, 0x79, 0x80, 0x20, 0xd0, 0x6e,\n\t0x76, 0x65, 0x79, 0x20, 0x6d, 0x63, 0xa1, 0x91, 0x60, 0x2d, 0x17, 0x22, 0x84, 0xc0, 0xdd, 0xe0,\n\t0xc6, 0x73, 0x03, 0x08, 0x73, 0x20, 0x33, 0x39, 0xc1, 0x24, 0x20, 0x34, 0xe3, 0x08, 0x07, 0x95,\n\t0x22, 0x5c, 0x6f, 0x75, 0xd0, 0x74, 0x20, 0x62, 0x65, 0x61, 0x1c, 0x62, 0xa1, 0xe4, 0xa1, 0x71,\n\t0x9f, 0xe4, 0x06, 0xc0, 0x06, 0x68, 0xd1, 0x60, 0xaa, 0x02, 0x0f, 0x32, 0x2e, 0xe0, 0x97, 0x03,\n\t0x61, 0x0e, 0x41, 0x06, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x85, 0x27, 0x3c, 0x73, 0x42, 0x04,\n\t0x49, 0x66, 0x20, 0x79, 0xc1, 0x13, 0x73, 0x81, 0x03, 0x43, 0x13, 0x70, 0x79, 0x65, 0x18, 0xc4,\n\t0x35, 0x92, 0x22, 0x2c, 0xe6, 0x20, 0xa0, 0x25, 0x90, 0x02, 0x72, 0x20, 0x60, 0x42, 0x70, 0x04,\n\t0x33, 0x52, 0x3a, 0x73, 0xb0, 0x01, 0x0a, 0x80, 0x4c, 0x83, 0x19, 0x57, 0x61, 0x61, 0x20, 0xf0,\n\t0x66, 0x75, 0x6e, 0x63, 0xc2, 0x11, 0x00, 0x1f, 0x11, 0x1c, 0x41, 0x12, 0x7c, 0x62, 0x65, 0x13,\n\t0x6b, 0x41, 0x08, 0x80, 0x44, 0x10, 0x46, 0xf8, 0x18, 0x0a, 0xd7, 0x92, 0x52, 0x40, 0x67, 0x12,\n\t0x34, 0x20, 0x46, 0x05, 0x28, 0x09, 0x5a, 0x11, 0x73, 0x90, 0x20, 0x61, 0x72, 0x67, 0xf2, 0x7a,\n\t0x20, 0x70, 0x30, 0x4e, 0x71, 0x51, 0x14, 0x68, 0x65, 0x6e, 0xd2, 0x1d, 0x36, 0x03, 0x60, 0x13,\n\t0x69, 0x48, 0x6e, 0x76, 0x6f, 0xe0, 0x2c, 0x29, 0x2c, 0x91, 0x01, 0x6e, 0xfd, 0x33, 0x0e, 0x61,\n\t0x2a, 0x18, 0x77, 0x0e, 0x13, 0x0d, 0x40, 0x40, 0x30, 0x62, 0xc1, 0x45, 0xc2, 0x3a, 0x71, 0x7e,\n\t0x20, 0x61, 0x29, 0x20, 0xa3, 0x19, 0xa9, 0x6f, 0x7e, 0x2c, 0x16, 0x5b, 0x70, 0x05, 0x90, 0x5d,\n\t0xb2, 0x13, 0xd0, 0x5d, 0x40, 0x1d, 0x67, 0x98, 0x6f, 0x6f, 0x64, 0x60, 0x0b, 0x11, 0x4c, 0x65,\n\t0x66, 0xa0, 0x3b, 0xee, 0x74, 0x20, 0x0f, 0xf1, 0x91, 0x30, 0x86, 0x75, 0x70, 0x8d, 0xe1, 0x0d,\n\t0x42, 0x14, 0x39, 0x81, 0x26, 0x65, 0x76, 0xf0, 0x86, 0x80, 0x1e, 0xfa, 0x66, 0x64, 0x6f, 0xff,\n\t0x40, 0x62, 0x01, 0x39, 0x62, 0x7d, 0x72, 0x5a, 0xf1, 0x03, 0x9d, 0x14, 0x12, 0x0d, 0xf7, 0x11,\n\t0xa2, 0x73, 0x50, 0x31, 0x6c, 0x20, 0x6f, 0xb0, 0x7e, 0x61, 0xb0, 0x85, 0x17, 0xb2, 0x1a, 0x31,\n\t0x91, 0x00, 0x08, 0x6d, 0xb0, 0x8e, 0x20, 0x20, 0x77, 0x4b, 0x00, 0x68, 0xe0, 0x06, 0x72, 0xd0,\n\t0x12, 0x72, 0x74, 0x91, 0x1d, 0x69, 0x1a, 0x74, 0x40, 0x93, 0x75, 0xc0, 0x88, 0xa0, 0x64, 0x72,\n\t0x65, 0x6d, 0x1c, 0x61, 0x69, 0x30, 0x4b, 0x91, 0x4b, 0x30, 0x22, 0x66, 0x75, 0x6c, 0x36, 0x2c,\n\t0x60, 0x6f, 0xe2, 0x0f, 0x62, 0xe7, 0x0f, 0x44, 0x88, 0x50, 0x4c, 0xf4, 0x2c, 0x20, 0x72, 0x56,\n\t0x6e, 0xa1, 0x97, 0xe4, 0x26, 0xef, 0x86, 0x60, 0x30, 0x27, 0x91, 0x67, 0xa1, 0x0b, 0x99, 0x13,\n\t0x20, 0x61, 0xa3, 0x75, 0x62, 0x6c, 0x1d, 0xc0, 0x8f, 0x6f, 0xd3, 0x13, 0xe1, 0x9a, 0x52, 0x28,\n\t0x33, 0x2e, 0x20, 0xee, 0x4f, 0x83, 0x42, 0x31, 0x45, 0x71, 0x9f, 0x6f, 0xd3, 0x92, 0x82, 0x2b,\n\t0x80, 0x0d, 0x1c, 0x72, 0x69, 0x90, 0x58, 0x62, 0x3c, 0x44, 0x29, 0x20, 0x48, 0x65, 0x81, 0x10,\n\t0x5d, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x93, 0x2c, 0xff, 0x41, 0x5b, 0xd9, 0x46, 0x11, 0x10,\n\t0xf1, 0x0e, 0x6b, 0x26, 0x82, 0x38, 0xd8, 0x98, 0xf0, 0x00, 0x43, 0xb0, 0x78, 0xd5, 0x05, 0x0a,\n\t0x61, 0x20, 0x68, 0x73, 0x05, 0x66, 0xf7, 0x70, 0x05, 0x43, 0x0a, 0xc0, 0x24, 0x70, 0xf0, 0x67,\n\t0xa1, 0x04, 0xa1, 0x1b, 0xf4, 0x07, 0x33, 0x90, 0x69, 0x6c, 0x3d, 0x73, 0x75, 0xc0, 0x7a, 0x03,\n\t0x08, 0x0a, 0x63, 0x1f, 0x90, 0x51, 0xd5, 0x23, 0x82, 0x9e, 0xd0, 0x12, 0xc2, 0x33, 0x63, 0x68,\n\t0x6f, 0x3f, 0x10, 0xa1, 0x5c, 0x24, 0x60, 0x21, 0x21, 0xa9, 0xf0, 0x69, 0x57, 0xa2, 0x64, 0x0a,\n\t0xce, 0x6d, 0x65, 0x0f, 0x00, 0x08, 0x51, 0x21, 0x6c, 0x69, 0x70, 0xae, 0xe0, 0x2e, 0x55, 0x60,\n\t0xae, 0x6e, 0xf0, 0x2f, 0x72, 0x60, 0x8a, 0x6c, 0x41, 0x1d, 0x61, 0x3c, 0x6d, 0x65, 0x10, 0x0c,\n\t0x90, 0x38, 0x62, 0x36, 0x60, 0xaf, 0x75, 0x63, 0xe2, 0x74, 0x00, 0x27, 0x0a, 0x6c, 0x61, 0x10,\n\t0x07, 0xb0, 0x1e, 0xa1, 0x53, 0xc8, 0x61, 0x63, 0x63, 0x20, 0x99, 0x6f, 0x72, 0x50, 0x02, 0x01,\n\t0x58, 0x45, 0x60, 0x6d, 0x6c, 0x80, 0x0f, 0x63, 0x72, 0x6f, 0x00, 0x01, 0x69, 0xba, 0x6e, 0xc0,\n\t0x78, 0x65, 0x06, 0x3b, 0x43, 0xa9, 0x60, 0x50, 0x70, 0x50, 0x64, 0x19, 0xc0, 0xaa, 0x28, 0x74,\n\t0xd0, 0x35, 0x40, 0x03, 0x66, 0x65, 0x77, 0x0b, 0x60, 0x4a, 0xa1, 0x02, 0x73, 0xa1, 0x40, 0x6c,\n\t0x65, 0x6e, 0x67, 0x9c, 0x74, 0x68, 0xe0, 0x35, 0x40, 0x06, 0x10, 0xb4, 0x20, 0x62, 0x60, 0x3a,\n\t0x39, 0x25, 0x12, 0x66, 0x6f, 0x01, 0xb3, 0xa0, 0x1b, 0x86, 0x34, 0x47, 0x69, 0x8a, 0x76, 0xb2,\n\t0x8e, 0x6d, 0xa0, 0x94, 0x6e, 0x74, 0x20, 0xe0, 0x0c, 0xf3, 0x50, 0x10, 0xc3, 0x24, 0x65, 0x61,\n\t0x60, 0x13, 0x72, 0xbb, 0x14, 0x25, 0x39, 0x1c, 0xff, 0x32, 0x41, 0x50, 0x17, 0xc1, 0x24, 0x85,\n\t0x1f, 0xe0, 0x10, 0xa2, 0xa9, 0xa1, 0x6e, 0xb0, 0xb9, 0x7f, 0xc0, 0xbe, 0x55, 0x02, 0x55, 0x83,\n\t0x12, 0x54, 0x61, 0x2e, 0x70, 0x02, 0xd0, 0x42, 0x65, 0xbf, 0xd1, 0x03, 0x25, 0x57, 0x02, 0x8c,\n\t0x20, 0x04, 0xf4, 0x9f, 0xd2, 0x27, 0x20, 0xb0, 0x2e, 0xf4, 0x41, 0x63, 0xf0, 0x89, 0x70, 0x61,\n\t0x9b, 0x41, 0x1e, 0x39, 0x08, 0x22, 0x2f, 0xff, 0xe1, 0xa4, 0x07, 0x43, 0xc4, 0x5d, 0x72, 0x06,\n\t0x32, 0x2e, 0xa4, 0xc4, 0x81, 0x06, 0xd5, 0xc4, 0xfd, 0x92, 0x05, 0x34, 0x01, 0x58, 0xb8, 0x91,\n\t0x93, 0x2a, 0xfe, 0x60, 0xeb, 0x8a, 0x54, 0x47, 0xc7, 0x7f, 0x23, 0x80, 0x33, 0xc0, 0x3c, 0x2c,\n\t0x0a, 0x74, 0x00, 0x47, 0x10, 0x4f, 0x28, 0x6f, 0x67, 0x65, 0xb0, 0x0a, 0x72, 0x10, 0x84, 0x66,\n\t0x66, 0xe1, 0xd1, 0x63, 0x76, 0x65, 0x6c, 0x79, 0xa1, 0x18, 0xc1, 0x22, 0x10, 0x8b, 0x6f, 0xf0,\n\t0xcf, 0x80, 0x77, 0xd9, 0x5a, 0xf4, 0x19, 0x0a, 0x3d, 0x85, 0x95, 0x15, 0x63, 0xf8, 0x6f, 0x6e,\n\t0x74, 0xe0, 0x40, 0x30, 0x26, 0xb0, 0x15, 0x61, 0x10, 0x7b, 0x09, 0xc5, 0x81, 0x24, 0x72, 0xa1,\n\t0x44, 0x73, 0x65, 0x0a, 0xd0, 0x1f, 0xa0, 0x1c, 0x1c, 0x65, 0x72, 0xf1, 0x39, 0x80, 0x36, 0x50,\n\t0xb1, 0x62, 0x75, 0x67, 0x7e, 0x67, 0xd1, 0x00, 0x62, 0x30, 0x59, 0x07, 0x21, 0x26, 0x43, 0x66,\n\t0xb2, 0x97, 0x64, 0xe4, 0x6f, 0x20, 0x22, 0x1f, 0x6f, 0x66, 0x10, 0x5f, 0x60, 0x27, 0xbf, 0x22,\n\t0xff, 0xbf, 0x22, 0x80, 0xb2, 0x52, 0x18, 0xbe, 0x22, 0x0b, 0x0a, 0x71, 0x20, 0x21, 0x18, 0xa1,\n\t0x0b, 0x7f, 0xdf, 0x22, 0x01, 0xdd, 0x21, 0x0c, 0xdf, 0x22, 0x20, 0x24, 0xdf, 0x22, 0x80, 0xcf,\n\t0x64, 0xfb, 0xe3, 0xae, 0xdf, 0x22, 0x20, 0xdb, 0x22, 0x5b, 0x08, 0xff, 0x22, 0xf2, 0xe1, 0x30,\n\t0x79, 0xc7, 0xff, 0x22, 0xb0, 0xf3, 0xfa, 0x22, 0x20, 0x63, 0x29, 0x00, 0xf0, 0x7f, 0xc7, 0x91,\n\t0x32, 0x0b, 0x64, 0x69, 0x73, 0x30, 0x39, 0x79, 0x73, 0x70, 0x84, 0x37, 0x35, 0xf4, 0x83, 0x34,\n\t0x40, 0xc9, 0x75, 0x91, 0x18, 0xb1, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x63, 0x80, 0x92, 0x6f, 0x30,\n\t0xdb, 0x63, 0x94, 0x41, 0x23, 0x65, 0x07, 0x2e, 0x03, 0x86, 0x97, 0x75, 0x12, 0x61, 0x6d, 0x6f,\n\t0x6e, 0x67, 0x03, 0xc4, 0x13, 0x80, 0x61, 0x6e, 0x73, 0xb7, 0x00, 0x6f, 0x74, 0x69, 0x63, 0x65,\n\t0x73, 0x2c, 0x20, 0x80, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x01, 0x70, 0x00, 0x61, 0x20,\n\t0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x00, 0x6e, 0x63, 0x65, 0x20, 0x64, 0x69, 0x72, 0x65, 0x00,\n\t0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x00, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20,\n\t0x74, 0x02, 0x6f, 0x01, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x80, 0x70, 0x69, 0x65, 0x73,\n\t0x20, 0x6f, 0x66, 0x02, 0x38, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x08, 0x61,\n\t0x6e, 0x64, 0x00, 0x1e, 0x69, 0x73, 0x20, 0x6c, 0x09, 0x00, 0xb2, 0x6e, 0x73, 0x00, 0x86, 0x6f,\n\t0x63, 0x75, 0x6d, 0x20, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x01, 0x68, 0x64, 0x29, 0x80, 0x20, 0x44,\n\t0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x05, 0x6e, 0x40, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x00, 0x62,\n\t0x3a, 0x03, 0x02, 0x1f, 0x00, 0x57, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x10, 0x6e, 0x76, 0x65,\n\t0x79, 0x02, 0x58, 0x4d, 0x69, 0x6e, 0x10, 0x69, 0x6d, 0x61, 0x6c, 0x00, 0x12, 0x72, 0x72, 0x65,\n\t0x20, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x01, 0x8f, 0x53, 0x6f, 0xc4, 0x75, 0x72, 0x00, 0xa0, 0x75,\n\t0x6e, 0x64, 0x01, 0x93, 0x00, 0x9c, 0x90, 0x74, 0x65, 0x72, 0x6d, 0x04, 0x8c, 0x69, 0x73, 0x01,\n\t0x69, 0x5d, 0x01, 0x49, 0x4c, 0x03, 0x83, 0x00, 0xdf, 0x02, 0x95, 0x65, 0x0c, 0x44, 0x41, 0x04,\n\t0x70, 0x70, 0x80, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x01, 0x80, 0x0c, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x05, 0x20, 0x73, 0x75, 0xc0, 0x69, 0x74,\n\t0x61, 0x62, 0x6c, 0x65, 0x01, 0x0a, 0x83, 0x22, 0x03, 0x84, 0x38, 0x82, 0x36, 0x74, 0x68, 0x61,\n\t0x74, 0x20, 0x70, 0xf1, 0x00, 0x05, 0x69, 0x74, 0x2c, 0x82, 0x55, 0x84, 0x90, 0x85, 0x1e, 0x00,\n\t0x9e, 0x50, 0x6f, 0x6d, 0x62, 0x69, 0x01, 0x76, 0x72, 0x80, 0xaa, 0x6c, 0x18, 0x69, 0x6e, 0x6b,\n\t0x02, 0x13, 0x89, 0x3b, 0x77, 0x69, 0x74, 0x02, 0x68, 0x00, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66,\n\t0x69, 0x80, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x81, 0x47, 0x6c, 0x6f, 0x66, 0x85, 0x22,\n\t0x01, 0xbd, 0x4c, 0x00, 0x1d, 0x00, 0x0e, 0x56, 0x83, 0x04, 0x0e, 0x00, 0xc2, 0x70, 0x72, 0x6f,\n\t0x64, 0x75, 0x80, 0x80, 0x14, 0x61, 0x20, 0x06, 0x1d, 0x43, 0x03, 0x36, 0x64, 0x20, 0x57, 0x70,\n\t0x6f, 0x72, 0x6b, 0x2c, 0x01, 0x66, 0x00, 0x1d, 0x85, 0x22, 0x6d, 0x08, 0x61, 0x6e, 0x6e, 0x00,\n\t0x95, 0x73, 0x70, 0x65, 0x63, 0x61, 0x03, 0x34, 0x62, 0x79, 0x20, 0x73, 0x01, 0xee, 0xc0, 0x3e,\n\t0x36, 0x3f, 0x0d, 0x71, 0x80, 0x40, 0x80, 0x77, 0x81, 0x60, 0xc0, 0x5a, 0x45, 0x10, 0x43, 0x6f,\n\t0x87, 0x0f, 0x60, 0x03, 0x75, 0x81, 0x5a, 0x31, 0x29, 0x20, 0x55, 0x40, 0x7b, 0x84, 0x61, 0x20,\n\t0x86, 0x4c, 0x73, 0x68, 0x61, 0x72, 0xc0, 0x2c, 0x00, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x00, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0xe6, 0x6d, 0xc1, 0x52, 0x40, 0x87,\n\t0x6e, 0x6b, 0xc1, 0x71, 0x82, 0x3f, 0x88, 0x29, 0xc2, 0x4c, 0x43, 0x0b, 0x2e, 0x20, 0x20, 0x41,\n\t0x47, 0x12, 0x87, 0x0e, 0x47, 0xc0, 0x95, 0xc1, 0x8e, 0x02, 0x5e, 0x28, 0x61, 0x29, 0x81, 0xa4,\n\t0x73, 0x02, 0x20, 0x00, 0x61, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0xd4, 0x6d, 0x65, 0xc5, 0x2a,\n\t0x61, 0x41, 0xa7, 0x79, 0x85, 0x35, 0x04, 0x15, 0x00, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64,\n\t0x79, 0x3c, 0x20, 0x70, 0x00, 0x92, 0x40, 0xa4, 0x80, 0xa1, 0x46, 0x6d, 0x27, 0x73, 0x31, 0x40,\n\t0x0c, 0x6d, 0x70, 0x75, 0x80, 0x91, 0xc5, 0x10, 0x73, 0x79, 0x10, 0x73, 0x74, 0x65, 0x6d, 0x43,\n\t0x7d, 0x28, 0x62, 0x29, 0x28, 0x20, 0x77, 0x69, 0x00, 0xc8, 0x6f, 0x80, 0x7b, 0x61, 0x74, 0xe6,\n\t0x65, 0x80, 0x10, 0x41, 0x02, 0x6c, 0x79, 0x40, 0x05, 0xd2, 0x6f, 0x05, 0x11, 0x4f, 0x44, 0xc7,\n\t0x45, 0x20, 0x02, 0x2e, 0x00, 0x31, 0x69, 0x6e, 0x00, 0x1a, 0x66, 0x00, 0x61, 0x63, 0x65, 0x2d,\n\t0x63, 0x6f, 0x6d, 0x70, 0xf7, 0x40, 0xa0, 0xc1, 0x98, 0xc5, 0x42, 0x20, 0x43, 0x7b, 0x85, 0x10,\n\t0x04, 0x7d, 0x83, 0x5a, 0x00, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x01, 0x00, 0xab,\n\t0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x19, 0x83, 0xaf, 0x49, 0x6e, 0x81, 0xad, 0xc2, 0x02,\n\t0x2c, 0x20, 0x62, 0x0c, 0x75, 0x74, 0xc0, 0x36, 0x00, 0x27, 0x69, 0x66, 0x20, 0x79, 0x00, 0x6f,\n\t0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x84, 0x20, 0x6f, 0x80, 0x59, 0x72, 0x77, 0x69, 0x73,\n\t0x02, 0x49, 0x80, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0xc0, 0xf7, 0x0d, 0xc0, 0x75, 0x6f,\n\t0xc1, 0x19, 0x62, 0x0a, 0x73, 0x75, 0x63, 0x68, 0xfb, 0x00, 0x47, 0x66, 0x09, 0x20, 0xc3, 0x5d,\n\t0x0d, 0x45, 0x41, 0x13, 0x04, 0x7e, 0xe3, 0x23, 0x0c, 0x6f, 0x6e, 0xa0, 0x0d, 0x43, 0x83, 0x20,\n\t0x65, 0x78, 0x74, 0x4f, 0x81, 0x2b, 0x42, 0x1d, 0xee, 0x09, 0x63, 0x73, 0x6e, 0x65, 0xa0, 0x8e,\n\t0x73, 0x1b, 0xa1, 0x42, 0x60, 0x06, 0x69, 0xe3, 0x18, 0x22, 0x87, 0x65, 0x78, 0x65, 0xfe, 0x63,\n\t0x60, 0x30, 0x13, 0x62, 0x81, 0x35, 0x21, 0x0f, 0xea, 0x5c, 0x41, 0x17, 0x01, 0x61, 0xe4, 0x64,\n\t0x20, 0x00, 0x5a, 0x72, 0x65, 0xc0, 0x29, 0x00, 0x6e, 0x21, 0x4b, 0x5e, 0x6f, 0x45, 0x6e, 0x81,\n\t0x01, 0x24, 0x4c, 0x1f, 0x6f, 0x6e, 0x67, 0x46, 0x6e, 0xc2, 0x6b, 0x27, 0x6e, 0x2e, 0x20, 0x28,\n\t0x49, 0x02, 0x72, 0xc1, 0x29, 0x11, 0xa0, 0x7c, 0x20, 0x6f, 0x70, 0xa2, 0x86, 0x34, 0x64, 0x30,\n\t0x03, 0x23, 0x7f, 0x95, 0x31, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x64, 0x61, 0x63, 0xc2, 0x3c,\n\t0x6e, 0x79, 0xc1, 0x17, 0x60, 0x11, 0x20, 0x1f, 0x9a, 0x9a, 0x41, 0xa8, 0x8b, 0x6d, 0xe8, 0x16,\n\t0x03, 0x20, 0x64, 0x65, 0x2e, 0xcc, 0x20, 0x49, 0x83, 0x3b, 0xaa, 0x11, 0x31, 0x2c, 0x02, 0x3e,\n\t0x82, 0x0e, 0x7f, 0x20, 0x84, 0x62, 0x3a, 0xe1, 0x0d, 0xc9, 0x13, 0x21, 0x08, 0xc8, 0x45, 0xe4,\n\t0x84, 0x20, 0xff, 0x1f, 0x84, 0xa0, 0xac, 0x84, 0x3e, 0x41, 0x08, 0x60, 0x44, 0x40, 0x66, 0x64,\n\t0x84, 0x0c, 0xab, 0xc9, 0xa3, 0xb3, 0x2e, 0x29, 0x41, 0xba, 0x35, 0x2e, 0x80, 0x03, 0xa2, 0xa0,\n\t0x5e, 0x64, 0x00, 0x5b, 0x61, 0x81, 0xa0, 0xc6, 0x82, 0x59, 0x59, 0x40, 0x53, 0x6d, 0x7a, 0x61,\n\t0xc0, 0x71, 0x6c, 0x00, 0x61, 0x20, 0x82, 0xe3, 0x84, 0xa0, 0x62, 0x69, 0x78, 0x6c, 0x69, 0x74,\n\t0x41, 0xcb, 0x42, 0x48, 0x80, 0x88, 0xc0, 0x41, 0x77, 0xe1, 0x40, 0x9a, 0x20, 0x62, 0x61, 0x73,\n\t0x40, 0x32, 0x00, 0x96, 0x40, 0x1a, 0x7a, 0x0a, 0x45, 0x6a, 0x73, 0x61, 0x61, 0x81, 0x99, 0xe1,\n\t0x00, 0x02, 0xb8, 0x73, 0x87, 0x20, 0x3e, 0x40, 0xb6, 0x05, 0x8f, 0x74, 0x6f, 0x67, 0x65, 0x00,\n\t0x06, 0x2e, 0x72, 0x43, 0x75, 0xa2, 0x60, 0x85, 0x0d, 0x0a, 0x91, 0x0d, 0x6e, 0x6f, 0x7c, 0x74,\n\t0x20, 0x08, 0x2e, 0xe0, 0x8b, 0x80, 0xc7, 0xa1, 0x10, 0x01, 0x03, 0x63, 0xce, 0x6f, 0x00, 0xb4,\n\t0x80, 0x10, 0x00, 0x0e, 0x74, 0x68, 0x80, 0x59, 0x2a, 0xcc, 0xfe, 0x63, 0xa3, 0xd6, 0x82, 0x5e,\n\t0x21, 0x90, 0xa4, 0x1e, 0x05, 0x11, 0x49, 0xc7, 0xe0, 0x82, 0xc1, 0x40, 0x49, 0x72, 0x0a, 0x63,\n\t0x68, 0x6f, 0x60, 0xd4, 0x80, 0xb5, 0xe1, 0x83, 0x39, 0x64, 0x6f, 0x20, 0x62, 0x20, 0x14, 0x85,\n\t0x50, 0x8c, 0xe3, 0xfd, 0x00, 0x9e, 0x41, 0x25, 0x49, 0x22, 0x97, 0xa3, 0x5d, 0xc0, 0x11, 0x45,\n\t0x0c, 0x42, 0x88, 0x21, 0x8b, 0x9f, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x80, 0x72, 0x6b, 0xcf, 0xc3,\n\t0x27, 0x41, 0x37, 0x23, 0x28, 0xa4, 0x31, 0x79, 0x2c, 0x40, 0x3e, 0x86, 0x04, 0xbd, 0x03, 0x04,\n\t0x6e, 0xa0, 0x53, 0x22, 0x13, 0x75, 0x05, 0x77, 0x12, 0x2c, 0x01, 0x04, 0x9f, 0x83, 0x0e, 0x70,\n\t0x07, 0x24, 0x0d, 0xfd, 0x77, 0xa0, 0x05, 0x63, 0x65, 0xc0, 0x7f, 0xa3, 0x33, 0x4b, 0xb0, 0x53,\n\t0x47, 0x69, 0x76, 0x32, 0x53, 0x6d, 0xc0, 0x70, 0xf8, 0x6e, 0x74, 0x20, 0x90, 0x14, 0x50, 0x0f,\n\t0x03, 0x19, 0x70, 0x06, 0xa1, 0x57, 0x8d, 0x61, 0x72, 0x64, 0x46, 0x20, 0x92, 0x1f, 0x70, 0x61,\n\t0x72, 0x70, 0x4c, 0xb0, 0x66, 0x20, 0x69, 0x74, 0x31, 0x07, 0x50, 0x53, 0x61, 0x78, 0x0c, 0x07,\n\t0xc5, 0x5b, 0x64, 0x20, 0x63, 0x48, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x33, 0xf0, 0x82, 0x00, 0x8b,\n\t0x77, 0x68, 0x30, 0x8c, 0xd1, 0x8a, 0x66, 0x69, 0x9f, 0xe0, 0x1b, 0x40, 0x06, 0x31, 0x04, 0x76,\n\t0x38, 0x31, 0x41, 0x75, 0x6e, 0x56, 0x0f, 0x0f, 0xf1, 0x4e, 0x35, 0x17, 0xf6, 0x12, 0xc2, 0x0b,\n\t0x36, 0x2e, 0x20, 0x52, 0x64, 0x65, 0x76, 0x40, 0x53, 0x64, 0x20, 0x74, 0x58, 0x1a, 0x8f, 0x4c,\n\t0x64, 0x65, 0x73, 0x41, 0x91, 0x47, 0x65, 0xb0, 0x75, 0x30, 0x8a, 0x50, 0x2c, 0x75, 0x62, 0x00,\n\t0x85, 0xda, 0x0f, 0x54, 0xb0, 0x11, 0x46, 0x72, 0x00, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74,\n\t0x77, 0x79, 0x61, 0x24, 0x46, 0x6f, 0x50, 0x13, 0x53, 0x5b, 0xd2, 0x2f, 0x31, 0x03, 0x73, 0x2e,\n\t0x68, 0xe0, 0x58, 0x63, 0x06, 0xd0, 0x3f, 0x2f, 0xb0, 0x4b, 0x6e, 0x65, 0xf2, 0x77, 0xb5, 0x80,\n\t0x73, 0x0a, 0x54, 0x64, 0xd1, 0x37, 0x1f, 0x07, 0x18, 0x07, 0xe0, 0x20, 0x66, 0x72, 0x6f, 0x6d,\n\t0x82, 0x70, 0x72, 0x9a, 0x00, 0x71, 0xd8, 0x2e, 0x20, 0x53, 0x21, 0x5d, 0xd0, 0x04, 0x0a, 0x94,\n\t0x85, 0x90, 0x9e, 0x03, 0x81, 0x6c, 0x00, 0x60, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x02, 0x72,\n\t0x01, 0x40, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0xbf, 0x42, 0x03, 0xf0, 0x0a, 0xf5, 0x71, 0x14,\n\t0x03, 0x03, 0x65, 0xb0, 0x0a, 0x0a, 0x30, 0x8a, 0x03, 0xa0, 0xa1, 0x01, 0x03, 0x64, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x91, 0x01, 0x03, 0x61, 0x64, 0x64, 0xe0, 0x74, 0x73, 0x20, 0x01, 0x0b, 0x17,\n\t0x20, 0x47, 0x80, 0x6c, 0x71, 0x98, 0x72, 0xb1, 0x41, 0x63, 0x65, 0x72, 0x64, 0x6e, 0x73, 0x62,\n\t0x14, 0x45, 0x61, 0x70, 0x65, 0xe4, 0x04, 0x20, 0x8d, 0x90, 0x1c, 0x67, 0xf0, 0x20, 0xb1, 0x96,\n\t0x64, 0x69, 0x73, 0xe1, 0xa5, 0x30, 0x75, 0x69, 0x73, 0x68, 0x21, 0x19, 0x15, 0x02, 0x6e, 0x75,\n\t0xf0, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4e, 0x91, 0x1b, 0xa5, 0x3e, 0x50, 0xaa, 0x53, 0x40, 0x33,\n\t0x90, 0x12, 0x63, 0x65, 0xf0, 0x03, 0x64, 0x80, 0x21, 0x20, 0x9d, 0xf5, 0x8c, 0x73, 0xf0, 0x30,\n\t0x70, 0x80, 0xa0, 0x2f, 0x65, 0x72, 0x90, 0x09, 0xbc, 0x6e, 0x20, 0x23, 0x04, 0x20, 0x2a, 0x34,\n\t0x05, 0x3f, 0x14, 0x20, 0x5f, 0x1b, 0xe9, 0x31, 0x2b, 0x20, 0x22, 0xd0, 0x17, 0x61, 0x10, 0x30,\n\t0x90, 0x75, 0x00, 0x93, 0xf1, 0xe4, 0x03, 0x22, 0x0a, 0x61, 0xc1, 0xa2, 0xf0, 0xae, 0x11, 0x6b,\n\t0xe0, 0x9e, 0xf9, 0x81, 0x08, 0x68, 0x61, 0x50, 0x2d, 0x00, 0x0a, 0xd5, 0x60, 0x60, 0x1a, 0x16,\n\t0x3b, 0xaf, 0xf2, 0x39, 0x40, 0x7e, 0xc0, 0x10, 0x10, 0x1d, 0x0a, 0x10, 0x33, 0x64, 0x40, 0x4d,\n\t0x40, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x20, 0x03, 0x72, 0xdb, 0xe3, 0x26, 0x20, 0x0b, 0x70,\n\t0xf3, 0x1f, 0x97, 0x0a, 0x20, 0xf0, 0x07, 0x90, 0x04, 0x4d, 0x2e, 0x08, 0x0a, 0x97, 0x02, 0xd2,\n\t0x47, 0x65, 0x20, 0x7f, 0x25, 0x64, 0xdf, 0x72, 0x25, 0x85, 0x13, 0x80, 0x28, 0x33, 0x55, 0x83,\n\t0x13, 0x0a, 0xe0, 0x71, 0x86, 0x13, 0xdc, 0x64, 0x6f, 0xb0, 0x0c, 0x11, 0x4d, 0x13, 0x14, 0x79,\n\t0x30, 0x56, 0xa4, 0x0e, 0xf7, 0xa4, 0x13, 0xf5, 0x30, 0x47, 0x27, 0x0a, 0x0f, 0x13, 0x01, 0x13,\n\t0x24, 0x67, 0x80, 0x5c, 0xfd, 0xc0, 0x4c, 0x6f, 0x31, 0xa0, 0xc0, 0x13, 0xb5, 0x04, 0x80, 0x0c,\n\t0x01, 0x12, 0x4f, 0x04, 0xd2, 0x20, 0xbb, 0x32, 0x20, 0x65, 0x10, 0x03, 0x20, 0x1f, 0x0e, 0x9f,\n\t0x33, 0xff, 0x13, 0x0e, 0x91, 0x65, 0x00, 0x70, 0xb1, 0x05, 0xdf, 0x21, 0xdf, 0x21, 0xd5, 0x21,\n\t0x00, 0x2a, 0x00, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x31, 0x70, 0xb0, 0x64, 0x65,\n\t0x0a, 0x60, 0x42, 0x30, 0x04, 0x72, 0x20, 0xc0, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x16, 0x37,\n\t0xcf, 0x0f, 0xcb, 0xdf, 0x22, 0x12, 0x4e, 0x20, 0x50, 0xae, 0x6c, 0x6c, 0xc2, 0x21, 0x80, 0x54,\n\t0x61, 0x63, 0x4b, 0x72, 0x6f, 0x78, 0x79, 0xf0, 0xa4, 0xc2, 0x0c, 0x63, 0x2e, 0x20, 0x40, 0x9a,\n\t0x60, 0xa4, 0xe2, 0xa6, 0x66, 0x81, 0x80, 0x65, 0x70, 0x7c, 0x74, 0x61, 0xb1, 0xd5, 0x24, 0x1e,\n\t0x85, 0x12, 0xb0, 0x64, 0x91, 0xc4, 0x61, 0x02, 0x6e, 0x91, 0x02, 0x61, 0x75, 0x74, 0x68, 0x6f,\n\t0x72, 0xfc, 0x69, 0x7a, 0xb2, 0x0e, 0xf2, 0xb2, 0xe1, 0x26, 0x90, 0x27, 0x14, 0x16, 0x72, 0x06,\n\t0xdf, 0x95, 0x03, 0x81, 0x78, 0x30, 0x0c, 0x05, 0x71, 0xf0, 0x36, 0x00, 0x0f, 0x00, 0x1f, 0x01,\n\t0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01,\n\t0x1f, 0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0x1f, 0x01, 0x1f, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1a, 0x01, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compressed_block_data_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_data_handle_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_compressed_block_data_handle_t *compressed_block_data_handle = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                               = NULL;\n\tint result                                                             = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                        = 5;\n\tint number_of_memset_fail_tests                                        = 1;\n\tint test_number                                                        = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compressed_block_data_handle_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_data_handle_free(\n\t          &compressed_block_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompressed_block_data_handle = (libfsntfs_compressed_block_data_handle_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tcompressed_block_data_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_data_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t\t          &compressed_block_data_handle,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t\t\t &compressed_block_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block_data_handle\",\n\t\t\t compressed_block_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_data_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t\t          &compressed_block_data_handle,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t\t\t &compressed_block_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block_data_handle\",\n\t\t\t compressed_block_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_block_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t &compressed_block_data_handle,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_block_data_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_data_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_block_data_handle_read_segment_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_data_handle_read_segment_data(\n     void )\n{\n\tuint8_t segment_data[ 16 ];\n\n\tuint8_t expected_segment_data1[ 12 ] = {\n\t\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53 };\n\tuint8_t expected_segment_data2[ 4 ] = {\n\t\t0x00, 0x00, 0x00, 0x00 };\n\n\tlibbfio_handle_t *file_io_handle                                       = NULL;\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_compressed_block_data_handle_t *compressed_block_data_handle = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                               = NULL;\n\tssize_t read_count                                                     = 0;\n\toff64_t offset                                                         = 0;\n\tint result                                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compressed_block_data_handle_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_compressed_block_data_handle_lznt1_compressed_data1,\n\t          24576,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          expected_segment_data1,\n\t          12 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer on last segment boundary\n\t */\n\toffset = libfsntfs_compressed_block_data_handle_seek_segment_offset(\n\t          compressed_block_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          65536 - 4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 65536 - 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              8,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          expected_segment_data2,\n\t          4 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Read buffer beyond last segment\n\t */\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_free(\n\t          &compressed_block_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Create a new compressed block data handle to prevent the compressed block cache\n\t * affecting the tests.\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              NULL,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompressed_block_data_handle->current_offset = -1;\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tcompressed_block_data_handle->current_offset = 0;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              NULL,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED )\n\t/* Test libfsntfs_compressed_block_data_handle_read_segment_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_compressed_block_data_handle_read_segment_data(\n\t              compressed_block_data_handle,\n\t              file_io_handle,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = libbfio_handle_free(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_free(\n\t          &compressed_block_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( compressed_block_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t &compressed_block_data_handle,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_block_data_handle_seek_segment_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_data_handle_seek_segment_offset(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_compressed_block_data_handle_t *compressed_block_data_handle = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                               = NULL;\n\toff64_t offset                                                         = 0;\n\tint result                                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compressed_block_data_handle_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_data_handle_initialize(\n\t          &compressed_block_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_compressed_block_data_handle_seek_segment_offset(\n\t          compressed_block_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_compressed_block_data_handle_seek_segment_offset(\n\t          NULL,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_compressed_block_data_handle_seek_segment_offset(\n\t          compressed_block_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_block_data_handle_free(\n\t          &compressed_block_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_data_handle\",\n\t compressed_block_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_block_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_block_data_handle_free(\n\t\t &compressed_block_data_handle,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_data_handle_initialize\",\n\t fsntfs_test_compressed_block_data_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_data_handle_free\",\n\t fsntfs_test_compressed_block_data_handle_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_data_handle_read_segment_data\",\n\t fsntfs_test_compressed_block_data_handle_read_segment_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_data_handle_seek_segment_offset\",\n\t fsntfs_test_compressed_block_data_handle_seek_segment_offset );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compressed_block_vector.c",
    "content": "/*\n * Library compressed_block_vector type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfcache.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compressed_block_vector.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_compressed_block_vector_data1[ 80 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x01, 0x01, 0x0e, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_compressed_block_vector_lznt1_compressed_data1[ 24576 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x65, 0xb8, 0x00, 0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x00, 0x20, 0x4c, 0x45, 0x53,\n\t0x53, 0x45, 0x52, 0x20, 0x00, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x80, 0x50, 0x55,\n\t0x42, 0x4c, 0x49, 0x43, 0x20, 0x00, 0x18, 0x60, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x00, 0x90, 0x11,\n\t0x08, 0x56, 0x00, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x00, 0x2c, 0x20, 0x32, 0x39,\n\t0x20, 0x4a, 0x75, 0x6e, 0x00, 0x65, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x00, 0x20, 0x43,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x40, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x02, 0x28, 0x20,\n\t0x00, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x00, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,\n\t0x46, 0x6f, 0x20, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x00, 0x7a, 0x2c, 0x20, 0x00, 0x49, 0x6e, 0x63,\n\t0x2e, 0x20, 0x3c, 0x68, 0x74, 0x00, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x66, 0x73, 0x66, 0x00, 0x2e,\n\t0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x40, 0x45, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x00, 0x54,\n\t0x69, 0x00, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x00, 0x74, 0x65, 0x64, 0x20, 0x74,\n\t0x6f, 0x20, 0x63, 0x01, 0x00, 0x5d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x00, 0x73, 0x74,\n\t0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2a, 0x20, 0x00, 0x2b, 0x62, 0x00, 0x4f, 0x6d, 0x01, 0x1c,\n\t0x69, 0x65, 0x00, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x01, 0x00, 0x39, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x08, 0x74,\n\t0x2c, 0x20, 0x00, 0x2f, 0x20, 0x63, 0x68, 0x61, 0x00, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x69,\n\t0x74, 0x02, 0x20, 0x00, 0x12, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x80, 0x6c, 0x6f, 0x77, 0x65,\n\t0x64, 0x2e, 0x0a, 0x80, 0x5f, 0xbc, 0x20, 0x54, 0x01, 0x1d, 0x80, 0x29, 0x82, 0x6f, 0x02, 0x25,\n\t0x65, 0x83, 0x93, 0x00, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x00, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x12, 0x62, 0x80, 0x2f, 0x20, 0x4c, 0x84, 0x31, 0x69, 0x6e, 0x63,\n\t0x80, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x80, 0x40, 0xa0, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x00, 0x5b, 0x73, 0x02, 0x55, 0xa0, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x81, 0x77, 0x73, 0x81, 0x4c,\n\t0x5d, 0x85, 0x2c, 0x33, 0x03, 0x53, 0x83, 0x2d, 0x0b, 0x2a, 0x0a, 0x04, 0x2a, 0x2c, 0x80, 0x20,\n\t0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x81, 0x5d, 0x09, 0x00, 0x7f, 0x62, 0x79, 0x00, 0x6b, 0x65,\n\t0x20, 0x61, 0x64, 0x17, 0x83, 0x26, 0x80, 0x41, 0x02, 0x8d, 0x73, 0x01, 0x54, 0x73, 0x20, 0x6c,\n\t0x1b, 0x00, 0x88, 0x01, 0x12, 0x65, 0x00, 0x65, 0x00, 0x64, 0x20, 0x20, 0x30, 0x08, 0x2e, 0x20,\n\t0x41, 0x07, 0x15, 0x44, 0x65, 0x66, 0x69, 0x06, 0x6e, 0x83, 0x42, 0x82, 0x0e, 0x41, 0x73, 0x20,\n\t0x75, 0x73, 0x01, 0xc0, 0x0b, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x0c, 0x20, 0x22, 0x42,\n\t0x4c, 0x04, 0x1e, 0x22, 0x20, 0x72, 0x65, 0xae, 0x66, 0x40, 0x78, 0x41, 0x5c, 0xd2, 0x2b, 0x4c,\n\t0xc2, 0x42, 0x0a, 0xd3, 0x42, 0x16, 0x2c, 0x42, 0x3d, 0xc1, 0x40, 0x22, 0xc1, 0x97, 0x47, 0x50,\n\t0x4c, 0x27, 0xdd, 0x13, 0x14, 0x12, 0x02, 0x2a, 0x22, 0x54, 0x00, 0x53, 0x4c, 0x69, 0xa0, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0xc9, 0x11, 0x61, 0x80, 0x7b, 0x03, 0xc0, 0x26, 0x80, 0x30, 0x77, 0x6f,\n\t0x72, 0x6b, 0x20, 0x67, 0x7a, 0x6f, 0x00, 0x03, 0x6e, 0x40, 0x03, 0x42, 0x49, 0xc0, 0x75, 0xc5,\n\t0x50, 0x0a, 0x4a, 0x6f, 0x40, 0x22, 0x72, 0x40, 0x4e, 0x61, 0x6e, 0xc0, 0x25, 0x20, 0x12, 0x41,\n\t0x00, 0x54, 0x69, 0x63, 0x82, 0x9f, 0x20, 0x6f, 0x72, 0x44, 0x20, 0x61, 0xc0, 0xab, 0x6d, 0x62,\n\t0x69, 0x01, 0x0e, 0x57, 0xe1, 0x81, 0x11, 0x61, 0x73, 0x20, 0x64, 0x41, 0x4a, 0x01, 0x12, 0x46,\n\t0x52, 0x50, 0x41, 0x6e, 0x20, 0x22, 0xc8, 0x0d, 0x22, 0x81, 0x8d, 0x61, 0x08, 0x6e, 0x79, 0x20,\n\t0x02, 0x1e, 0x74, 0x68, 0x61, 0x74, 0xe0, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x02, 0x54, 0x01, 0x75,\n\t0x00, 0x1a, 0x04, 0x69, 0x6e, 0x80, 0x7f, 0x66, 0x61, 0x63, 0x65, 0x20, 0x00, 0x70, 0x72, 0x6f,\n\t0x76, 0x69, 0x64, 0x65, 0x64, 0x0e, 0x0a, 0x44, 0x6f, 0x44, 0x32, 0x83, 0xa2, 0x77, 0x68, 0x69,\n\t0x63, 0x26, 0x68, 0x05, 0xa1, 0xc2, 0x29, 0x77, 0x69, 0xc0, 0xab, 0x62, 0x61, 0x4f, 0x41, 0x66,\n\t0x40, 0xd7, 0xc1, 0x50, 0x04, 0x0c, 0x2e, 0x0a, 0x43, 0x70, 0x6e, 0x02, 0x67, 0xc0, 0x2c, 0x73,\n\t0x75, 0x62, 0x63, 0x6c, 0x61, 0xfe, 0x73, 0xc2, 0x93, 0xc0, 0x41, 0x82, 0x02, 0x86, 0x2d, 0x43,\n\t0x89, 0x84, 0x0d, 0x01, 0x17, 0x14, 0x64, 0x65, 0x40, 0x90, 0x64, 0x80, 0x0d, 0x6d, 0x6f, 0x64,\n\t0x64, 0x65, 0x0a, 0x40, 0xb4, 0x75, 0x73, 0x81, 0xbf, 0xd2, 0x14, 0x20, 0xc3, 0xcb, 0x14, 0x43,\n\t0x45, 0x20, 0x22, 0x43, 0x6f, 0x88, 0x24, 0xe3, 0x1f, 0xa3, 0xa3, 0x1f, 0xc0, 0x1b, 0x64, 0x75,\n\t0x63, 0xc3, 0x2e, 0x63, 0x82, 0x04, 0x43, 0x41, 0x0b, 0x00, 0x2b, 0x6c, 0x69, 0x6e, 0x6b, 0xa3,\n\t0x0c, 0x0a, 0xa1, 0x49, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x60, 0x31, 0x65, 0xe0, 0x66, 0x19, 0x22,\n\t0x3a, 0x2e, 0x20, 0xe0, 0x6d, 0xa0, 0x24, 0x61, 0x72, 0x74, 0xc0, 0x69, 0x63, 0x75, 0x6c, 0x61,\n\t0x72, 0xa1, 0x79, 0x29, 0x6f, 0x3d, 0xe4, 0x18, 0x0a, 0x02, 0x07, 0xe3, 0x25, 0xa1, 0x22, 0x0a,\n\t0x12, 0x20, 0x77, 0x21, 0xc0, 0x36, 0x6d, 0x61, 0x64, 0x65, 0xa1, 0x1d, 0x61, 0x6c, 0x9e, 0x73,\n\t0xc0, 0x84, 0x20, 0x7a, 0x80, 0x12, 0x21, 0x05, 0x22, 0x4c, 0x20, 0x11, 0x9b, 0xe0, 0x2f, 0x24,\n\t0x96, 0x22, 0x42, 0x1a, 0x61, 0x4a, 0x22, 0x4d, 0x00, 0x62, 0x02, 0x6d, 0xa0, 0x68, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x06, 0x70, 0xa1, 0x74, 0xa0, 0x2b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x10,\n\t0x65, 0x22, 0x20, 0x66, 0xb0, 0x43, 0x6d, 0x65, 0x61, 0x74, 0x6e, 0x73, 0xc1, 0x17, 0x0a, 0x71,\n\t0x06, 0x42, 0x06, 0x8e, 0x13, 0x2c, 0x80, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x83, 0x21,\n\t0xf8, 0x79, 0x20, 0x73, 0xe2, 0x0b, 0x80, 0x57, 0x60, 0x31, 0x61, 0x0c, 0x60, 0x86, 0xb7, 0x66,\n\t0x83, 0x8e, 0x07, 0x60, 0x0d, 0x61, 0xc0, 0x96, 0x20, 0x88, 0x73, 0x80, 0x48, 0x92, 0x72, 0x40,\n\t0x1a, 0x69, 0x6e, 0x80, 0x1c, 0x6f, 0x6c, 0x02, 0x58, 0xf1, 0x00, 0x6d, 0x72, 0x65, 0x0a, 0xaa,\n\t0x45, 0x68, 0x2d, 0xc3, 0x70, 0xc1, 0x9b, 0xf9, 0x26, 0x49, 0x6e, 0x6b, 0x20, 0x08, 0x04, 0x21,\n\t0xe7, 0x20, 0x6b, 0x19, 0xa9, 0x35, 0x06, 0x43, 0x00, 0x46, 0x3d, 0x21, 0x6f, 0x62, 0x6a, 0x65,\n\t0x63, 0xf6, 0x74, 0xe2, 0x19, 0xe1, 0x7e, 0x2f, 0xc0, 0x26, 0x48, 0x1c, 0x66, 0x22, 0x0a, 0x13,\n\t0x27, 0x80, 0xa5, 0x28, 0x22, 0x80, 0xc1, 0x61, 0x0a, 0x61, 0xba, 0x75, 0x74, 0x20, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x61, 0x66, 0x67, 0x72, 0x80, 0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x40,\n\t0x67, 0x39, 0x62, 0x08, 0x72, 0x65, 0x43, 0x4d, 0xc1, 0x28, 0xcf, 0x24, 0x66, 0x72, 0x7c, 0x6f,\n\t0x6d, 0xe2, 0x32, 0xca, 0x0c, 0xa1, 0xbd, 0x87, 0x2f, 0xa1, 0x06, 0x53, 0xe0, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x84, 0x4f, 0x60, 0xc5, 0x65, 0xb0, 0x03, 0xca, 0x49, 0x22, 0x23, 0x31, 0x2e, 0x20,\n\t0x45, 0x78, 0x63, 0xec, 0x65, 0x70, 0x61, 0x33, 0xc1, 0xa0, 0x53, 0x80, 0x1c, 0x02, 0xde, 0x45,\n\t0x06, 0xa3, 0x44, 0x9b, 0x82, 0x05, 0x59, 0x6f, 0x75, 0x40, 0x80, 0x79, 0x80, 0x20, 0xd0, 0x6e,\n\t0x76, 0x65, 0x79, 0x20, 0x6d, 0x63, 0xa1, 0x91, 0x60, 0x2d, 0x17, 0x22, 0x84, 0xc0, 0xdd, 0xe0,\n\t0xc6, 0x73, 0x03, 0x08, 0x73, 0x20, 0x33, 0x39, 0xc1, 0x24, 0x20, 0x34, 0xe3, 0x08, 0x07, 0x95,\n\t0x22, 0x5c, 0x6f, 0x75, 0xd0, 0x74, 0x20, 0x62, 0x65, 0x61, 0x1c, 0x62, 0xa1, 0xe4, 0xa1, 0x71,\n\t0x9f, 0xe4, 0x06, 0xc0, 0x06, 0x68, 0xd1, 0x60, 0xaa, 0x02, 0x0f, 0x32, 0x2e, 0xe0, 0x97, 0x03,\n\t0x61, 0x0e, 0x41, 0x06, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x85, 0x27, 0x3c, 0x73, 0x42, 0x04,\n\t0x49, 0x66, 0x20, 0x79, 0xc1, 0x13, 0x73, 0x81, 0x03, 0x43, 0x13, 0x70, 0x79, 0x65, 0x18, 0xc4,\n\t0x35, 0x92, 0x22, 0x2c, 0xe6, 0x20, 0xa0, 0x25, 0x90, 0x02, 0x72, 0x20, 0x60, 0x42, 0x70, 0x04,\n\t0x33, 0x52, 0x3a, 0x73, 0xb0, 0x01, 0x0a, 0x80, 0x4c, 0x83, 0x19, 0x57, 0x61, 0x61, 0x20, 0xf0,\n\t0x66, 0x75, 0x6e, 0x63, 0xc2, 0x11, 0x00, 0x1f, 0x11, 0x1c, 0x41, 0x12, 0x7c, 0x62, 0x65, 0x13,\n\t0x6b, 0x41, 0x08, 0x80, 0x44, 0x10, 0x46, 0xf8, 0x18, 0x0a, 0xd7, 0x92, 0x52, 0x40, 0x67, 0x12,\n\t0x34, 0x20, 0x46, 0x05, 0x28, 0x09, 0x5a, 0x11, 0x73, 0x90, 0x20, 0x61, 0x72, 0x67, 0xf2, 0x7a,\n\t0x20, 0x70, 0x30, 0x4e, 0x71, 0x51, 0x14, 0x68, 0x65, 0x6e, 0xd2, 0x1d, 0x36, 0x03, 0x60, 0x13,\n\t0x69, 0x48, 0x6e, 0x76, 0x6f, 0xe0, 0x2c, 0x29, 0x2c, 0x91, 0x01, 0x6e, 0xfd, 0x33, 0x0e, 0x61,\n\t0x2a, 0x18, 0x77, 0x0e, 0x13, 0x0d, 0x40, 0x40, 0x30, 0x62, 0xc1, 0x45, 0xc2, 0x3a, 0x71, 0x7e,\n\t0x20, 0x61, 0x29, 0x20, 0xa3, 0x19, 0xa9, 0x6f, 0x7e, 0x2c, 0x16, 0x5b, 0x70, 0x05, 0x90, 0x5d,\n\t0xb2, 0x13, 0xd0, 0x5d, 0x40, 0x1d, 0x67, 0x98, 0x6f, 0x6f, 0x64, 0x60, 0x0b, 0x11, 0x4c, 0x65,\n\t0x66, 0xa0, 0x3b, 0xee, 0x74, 0x20, 0x0f, 0xf1, 0x91, 0x30, 0x86, 0x75, 0x70, 0x8d, 0xe1, 0x0d,\n\t0x42, 0x14, 0x39, 0x81, 0x26, 0x65, 0x76, 0xf0, 0x86, 0x80, 0x1e, 0xfa, 0x66, 0x64, 0x6f, 0xff,\n\t0x40, 0x62, 0x01, 0x39, 0x62, 0x7d, 0x72, 0x5a, 0xf1, 0x03, 0x9d, 0x14, 0x12, 0x0d, 0xf7, 0x11,\n\t0xa2, 0x73, 0x50, 0x31, 0x6c, 0x20, 0x6f, 0xb0, 0x7e, 0x61, 0xb0, 0x85, 0x17, 0xb2, 0x1a, 0x31,\n\t0x91, 0x00, 0x08, 0x6d, 0xb0, 0x8e, 0x20, 0x20, 0x77, 0x4b, 0x00, 0x68, 0xe0, 0x06, 0x72, 0xd0,\n\t0x12, 0x72, 0x74, 0x91, 0x1d, 0x69, 0x1a, 0x74, 0x40, 0x93, 0x75, 0xc0, 0x88, 0xa0, 0x64, 0x72,\n\t0x65, 0x6d, 0x1c, 0x61, 0x69, 0x30, 0x4b, 0x91, 0x4b, 0x30, 0x22, 0x66, 0x75, 0x6c, 0x36, 0x2c,\n\t0x60, 0x6f, 0xe2, 0x0f, 0x62, 0xe7, 0x0f, 0x44, 0x88, 0x50, 0x4c, 0xf4, 0x2c, 0x20, 0x72, 0x56,\n\t0x6e, 0xa1, 0x97, 0xe4, 0x26, 0xef, 0x86, 0x60, 0x30, 0x27, 0x91, 0x67, 0xa1, 0x0b, 0x99, 0x13,\n\t0x20, 0x61, 0xa3, 0x75, 0x62, 0x6c, 0x1d, 0xc0, 0x8f, 0x6f, 0xd3, 0x13, 0xe1, 0x9a, 0x52, 0x28,\n\t0x33, 0x2e, 0x20, 0xee, 0x4f, 0x83, 0x42, 0x31, 0x45, 0x71, 0x9f, 0x6f, 0xd3, 0x92, 0x82, 0x2b,\n\t0x80, 0x0d, 0x1c, 0x72, 0x69, 0x90, 0x58, 0x62, 0x3c, 0x44, 0x29, 0x20, 0x48, 0x65, 0x81, 0x10,\n\t0x5d, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x93, 0x2c, 0xff, 0x41, 0x5b, 0xd9, 0x46, 0x11, 0x10,\n\t0xf1, 0x0e, 0x6b, 0x26, 0x82, 0x38, 0xd8, 0x98, 0xf0, 0x00, 0x43, 0xb0, 0x78, 0xd5, 0x05, 0x0a,\n\t0x61, 0x20, 0x68, 0x73, 0x05, 0x66, 0xf7, 0x70, 0x05, 0x43, 0x0a, 0xc0, 0x24, 0x70, 0xf0, 0x67,\n\t0xa1, 0x04, 0xa1, 0x1b, 0xf4, 0x07, 0x33, 0x90, 0x69, 0x6c, 0x3d, 0x73, 0x75, 0xc0, 0x7a, 0x03,\n\t0x08, 0x0a, 0x63, 0x1f, 0x90, 0x51, 0xd5, 0x23, 0x82, 0x9e, 0xd0, 0x12, 0xc2, 0x33, 0x63, 0x68,\n\t0x6f, 0x3f, 0x10, 0xa1, 0x5c, 0x24, 0x60, 0x21, 0x21, 0xa9, 0xf0, 0x69, 0x57, 0xa2, 0x64, 0x0a,\n\t0xce, 0x6d, 0x65, 0x0f, 0x00, 0x08, 0x51, 0x21, 0x6c, 0x69, 0x70, 0xae, 0xe0, 0x2e, 0x55, 0x60,\n\t0xae, 0x6e, 0xf0, 0x2f, 0x72, 0x60, 0x8a, 0x6c, 0x41, 0x1d, 0x61, 0x3c, 0x6d, 0x65, 0x10, 0x0c,\n\t0x90, 0x38, 0x62, 0x36, 0x60, 0xaf, 0x75, 0x63, 0xe2, 0x74, 0x00, 0x27, 0x0a, 0x6c, 0x61, 0x10,\n\t0x07, 0xb0, 0x1e, 0xa1, 0x53, 0xc8, 0x61, 0x63, 0x63, 0x20, 0x99, 0x6f, 0x72, 0x50, 0x02, 0x01,\n\t0x58, 0x45, 0x60, 0x6d, 0x6c, 0x80, 0x0f, 0x63, 0x72, 0x6f, 0x00, 0x01, 0x69, 0xba, 0x6e, 0xc0,\n\t0x78, 0x65, 0x06, 0x3b, 0x43, 0xa9, 0x60, 0x50, 0x70, 0x50, 0x64, 0x19, 0xc0, 0xaa, 0x28, 0x74,\n\t0xd0, 0x35, 0x40, 0x03, 0x66, 0x65, 0x77, 0x0b, 0x60, 0x4a, 0xa1, 0x02, 0x73, 0xa1, 0x40, 0x6c,\n\t0x65, 0x6e, 0x67, 0x9c, 0x74, 0x68, 0xe0, 0x35, 0x40, 0x06, 0x10, 0xb4, 0x20, 0x62, 0x60, 0x3a,\n\t0x39, 0x25, 0x12, 0x66, 0x6f, 0x01, 0xb3, 0xa0, 0x1b, 0x86, 0x34, 0x47, 0x69, 0x8a, 0x76, 0xb2,\n\t0x8e, 0x6d, 0xa0, 0x94, 0x6e, 0x74, 0x20, 0xe0, 0x0c, 0xf3, 0x50, 0x10, 0xc3, 0x24, 0x65, 0x61,\n\t0x60, 0x13, 0x72, 0xbb, 0x14, 0x25, 0x39, 0x1c, 0xff, 0x32, 0x41, 0x50, 0x17, 0xc1, 0x24, 0x85,\n\t0x1f, 0xe0, 0x10, 0xa2, 0xa9, 0xa1, 0x6e, 0xb0, 0xb9, 0x7f, 0xc0, 0xbe, 0x55, 0x02, 0x55, 0x83,\n\t0x12, 0x54, 0x61, 0x2e, 0x70, 0x02, 0xd0, 0x42, 0x65, 0xbf, 0xd1, 0x03, 0x25, 0x57, 0x02, 0x8c,\n\t0x20, 0x04, 0xf4, 0x9f, 0xd2, 0x27, 0x20, 0xb0, 0x2e, 0xf4, 0x41, 0x63, 0xf0, 0x89, 0x70, 0x61,\n\t0x9b, 0x41, 0x1e, 0x39, 0x08, 0x22, 0x2f, 0xff, 0xe1, 0xa4, 0x07, 0x43, 0xc4, 0x5d, 0x72, 0x06,\n\t0x32, 0x2e, 0xa4, 0xc4, 0x81, 0x06, 0xd5, 0xc4, 0xfd, 0x92, 0x05, 0x34, 0x01, 0x58, 0xb8, 0x91,\n\t0x93, 0x2a, 0xfe, 0x60, 0xeb, 0x8a, 0x54, 0x47, 0xc7, 0x7f, 0x23, 0x80, 0x33, 0xc0, 0x3c, 0x2c,\n\t0x0a, 0x74, 0x00, 0x47, 0x10, 0x4f, 0x28, 0x6f, 0x67, 0x65, 0xb0, 0x0a, 0x72, 0x10, 0x84, 0x66,\n\t0x66, 0xe1, 0xd1, 0x63, 0x76, 0x65, 0x6c, 0x79, 0xa1, 0x18, 0xc1, 0x22, 0x10, 0x8b, 0x6f, 0xf0,\n\t0xcf, 0x80, 0x77, 0xd9, 0x5a, 0xf4, 0x19, 0x0a, 0x3d, 0x85, 0x95, 0x15, 0x63, 0xf8, 0x6f, 0x6e,\n\t0x74, 0xe0, 0x40, 0x30, 0x26, 0xb0, 0x15, 0x61, 0x10, 0x7b, 0x09, 0xc5, 0x81, 0x24, 0x72, 0xa1,\n\t0x44, 0x73, 0x65, 0x0a, 0xd0, 0x1f, 0xa0, 0x1c, 0x1c, 0x65, 0x72, 0xf1, 0x39, 0x80, 0x36, 0x50,\n\t0xb1, 0x62, 0x75, 0x67, 0x7e, 0x67, 0xd1, 0x00, 0x62, 0x30, 0x59, 0x07, 0x21, 0x26, 0x43, 0x66,\n\t0xb2, 0x97, 0x64, 0xe4, 0x6f, 0x20, 0x22, 0x1f, 0x6f, 0x66, 0x10, 0x5f, 0x60, 0x27, 0xbf, 0x22,\n\t0xff, 0xbf, 0x22, 0x80, 0xb2, 0x52, 0x18, 0xbe, 0x22, 0x0b, 0x0a, 0x71, 0x20, 0x21, 0x18, 0xa1,\n\t0x0b, 0x7f, 0xdf, 0x22, 0x01, 0xdd, 0x21, 0x0c, 0xdf, 0x22, 0x20, 0x24, 0xdf, 0x22, 0x80, 0xcf,\n\t0x64, 0xfb, 0xe3, 0xae, 0xdf, 0x22, 0x20, 0xdb, 0x22, 0x5b, 0x08, 0xff, 0x22, 0xf2, 0xe1, 0x30,\n\t0x79, 0xc7, 0xff, 0x22, 0xb0, 0xf3, 0xfa, 0x22, 0x20, 0x63, 0x29, 0x00, 0xf0, 0x7f, 0xc7, 0x91,\n\t0x32, 0x0b, 0x64, 0x69, 0x73, 0x30, 0x39, 0x79, 0x73, 0x70, 0x84, 0x37, 0x35, 0xf4, 0x83, 0x34,\n\t0x40, 0xc9, 0x75, 0x91, 0x18, 0xb1, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x63, 0x80, 0x92, 0x6f, 0x30,\n\t0xdb, 0x63, 0x94, 0x41, 0x23, 0x65, 0x07, 0x2e, 0x03, 0x86, 0x97, 0x75, 0x12, 0x61, 0x6d, 0x6f,\n\t0x6e, 0x67, 0x03, 0xc4, 0x13, 0x80, 0x61, 0x6e, 0x73, 0xb7, 0x00, 0x6f, 0x74, 0x69, 0x63, 0x65,\n\t0x73, 0x2c, 0x20, 0x80, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x01, 0x70, 0x00, 0x61, 0x20,\n\t0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x00, 0x6e, 0x63, 0x65, 0x20, 0x64, 0x69, 0x72, 0x65, 0x00,\n\t0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x00, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20,\n\t0x74, 0x02, 0x6f, 0x01, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x80, 0x70, 0x69, 0x65, 0x73,\n\t0x20, 0x6f, 0x66, 0x02, 0x38, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x08, 0x61,\n\t0x6e, 0x64, 0x00, 0x1e, 0x69, 0x73, 0x20, 0x6c, 0x09, 0x00, 0xb2, 0x6e, 0x73, 0x00, 0x86, 0x6f,\n\t0x63, 0x75, 0x6d, 0x20, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x01, 0x68, 0x64, 0x29, 0x80, 0x20, 0x44,\n\t0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x05, 0x6e, 0x40, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x00, 0x62,\n\t0x3a, 0x03, 0x02, 0x1f, 0x00, 0x57, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x10, 0x6e, 0x76, 0x65,\n\t0x79, 0x02, 0x58, 0x4d, 0x69, 0x6e, 0x10, 0x69, 0x6d, 0x61, 0x6c, 0x00, 0x12, 0x72, 0x72, 0x65,\n\t0x20, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x01, 0x8f, 0x53, 0x6f, 0xc4, 0x75, 0x72, 0x00, 0xa0, 0x75,\n\t0x6e, 0x64, 0x01, 0x93, 0x00, 0x9c, 0x90, 0x74, 0x65, 0x72, 0x6d, 0x04, 0x8c, 0x69, 0x73, 0x01,\n\t0x69, 0x5d, 0x01, 0x49, 0x4c, 0x03, 0x83, 0x00, 0xdf, 0x02, 0x95, 0x65, 0x0c, 0x44, 0x41, 0x04,\n\t0x70, 0x70, 0x80, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x01, 0x80, 0x0c, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x05, 0x20, 0x73, 0x75, 0xc0, 0x69, 0x74,\n\t0x61, 0x62, 0x6c, 0x65, 0x01, 0x0a, 0x83, 0x22, 0x03, 0x84, 0x38, 0x82, 0x36, 0x74, 0x68, 0x61,\n\t0x74, 0x20, 0x70, 0xf1, 0x00, 0x05, 0x69, 0x74, 0x2c, 0x82, 0x55, 0x84, 0x90, 0x85, 0x1e, 0x00,\n\t0x9e, 0x50, 0x6f, 0x6d, 0x62, 0x69, 0x01, 0x76, 0x72, 0x80, 0xaa, 0x6c, 0x18, 0x69, 0x6e, 0x6b,\n\t0x02, 0x13, 0x89, 0x3b, 0x77, 0x69, 0x74, 0x02, 0x68, 0x00, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66,\n\t0x69, 0x80, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x81, 0x47, 0x6c, 0x6f, 0x66, 0x85, 0x22,\n\t0x01, 0xbd, 0x4c, 0x00, 0x1d, 0x00, 0x0e, 0x56, 0x83, 0x04, 0x0e, 0x00, 0xc2, 0x70, 0x72, 0x6f,\n\t0x64, 0x75, 0x80, 0x80, 0x14, 0x61, 0x20, 0x06, 0x1d, 0x43, 0x03, 0x36, 0x64, 0x20, 0x57, 0x70,\n\t0x6f, 0x72, 0x6b, 0x2c, 0x01, 0x66, 0x00, 0x1d, 0x85, 0x22, 0x6d, 0x08, 0x61, 0x6e, 0x6e, 0x00,\n\t0x95, 0x73, 0x70, 0x65, 0x63, 0x61, 0x03, 0x34, 0x62, 0x79, 0x20, 0x73, 0x01, 0xee, 0xc0, 0x3e,\n\t0x36, 0x3f, 0x0d, 0x71, 0x80, 0x40, 0x80, 0x77, 0x81, 0x60, 0xc0, 0x5a, 0x45, 0x10, 0x43, 0x6f,\n\t0x87, 0x0f, 0x60, 0x03, 0x75, 0x81, 0x5a, 0x31, 0x29, 0x20, 0x55, 0x40, 0x7b, 0x84, 0x61, 0x20,\n\t0x86, 0x4c, 0x73, 0x68, 0x61, 0x72, 0xc0, 0x2c, 0x00, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x00, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0xe6, 0x6d, 0xc1, 0x52, 0x40, 0x87,\n\t0x6e, 0x6b, 0xc1, 0x71, 0x82, 0x3f, 0x88, 0x29, 0xc2, 0x4c, 0x43, 0x0b, 0x2e, 0x20, 0x20, 0x41,\n\t0x47, 0x12, 0x87, 0x0e, 0x47, 0xc0, 0x95, 0xc1, 0x8e, 0x02, 0x5e, 0x28, 0x61, 0x29, 0x81, 0xa4,\n\t0x73, 0x02, 0x20, 0x00, 0x61, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0xd4, 0x6d, 0x65, 0xc5, 0x2a,\n\t0x61, 0x41, 0xa7, 0x79, 0x85, 0x35, 0x04, 0x15, 0x00, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64,\n\t0x79, 0x3c, 0x20, 0x70, 0x00, 0x92, 0x40, 0xa4, 0x80, 0xa1, 0x46, 0x6d, 0x27, 0x73, 0x31, 0x40,\n\t0x0c, 0x6d, 0x70, 0x75, 0x80, 0x91, 0xc5, 0x10, 0x73, 0x79, 0x10, 0x73, 0x74, 0x65, 0x6d, 0x43,\n\t0x7d, 0x28, 0x62, 0x29, 0x28, 0x20, 0x77, 0x69, 0x00, 0xc8, 0x6f, 0x80, 0x7b, 0x61, 0x74, 0xe6,\n\t0x65, 0x80, 0x10, 0x41, 0x02, 0x6c, 0x79, 0x40, 0x05, 0xd2, 0x6f, 0x05, 0x11, 0x4f, 0x44, 0xc7,\n\t0x45, 0x20, 0x02, 0x2e, 0x00, 0x31, 0x69, 0x6e, 0x00, 0x1a, 0x66, 0x00, 0x61, 0x63, 0x65, 0x2d,\n\t0x63, 0x6f, 0x6d, 0x70, 0xf7, 0x40, 0xa0, 0xc1, 0x98, 0xc5, 0x42, 0x20, 0x43, 0x7b, 0x85, 0x10,\n\t0x04, 0x7d, 0x83, 0x5a, 0x00, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x01, 0x00, 0xab,\n\t0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x19, 0x83, 0xaf, 0x49, 0x6e, 0x81, 0xad, 0xc2, 0x02,\n\t0x2c, 0x20, 0x62, 0x0c, 0x75, 0x74, 0xc0, 0x36, 0x00, 0x27, 0x69, 0x66, 0x20, 0x79, 0x00, 0x6f,\n\t0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x84, 0x20, 0x6f, 0x80, 0x59, 0x72, 0x77, 0x69, 0x73,\n\t0x02, 0x49, 0x80, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0xc0, 0xf7, 0x0d, 0xc0, 0x75, 0x6f,\n\t0xc1, 0x19, 0x62, 0x0a, 0x73, 0x75, 0x63, 0x68, 0xfb, 0x00, 0x47, 0x66, 0x09, 0x20, 0xc3, 0x5d,\n\t0x0d, 0x45, 0x41, 0x13, 0x04, 0x7e, 0xe3, 0x23, 0x0c, 0x6f, 0x6e, 0xa0, 0x0d, 0x43, 0x83, 0x20,\n\t0x65, 0x78, 0x74, 0x4f, 0x81, 0x2b, 0x42, 0x1d, 0xee, 0x09, 0x63, 0x73, 0x6e, 0x65, 0xa0, 0x8e,\n\t0x73, 0x1b, 0xa1, 0x42, 0x60, 0x06, 0x69, 0xe3, 0x18, 0x22, 0x87, 0x65, 0x78, 0x65, 0xfe, 0x63,\n\t0x60, 0x30, 0x13, 0x62, 0x81, 0x35, 0x21, 0x0f, 0xea, 0x5c, 0x41, 0x17, 0x01, 0x61, 0xe4, 0x64,\n\t0x20, 0x00, 0x5a, 0x72, 0x65, 0xc0, 0x29, 0x00, 0x6e, 0x21, 0x4b, 0x5e, 0x6f, 0x45, 0x6e, 0x81,\n\t0x01, 0x24, 0x4c, 0x1f, 0x6f, 0x6e, 0x67, 0x46, 0x6e, 0xc2, 0x6b, 0x27, 0x6e, 0x2e, 0x20, 0x28,\n\t0x49, 0x02, 0x72, 0xc1, 0x29, 0x11, 0xa0, 0x7c, 0x20, 0x6f, 0x70, 0xa2, 0x86, 0x34, 0x64, 0x30,\n\t0x03, 0x23, 0x7f, 0x95, 0x31, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x64, 0x61, 0x63, 0xc2, 0x3c,\n\t0x6e, 0x79, 0xc1, 0x17, 0x60, 0x11, 0x20, 0x1f, 0x9a, 0x9a, 0x41, 0xa8, 0x8b, 0x6d, 0xe8, 0x16,\n\t0x03, 0x20, 0x64, 0x65, 0x2e, 0xcc, 0x20, 0x49, 0x83, 0x3b, 0xaa, 0x11, 0x31, 0x2c, 0x02, 0x3e,\n\t0x82, 0x0e, 0x7f, 0x20, 0x84, 0x62, 0x3a, 0xe1, 0x0d, 0xc9, 0x13, 0x21, 0x08, 0xc8, 0x45, 0xe4,\n\t0x84, 0x20, 0xff, 0x1f, 0x84, 0xa0, 0xac, 0x84, 0x3e, 0x41, 0x08, 0x60, 0x44, 0x40, 0x66, 0x64,\n\t0x84, 0x0c, 0xab, 0xc9, 0xa3, 0xb3, 0x2e, 0x29, 0x41, 0xba, 0x35, 0x2e, 0x80, 0x03, 0xa2, 0xa0,\n\t0x5e, 0x64, 0x00, 0x5b, 0x61, 0x81, 0xa0, 0xc6, 0x82, 0x59, 0x59, 0x40, 0x53, 0x6d, 0x7a, 0x61,\n\t0xc0, 0x71, 0x6c, 0x00, 0x61, 0x20, 0x82, 0xe3, 0x84, 0xa0, 0x62, 0x69, 0x78, 0x6c, 0x69, 0x74,\n\t0x41, 0xcb, 0x42, 0x48, 0x80, 0x88, 0xc0, 0x41, 0x77, 0xe1, 0x40, 0x9a, 0x20, 0x62, 0x61, 0x73,\n\t0x40, 0x32, 0x00, 0x96, 0x40, 0x1a, 0x7a, 0x0a, 0x45, 0x6a, 0x73, 0x61, 0x61, 0x81, 0x99, 0xe1,\n\t0x00, 0x02, 0xb8, 0x73, 0x87, 0x20, 0x3e, 0x40, 0xb6, 0x05, 0x8f, 0x74, 0x6f, 0x67, 0x65, 0x00,\n\t0x06, 0x2e, 0x72, 0x43, 0x75, 0xa2, 0x60, 0x85, 0x0d, 0x0a, 0x91, 0x0d, 0x6e, 0x6f, 0x7c, 0x74,\n\t0x20, 0x08, 0x2e, 0xe0, 0x8b, 0x80, 0xc7, 0xa1, 0x10, 0x01, 0x03, 0x63, 0xce, 0x6f, 0x00, 0xb4,\n\t0x80, 0x10, 0x00, 0x0e, 0x74, 0x68, 0x80, 0x59, 0x2a, 0xcc, 0xfe, 0x63, 0xa3, 0xd6, 0x82, 0x5e,\n\t0x21, 0x90, 0xa4, 0x1e, 0x05, 0x11, 0x49, 0xc7, 0xe0, 0x82, 0xc1, 0x40, 0x49, 0x72, 0x0a, 0x63,\n\t0x68, 0x6f, 0x60, 0xd4, 0x80, 0xb5, 0xe1, 0x83, 0x39, 0x64, 0x6f, 0x20, 0x62, 0x20, 0x14, 0x85,\n\t0x50, 0x8c, 0xe3, 0xfd, 0x00, 0x9e, 0x41, 0x25, 0x49, 0x22, 0x97, 0xa3, 0x5d, 0xc0, 0x11, 0x45,\n\t0x0c, 0x42, 0x88, 0x21, 0x8b, 0x9f, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x80, 0x72, 0x6b, 0xcf, 0xc3,\n\t0x27, 0x41, 0x37, 0x23, 0x28, 0xa4, 0x31, 0x79, 0x2c, 0x40, 0x3e, 0x86, 0x04, 0xbd, 0x03, 0x04,\n\t0x6e, 0xa0, 0x53, 0x22, 0x13, 0x75, 0x05, 0x77, 0x12, 0x2c, 0x01, 0x04, 0x9f, 0x83, 0x0e, 0x70,\n\t0x07, 0x24, 0x0d, 0xfd, 0x77, 0xa0, 0x05, 0x63, 0x65, 0xc0, 0x7f, 0xa3, 0x33, 0x4b, 0xb0, 0x53,\n\t0x47, 0x69, 0x76, 0x32, 0x53, 0x6d, 0xc0, 0x70, 0xf8, 0x6e, 0x74, 0x20, 0x90, 0x14, 0x50, 0x0f,\n\t0x03, 0x19, 0x70, 0x06, 0xa1, 0x57, 0x8d, 0x61, 0x72, 0x64, 0x46, 0x20, 0x92, 0x1f, 0x70, 0x61,\n\t0x72, 0x70, 0x4c, 0xb0, 0x66, 0x20, 0x69, 0x74, 0x31, 0x07, 0x50, 0x53, 0x61, 0x78, 0x0c, 0x07,\n\t0xc5, 0x5b, 0x64, 0x20, 0x63, 0x48, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x33, 0xf0, 0x82, 0x00, 0x8b,\n\t0x77, 0x68, 0x30, 0x8c, 0xd1, 0x8a, 0x66, 0x69, 0x9f, 0xe0, 0x1b, 0x40, 0x06, 0x31, 0x04, 0x76,\n\t0x38, 0x31, 0x41, 0x75, 0x6e, 0x56, 0x0f, 0x0f, 0xf1, 0x4e, 0x35, 0x17, 0xf6, 0x12, 0xc2, 0x0b,\n\t0x36, 0x2e, 0x20, 0x52, 0x64, 0x65, 0x76, 0x40, 0x53, 0x64, 0x20, 0x74, 0x58, 0x1a, 0x8f, 0x4c,\n\t0x64, 0x65, 0x73, 0x41, 0x91, 0x47, 0x65, 0xb0, 0x75, 0x30, 0x8a, 0x50, 0x2c, 0x75, 0x62, 0x00,\n\t0x85, 0xda, 0x0f, 0x54, 0xb0, 0x11, 0x46, 0x72, 0x00, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74,\n\t0x77, 0x79, 0x61, 0x24, 0x46, 0x6f, 0x50, 0x13, 0x53, 0x5b, 0xd2, 0x2f, 0x31, 0x03, 0x73, 0x2e,\n\t0x68, 0xe0, 0x58, 0x63, 0x06, 0xd0, 0x3f, 0x2f, 0xb0, 0x4b, 0x6e, 0x65, 0xf2, 0x77, 0xb5, 0x80,\n\t0x73, 0x0a, 0x54, 0x64, 0xd1, 0x37, 0x1f, 0x07, 0x18, 0x07, 0xe0, 0x20, 0x66, 0x72, 0x6f, 0x6d,\n\t0x82, 0x70, 0x72, 0x9a, 0x00, 0x71, 0xd8, 0x2e, 0x20, 0x53, 0x21, 0x5d, 0xd0, 0x04, 0x0a, 0x94,\n\t0x85, 0x90, 0x9e, 0x03, 0x81, 0x6c, 0x00, 0x60, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x02, 0x72,\n\t0x01, 0x40, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0xbf, 0x42, 0x03, 0xf0, 0x0a, 0xf5, 0x71, 0x14,\n\t0x03, 0x03, 0x65, 0xb0, 0x0a, 0x0a, 0x30, 0x8a, 0x03, 0xa0, 0xa1, 0x01, 0x03, 0x64, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x91, 0x01, 0x03, 0x61, 0x64, 0x64, 0xe0, 0x74, 0x73, 0x20, 0x01, 0x0b, 0x17,\n\t0x20, 0x47, 0x80, 0x6c, 0x71, 0x98, 0x72, 0xb1, 0x41, 0x63, 0x65, 0x72, 0x64, 0x6e, 0x73, 0x62,\n\t0x14, 0x45, 0x61, 0x70, 0x65, 0xe4, 0x04, 0x20, 0x8d, 0x90, 0x1c, 0x67, 0xf0, 0x20, 0xb1, 0x96,\n\t0x64, 0x69, 0x73, 0xe1, 0xa5, 0x30, 0x75, 0x69, 0x73, 0x68, 0x21, 0x19, 0x15, 0x02, 0x6e, 0x75,\n\t0xf0, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4e, 0x91, 0x1b, 0xa5, 0x3e, 0x50, 0xaa, 0x53, 0x40, 0x33,\n\t0x90, 0x12, 0x63, 0x65, 0xf0, 0x03, 0x64, 0x80, 0x21, 0x20, 0x9d, 0xf5, 0x8c, 0x73, 0xf0, 0x30,\n\t0x70, 0x80, 0xa0, 0x2f, 0x65, 0x72, 0x90, 0x09, 0xbc, 0x6e, 0x20, 0x23, 0x04, 0x20, 0x2a, 0x34,\n\t0x05, 0x3f, 0x14, 0x20, 0x5f, 0x1b, 0xe9, 0x31, 0x2b, 0x20, 0x22, 0xd0, 0x17, 0x61, 0x10, 0x30,\n\t0x90, 0x75, 0x00, 0x93, 0xf1, 0xe4, 0x03, 0x22, 0x0a, 0x61, 0xc1, 0xa2, 0xf0, 0xae, 0x11, 0x6b,\n\t0xe0, 0x9e, 0xf9, 0x81, 0x08, 0x68, 0x61, 0x50, 0x2d, 0x00, 0x0a, 0xd5, 0x60, 0x60, 0x1a, 0x16,\n\t0x3b, 0xaf, 0xf2, 0x39, 0x40, 0x7e, 0xc0, 0x10, 0x10, 0x1d, 0x0a, 0x10, 0x33, 0x64, 0x40, 0x4d,\n\t0x40, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x20, 0x03, 0x72, 0xdb, 0xe3, 0x26, 0x20, 0x0b, 0x70,\n\t0xf3, 0x1f, 0x97, 0x0a, 0x20, 0xf0, 0x07, 0x90, 0x04, 0x4d, 0x2e, 0x08, 0x0a, 0x97, 0x02, 0xd2,\n\t0x47, 0x65, 0x20, 0x7f, 0x25, 0x64, 0xdf, 0x72, 0x25, 0x85, 0x13, 0x80, 0x28, 0x33, 0x55, 0x83,\n\t0x13, 0x0a, 0xe0, 0x71, 0x86, 0x13, 0xdc, 0x64, 0x6f, 0xb0, 0x0c, 0x11, 0x4d, 0x13, 0x14, 0x79,\n\t0x30, 0x56, 0xa4, 0x0e, 0xf7, 0xa4, 0x13, 0xf5, 0x30, 0x47, 0x27, 0x0a, 0x0f, 0x13, 0x01, 0x13,\n\t0x24, 0x67, 0x80, 0x5c, 0xfd, 0xc0, 0x4c, 0x6f, 0x31, 0xa0, 0xc0, 0x13, 0xb5, 0x04, 0x80, 0x0c,\n\t0x01, 0x12, 0x4f, 0x04, 0xd2, 0x20, 0xbb, 0x32, 0x20, 0x65, 0x10, 0x03, 0x20, 0x1f, 0x0e, 0x9f,\n\t0x33, 0xff, 0x13, 0x0e, 0x91, 0x65, 0x00, 0x70, 0xb1, 0x05, 0xdf, 0x21, 0xdf, 0x21, 0xd5, 0x21,\n\t0x00, 0x2a, 0x00, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x31, 0x70, 0xb0, 0x64, 0x65,\n\t0x0a, 0x60, 0x42, 0x30, 0x04, 0x72, 0x20, 0xc0, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x16, 0x37,\n\t0xcf, 0x0f, 0xcb, 0xdf, 0x22, 0x12, 0x4e, 0x20, 0x50, 0xae, 0x6c, 0x6c, 0xc2, 0x21, 0x80, 0x54,\n\t0x61, 0x63, 0x4b, 0x72, 0x6f, 0x78, 0x79, 0xf0, 0xa4, 0xc2, 0x0c, 0x63, 0x2e, 0x20, 0x40, 0x9a,\n\t0x60, 0xa4, 0xe2, 0xa6, 0x66, 0x81, 0x80, 0x65, 0x70, 0x7c, 0x74, 0x61, 0xb1, 0xd5, 0x24, 0x1e,\n\t0x85, 0x12, 0xb0, 0x64, 0x91, 0xc4, 0x61, 0x02, 0x6e, 0x91, 0x02, 0x61, 0x75, 0x74, 0x68, 0x6f,\n\t0x72, 0xfc, 0x69, 0x7a, 0xb2, 0x0e, 0xf2, 0xb2, 0xe1, 0x26, 0x90, 0x27, 0x14, 0x16, 0x72, 0x06,\n\t0xdf, 0x95, 0x03, 0x81, 0x78, 0x30, 0x0c, 0x05, 0x71, 0xf0, 0x36, 0x00, 0x0f, 0x00, 0x1f, 0x01,\n\t0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01,\n\t0x1f, 0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0x1f, 0x01, 0x1f, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1a, 0x01, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compressed_block_vector_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_vector_initialize(\n     void )\n{\n\tlibcerror_error_t *error                   = NULL;\n\tlibfdata_vector_t *compressed_block_vector = NULL;\n\tlibfsntfs_io_handle_t *io_handle           = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute   = NULL;\n\tint result                                 = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests            = 1;\n\tint number_of_memset_fail_tests            = 1;\n\tint test_number                            = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compressed_block_vector_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          &compressed_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_vector\",\n\t compressed_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &compressed_block_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_vector\",\n\t compressed_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompressed_block_vector = (libfdata_vector_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          &compressed_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tcompressed_block_vector = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          &compressed_block_vector,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          &compressed_block_vector,\n\t          io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_vector_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_vector_initialize(\n\t\t          &compressed_block_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &compressed_block_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block_vector\",\n\t\t\t compressed_block_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_block_vector_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_block_vector_initialize(\n\t\t          &compressed_block_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compressed_block_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &compressed_block_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_block_vector\",\n\t\t\t compressed_block_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &compressed_block_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_block_vector_read_element_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_block_vector_read_element_data(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle           = NULL;\n\tlibcerror_error_t *error                   = NULL;\n\tlibfcache_cache_t *cache                   = NULL;\n\tlibfdata_vector_t *compressed_block_vector = NULL;\n\tlibfsntfs_io_handle_t *io_handle           = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute   = NULL;\n\tint result                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compressed_block_vector_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_vector_initialize(\n\t          &compressed_block_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_block_vector\",\n\t compressed_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfcache_cache_initialize(\n\t          &cache,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_compressed_block_vector_lznt1_compressed_data1,\n\t          24576,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n/* TODO pass data handle\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          0,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          (size64_t) SSIZE_MAX + 1,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          NULL,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO implement read from file IO handle failing */\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_compressed_block_vector_read_element_data with malloc failing in libfsntfs_compressed_block_initialize\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_compressed_block_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          compressed_block_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          LIBFDATA_RANGE_FLAG_IS_COMPRESSED,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfcache_cache_free(\n\t          &cache,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &compressed_block_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_block_vector\",\n\t compressed_block_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &cache,\n\t\t NULL );\n\t}\n\tif( compressed_block_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &compressed_block_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_vector_initialize\",\n\t fsntfs_test_compressed_block_vector_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_block_vector_read_element_data\",\n\t fsntfs_test_compressed_block_vector_read_element_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compressed_data_handle.c",
    "content": "/*\n * Library compressed_data_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_cluster_block_stream.h\"\n#include \"../libfsntfs/libfsntfs_compressed_data_handle.h\"\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n\n/* Define to make fsntfs_test_file generate verbose output\n#define FSNTFS_TEST_COMPRESSED_DATA_HANDLE_VERBOSE\n */\n#define FSNTFS_TEST_COMPRESSED_DATA_HANDLE_VERBOSE\n\nuint8_t fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1[ 3414 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x08, 0x00, 0xb0, 0x89, 0x00, 0xb7, 0x98, 0xa9, 0x9a, 0xba, 0xba, 0xb0, 0x0a, 0x0b, 0x0b,\n\t0x80, 0x8b, 0x8a, 0x89, 0x9b, 0x0b, 0x97, 0xba, 0x09, 0x8a, 0xa9, 0xaa, 0xa0, 0x00, 0x00, 0x00,\n\t0x50, 0x57, 0x46, 0x76, 0x56, 0x8a, 0x66, 0x55, 0xb6, 0x55, 0x65, 0x77, 0x69, 0x0b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x98, 0x0a, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0xb9, 0xa9, 0xaa, 0x0b, 0x00, 0x00, 0xbb,\n\t0x77, 0x89, 0x88, 0xa9, 0x9a, 0xbb, 0x0b, 0x90, 0x76, 0x87, 0xa9, 0xaa, 0xaa, 0x9a, 0xa0, 0x9a,\n\t0x76, 0x77, 0x98, 0x9a, 0xa9, 0xb9, 0xbb, 0x9a, 0x75, 0x78, 0xa8, 0xa9, 0xa9, 0xba, 0xab, 0x80,\n\t0x66, 0x77, 0x98, 0x09, 0x0a, 0xba, 0x00, 0xa0, 0x76, 0x78, 0x98, 0xa9, 0x0a, 0xa0, 0xab, 0xa0,\n\t0x80, 0x9a, 0xba, 0xbb, 0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x3b, 0xef, 0x00, 0xc0, 0xf0, 0xce, 0x50, 0xfc, 0x9b, 0xa3, 0x9f, 0x9f, 0xe2, 0x9b, 0x76, 0x06,\n\t0x87, 0x6f, 0xe2, 0x9b, 0xd1, 0x65, 0x2f, 0x0e, 0xf8, 0x8b, 0xf0, 0xe8, 0x03, 0xf3, 0x99, 0xf5,\n\t0x1e, 0xbe, 0x6b, 0x7e, 0x8b, 0x55, 0xbe, 0xfa, 0xa5, 0x30, 0x02, 0x41, 0x46, 0x83, 0xc3, 0x3b,\n\t0x40, 0xc0, 0xef, 0x96, 0x1f, 0x88, 0x13, 0xdc, 0x77, 0x07, 0x0e, 0x69, 0xdf, 0xcc, 0xa0, 0x11,\n\t0x44, 0xd4, 0x24, 0x58, 0xdd, 0xb3, 0x6f, 0x7c, 0x32, 0x0e, 0xd5, 0x44, 0x12, 0x3d, 0x43, 0x2e,\n\t0x0e, 0x12, 0xa9, 0xc2, 0x21, 0x27, 0x44, 0x8b, 0x6c, 0xea, 0xad, 0xc3, 0x01, 0x72, 0x39, 0xf0,\n\t0x83, 0xb5, 0xba, 0xe0, 0xc1, 0xf7, 0xef, 0x29, 0xee, 0xa4, 0xcc, 0x9e, 0x26, 0xf1, 0xff, 0x19,\n\t0x34, 0x05, 0xb5, 0x22, 0x31, 0xa6, 0xba, 0x40, 0x50, 0x7c, 0x29, 0x58, 0xcb, 0x0b, 0xb6, 0x16,\n\t0x40, 0xc0, 0xbb, 0xb6, 0x43, 0x99, 0x0d, 0x49, 0x4b, 0x42, 0xa9, 0x0a, 0xb1, 0xa5, 0xcc, 0x07,\n\t0x5d, 0x1a, 0xf9, 0x53, 0x61, 0x87, 0x40, 0x6e, 0x01, 0xd3, 0xd6, 0x28, 0xc6, 0x42, 0x9d, 0xa0,\n\t0x0d, 0xbe, 0xb0, 0x5d, 0x27, 0xad, 0x00, 0x2b, 0x00, 0x3d, 0xa4, 0x1e, 0x33, 0x19, 0x98, 0x58,\n\t0x61, 0x42, 0xa7, 0x8f, 0xc0, 0x8a, 0x3c, 0xde, 0xa2, 0x51, 0x53, 0x0e, 0xc0, 0x96, 0x36, 0xa8,\n\t0xeb, 0x47, 0xa3, 0x96, 0x83, 0xdd, 0x58, 0x15, 0x28, 0x52, 0x28, 0xc2, 0x19, 0x49, 0x71, 0x0e,\n\t0x1e, 0x34, 0x2c, 0x31, 0x9e, 0x89, 0x42, 0xcb, 0x8b, 0xc7, 0x90, 0x13, 0x2a, 0x12, 0x02, 0xc6,\n\t0x45, 0x6e, 0x09, 0x2e, 0x88, 0xea, 0x36, 0xac, 0xb4, 0x3b, 0xa8, 0x5d, 0x66, 0x94, 0x73, 0xcf,\n\t0x15, 0x3a, 0xa8, 0x5e, 0xe7, 0xd2, 0x5d, 0xb8, 0x4d, 0xe1, 0x4c, 0xfa, 0x38, 0xb5, 0x2a, 0xad,\n\t0xa8, 0x54, 0x00, 0x40, 0x30, 0xd9, 0xf0, 0x1f, 0x79, 0x51, 0xfa, 0x5c, 0x47, 0x8d, 0x40, 0x9d,\n\t0xe9, 0x4b, 0x18, 0x6a, 0x83, 0xa5, 0xb2, 0xf4, 0x40, 0x3a, 0x82, 0x18, 0x45, 0xc7, 0xe5, 0x03,\n\t0x24, 0x94, 0x81, 0x7e, 0x19, 0xfc, 0x82, 0x70, 0x21, 0x32, 0xc7, 0x86, 0xec, 0x7b, 0xf3, 0x41,\n\t0x2d, 0xab, 0x0a, 0xd1, 0x41, 0x98, 0x48, 0x03, 0xf4, 0xe1, 0x22, 0xa7, 0x96, 0x00, 0x39, 0x70,\n\t0x91, 0xa0, 0x52, 0xcb, 0x91, 0xc2, 0xa2, 0xc0, 0x8d, 0x03, 0xba, 0xc6, 0xfa, 0x0d, 0x94, 0x41,\n\t0x76, 0x2d, 0x6f, 0xb3, 0xd5, 0x22, 0x2d, 0xce, 0x72, 0x1e, 0xe2, 0x1c, 0x0e, 0x29, 0x6d, 0x05,\n\t0xe3, 0xc8, 0x9b, 0x48, 0xd4, 0x44, 0x44, 0x92, 0xcd, 0xc5, 0x92, 0x20, 0xc6, 0x77, 0x38, 0x72,\n\t0x50, 0x75, 0x00, 0x9d, 0x8f, 0xa6, 0x9f, 0x2a, 0x4d, 0xa4, 0xc5, 0x26, 0x16, 0x13, 0xcd, 0xdc,\n\t0x90, 0x06, 0xf2, 0xb8, 0x74, 0x48, 0xc6, 0x43, 0x32, 0x60, 0x51, 0xe4, 0x49, 0x31, 0x24, 0x6c,\n\t0x90, 0x10, 0x16, 0x23, 0xd2, 0x0f, 0x96, 0x36, 0x7b, 0x7c, 0x91, 0x03, 0xd8, 0x40, 0x55, 0xc8,\n\t0x4a, 0xd5, 0x38, 0xcb, 0x7e, 0x64, 0x64, 0xfc, 0x1b, 0x5e, 0xf1, 0x90, 0x5d, 0x05, 0x2d, 0x29,\n\t0x2c, 0xd2, 0x26, 0x1f, 0xdc, 0x80, 0xb7, 0x51, 0x5e, 0xab, 0x1e, 0x93, 0xf7, 0x4f, 0x51, 0x08,\n\t0x12, 0x08, 0x86, 0x8a, 0x5b, 0x6c, 0x95, 0x6a, 0xea, 0xdb, 0xd2, 0x3a, 0xa2, 0xaf, 0xba, 0xea,\n\t0xbb, 0x62, 0x21, 0xef, 0x28, 0x6d, 0x66, 0xaa, 0x29, 0x2c, 0xdc, 0x12, 0x0f, 0xd3, 0xba, 0xd1,\n\t0x56, 0x91, 0xbc, 0xd7, 0xae, 0xa6, 0x31, 0xe1, 0x46, 0x70, 0xe9, 0x05, 0xe2, 0x15, 0x60, 0x2b,\n\t0x20, 0xa1, 0x98, 0x47, 0xf4, 0xdb, 0xff, 0xdb, 0x2c, 0x2a, 0xd8, 0x3a, 0x84, 0xb0, 0x7a, 0xdc,\n\t0x43, 0xdf, 0xd3, 0x62, 0x70, 0x10, 0xd6, 0xa8, 0x38, 0x07, 0x53, 0x74, 0x41, 0x87, 0x00, 0xf1,\n\t0x3d, 0x64, 0x58, 0x23, 0x66, 0x4b, 0xa8, 0x03, 0x74, 0xf4, 0x5b, 0xdb, 0x77, 0xb7, 0x84, 0xcb,\n\t0x5d, 0x2d, 0xc9, 0xe4, 0x86, 0x78, 0x59, 0xd0, 0xc7, 0x99, 0xd3, 0xa1, 0xae, 0x55, 0xd8, 0xdd,\n\t0x32, 0x5e, 0x0f, 0x32, 0xb8, 0x21, 0xe1, 0x12, 0x31, 0x16, 0xb3, 0x88, 0x17, 0xa8, 0x90, 0xc7,\n\t0xc3, 0xf5, 0x62, 0xe9, 0x46, 0x5c, 0x83, 0xdd, 0x9c, 0xd2, 0x30, 0xb0, 0xff, 0x2a, 0x44, 0x6e,\n\t0xc9, 0x1b, 0xf9, 0x33, 0x10, 0x4f, 0x2e, 0x00, 0x29, 0x3c, 0x52, 0xc1, 0xf4, 0x07, 0x8b, 0x14,\n\t0x79, 0x15, 0x63, 0x07, 0x24, 0xa6, 0x8d, 0x45, 0xc6, 0x7c, 0xaa, 0x44, 0x6e, 0x19, 0xf1, 0x7d,\n\t0x11, 0x6c, 0x94, 0x25, 0xc4, 0xa8, 0x22, 0xcd, 0x10, 0x82, 0x34, 0xe8, 0xf9, 0x25, 0x85, 0x80,\n\t0x1c, 0x68, 0x73, 0xf8, 0x3c, 0x01, 0xec, 0x90, 0xba, 0x8a, 0x7f, 0x2d, 0x72, 0x1a, 0xed, 0x67,\n\t0x02, 0xa0, 0x1d, 0xc7, 0x03, 0xd0, 0x2b, 0x6b, 0xb6, 0x71, 0x8e, 0xb9, 0x02, 0x31, 0x70, 0x24,\n\t0x7b, 0x89, 0x65, 0x44, 0x20, 0xd1, 0x7e, 0x7d, 0x5d, 0xaf, 0xb1, 0x69, 0xa1, 0x92, 0x6e, 0xdc,\n\t0x52, 0x80, 0xb5, 0xd9, 0x66, 0x6e, 0xaa, 0x38, 0x4b, 0xa1, 0xf2, 0x2e, 0xe2, 0x4a, 0x42, 0x44,\n\t0x00, 0x5f, 0x8b, 0xbb, 0x08, 0xd9, 0xa8, 0xd2, 0xa3, 0x13, 0xa5, 0xfd, 0x1b, 0x51, 0x72, 0x24,\n\t0xf4, 0xd7, 0x15, 0xe9, 0x09, 0x74, 0x84, 0x7a, 0x26, 0x32, 0x41, 0xdf, 0x38, 0x29, 0x58, 0xbc,\n\t0x14, 0x0f, 0x2a, 0x91, 0x50, 0xed, 0xf8, 0xbd, 0xc8, 0xdf, 0xeb, 0x6f, 0xf6, 0x63, 0x3d, 0xc5,\n\t0xe8, 0x25, 0x17, 0x47, 0x12, 0xdc, 0x8b, 0x6c, 0x44, 0x23, 0x64, 0x8d, 0x33, 0x2b, 0x5c, 0xc6,\n\t0xa6, 0x57, 0xd2, 0x94, 0xd4, 0x47, 0x11, 0x07, 0x36, 0x6e, 0xc9, 0x56, 0x37, 0xd2, 0x76, 0xcd,\n\t0xfd, 0xd1, 0x40, 0xd6, 0x28, 0x71, 0x34, 0x7c, 0xe0, 0x5f, 0x5f, 0x36, 0xf4, 0xb1, 0x74, 0xdf,\n\t0x9f, 0xad, 0x96, 0x12, 0xec, 0x2f, 0x25, 0xd5, 0x3b, 0x8b, 0x27, 0x2c, 0xd6, 0x55, 0xd7, 0xe0,\n\t0x94, 0x7b, 0xbc, 0x19, 0x8c, 0x72, 0xda, 0x16, 0x41, 0x26, 0xe3, 0xf3, 0x79, 0xcb, 0xc1, 0x2f,\n\t0xa7, 0xf3, 0x6d, 0xb6, 0x5b, 0xf2, 0x22, 0xe4, 0x40, 0x19, 0xa4, 0x38, 0x3d, 0x05, 0x89, 0x41,\n\t0xa2, 0x96, 0x47, 0xcc, 0xea, 0x46, 0x13, 0xaa, 0x10, 0xa0, 0x4b, 0x9e, 0x56, 0xb0, 0x2a, 0x98,\n\t0x0e, 0x0e, 0x7f, 0x04, 0xd3, 0xbf, 0xca, 0x20, 0xa6, 0xec, 0x55, 0xcd, 0xdd, 0x32, 0x2b, 0x44,\n\t0x42, 0x0a, 0x0a, 0x66, 0x4d, 0xe9, 0x5e, 0x93, 0x72, 0xc7, 0x5a, 0xb1, 0x22, 0xfb, 0x6f, 0x1e,\n\t0xf6, 0x3d, 0x94, 0x54, 0x34, 0x96, 0x9f, 0xd2, 0x0d, 0x11, 0xc3, 0x99, 0xf8, 0x74, 0x68, 0x95,\n\t0x0d, 0xe7, 0x8a, 0xc0, 0xfe, 0xc9, 0xeb, 0x46, 0x82, 0x1b, 0x3f, 0x2d, 0x5c, 0x07, 0x2d, 0x22,\n\t0x55, 0x81, 0x6d, 0xb9, 0x24, 0x25, 0xe5, 0x1f, 0x52, 0x90, 0x8b, 0x60, 0x71, 0x74, 0x08, 0xa7,\n\t0xb3, 0x5b, 0xed, 0x29, 0xc4, 0x42, 0x21, 0x07, 0x6e, 0x39, 0xc9, 0x0e, 0xdc, 0xe2, 0x56, 0x98,\n\t0x69, 0xc9, 0x1a, 0x0e, 0xc8, 0xca, 0x44, 0x59, 0x50, 0x99, 0xa7, 0x9e, 0x4b, 0xbb, 0x8b, 0x74,\n\t0x75, 0x9a, 0xa1, 0xd8, 0x31, 0x07, 0xf2, 0x5d, 0x36, 0x3e, 0x53, 0x85, 0x84, 0x34, 0x38, 0x4d,\n\t0x13, 0x5f, 0x20, 0xac, 0xa6, 0x22, 0xaa, 0x42, 0x27, 0xba, 0x7b, 0x0b, 0x7d, 0xde, 0xa6, 0x0c,\n\t0x2a, 0x11, 0x8c, 0x21, 0x9a, 0xfc, 0x8a, 0x1c, 0xb6, 0x3e, 0x75, 0x42, 0xfd, 0x60, 0x1a, 0x5d,\n\t0xa5, 0xd4, 0x6a, 0x01, 0x54, 0x0a, 0x1f, 0x64, 0x9b, 0xc1, 0x02, 0xe8, 0xeb, 0x64, 0xad, 0xcd,\n\t0xe8, 0xda, 0x31, 0x51, 0xea, 0x44, 0x1d, 0x1a, 0xca, 0xa6, 0x04, 0xbb, 0xa3, 0x5e, 0x03, 0x1a,\n\t0xad, 0x26, 0x21, 0x34, 0xdb, 0xb8, 0x4e, 0xc9, 0xe3, 0x02, 0x8b, 0x12, 0x9e, 0x8f, 0x41, 0x22,\n\t0xf0, 0x5a, 0x36, 0xce, 0xdf, 0x2c, 0x8b, 0xb8, 0xd2, 0x78, 0x06, 0x35, 0x1f, 0x38, 0x06, 0xd4,\n\t0x10, 0x71, 0x0b, 0x2a, 0x15, 0xd9, 0x2d, 0x43, 0x81, 0x0d, 0xb0, 0xa8, 0xf7, 0x07, 0xb5, 0x4a,\n\t0xa6, 0x4b, 0xa5, 0x40, 0xe7, 0x99, 0x10, 0x81, 0x48, 0x0a, 0x55, 0xb1, 0xb7, 0xfe, 0x63, 0x95,\n\t0xfc, 0x02, 0xb0, 0xe3, 0xac, 0x02, 0xf5, 0x8a, 0x48, 0xef, 0x44, 0x40, 0xde, 0xae, 0x97, 0xd1,\n\t0x35, 0x39, 0x30, 0x85, 0x59, 0x22, 0x22, 0x2d, 0x0d, 0xf9, 0xba, 0x28, 0xa5, 0xfc, 0x8f, 0xd1,\n\t0xc8, 0x4d, 0xa0, 0x5e, 0x4d, 0x08, 0xf4, 0xaf, 0x7d, 0xb2, 0xf8, 0x4f, 0x0e, 0xc7, 0x16, 0x77,\n\t0x0c, 0x8d, 0x09, 0x2d, 0x17, 0xf1, 0x93, 0xbd, 0x1b, 0x79, 0xd6, 0x6c, 0x3f, 0xfa, 0x6f, 0xd8,\n\t0x96, 0x43, 0xfb, 0x5d, 0x40, 0x87, 0x3a, 0x4c, 0x27, 0xdd, 0x1f, 0xa7, 0xba, 0xa8, 0x59, 0x7c,\n\t0x7e, 0xcd, 0x1b, 0xc2, 0x94, 0x83, 0x9a, 0x1f, 0x93, 0x97, 0x53, 0x30, 0x89, 0x98, 0x8e, 0x5a,\n\t0xca, 0x19, 0xd0, 0x88, 0x86, 0xa5, 0x3b, 0x46, 0x91, 0x38, 0x49, 0xd9, 0xc3, 0xab, 0xc7, 0xb1,\n\t0x85, 0xa3, 0x0f, 0xf2, 0x24, 0xc8, 0x38, 0xbd, 0x19, 0xe1, 0xbe, 0xe1, 0xe3, 0xca, 0x20, 0x3a,\n\t0x5e, 0x8a, 0x68, 0x4f, 0x71, 0x6e, 0x7c, 0x09, 0x4d, 0x23, 0x99, 0xfd, 0x60, 0x9f, 0xc7, 0x18,\n\t0x80, 0xd5, 0x99, 0x59, 0xa7, 0x58, 0xe6, 0x55, 0x0e, 0x88, 0xb0, 0xe9, 0x76, 0xe5, 0x92, 0x35,\n\t0x42, 0x9a, 0x26, 0xf2, 0xdf, 0xe1, 0xa6, 0xfa, 0x84, 0xbc, 0xf0, 0x43, 0xd5, 0x75, 0xbd, 0x0c,\n\t0xb0, 0x6e, 0x8a, 0x16, 0xe3, 0x88, 0x7b, 0x42, 0x71, 0x28, 0x98, 0x9e, 0x44, 0xc4, 0x52, 0x88,\n\t0x75, 0x05, 0x2f, 0x06, 0x46, 0xc4, 0x5d, 0x60, 0xca, 0xcb, 0x8f, 0x79, 0x7f, 0x9e, 0x23, 0x86,\n\t0xf4, 0x5f, 0xee, 0xfb, 0x67, 0xa8, 0x3a, 0x8d, 0xc6, 0xe8, 0xcf, 0xb9, 0xf1, 0x0b, 0x2d, 0xb4,\n\t0x42, 0xb7, 0x8f, 0x24, 0x79, 0x8d, 0x40, 0x15, 0xbd, 0x1b, 0x9d, 0x67, 0xc2, 0x7b, 0xc3, 0x55,\n\t0xf2, 0x2b, 0x2b, 0xf1, 0x27, 0xe5, 0x25, 0x61, 0xc8, 0x4e, 0x8a, 0x52, 0x84, 0x94, 0x32, 0xd6,\n\t0x0a, 0x12, 0xd7, 0x96, 0x37, 0x7a, 0x4a, 0x65, 0x44, 0x34, 0x78, 0xc7, 0xb4, 0xd3, 0x78, 0xbf,\n\t0x7a, 0xcf, 0xd8, 0xc6, 0x5f, 0x2c, 0xeb, 0x81, 0x16, 0xc5, 0xcb, 0xb7, 0x7a, 0x65, 0x5c, 0xb5,\n\t0xa2, 0x1a, 0xd2, 0x90, 0xea, 0x5d, 0x3c, 0xe8, 0xa6, 0x27, 0x59, 0xb7, 0xaf, 0x5f, 0x17, 0x2b,\n\t0x49, 0x41, 0xf7, 0x12, 0x21, 0x5b, 0x10, 0x47, 0xc8, 0xf3, 0x63, 0xaa, 0xeb, 0xd3, 0x73, 0xd2,\n\t0x50, 0x8d, 0x4e, 0x6f, 0x31, 0x9f, 0x3e, 0xef, 0x85, 0x4e, 0x0c, 0xc8, 0x4d, 0x15, 0x82, 0x5a,\n\t0xbb, 0x42, 0xdc, 0x8d, 0xbd, 0x72, 0x0f, 0x75, 0xe4, 0x44, 0x5b, 0x43, 0x65, 0xa4, 0x5d, 0x1e,\n\t0x78, 0x46, 0x44, 0xcb, 0x83, 0xdb, 0x0d, 0xa8, 0xa6, 0xba, 0x38, 0xcd, 0x5c, 0xa1, 0x84, 0xa0,\n\t0x5d, 0x6b, 0x24, 0x27, 0x47, 0xc1, 0x3b, 0x94, 0xef, 0x3c, 0xe1, 0x39, 0x8c, 0x63, 0x05, 0x92,\n\t0xf1, 0xd6, 0x50, 0x51, 0x8c, 0x53, 0xaf, 0x44, 0xd0, 0xb1, 0x3f, 0xd8, 0x1d, 0x03, 0x65, 0x99,\n\t0x1f, 0x2a, 0x87, 0x80, 0x47, 0xc6, 0x70, 0xfd, 0x93, 0x96, 0xd8, 0x13, 0xb6, 0x47, 0x6a, 0xb2,\n\t0x65, 0x7a, 0x2e, 0x48, 0x3a, 0x51, 0xf3, 0x86, 0xb4, 0xd1, 0x17, 0x16, 0xcb, 0xe3, 0x6b, 0xcb,\n\t0x99, 0xbf, 0x7e, 0x81, 0x7d, 0x94, 0x0f, 0x9b, 0x09, 0x1d, 0xbe, 0xd0, 0xf2, 0xaa, 0xc0, 0x3f,\n\t0xe9, 0xe7, 0xb0, 0x4c, 0xb9, 0x9d, 0xb6, 0x1a, 0x00, 0x87, 0x48, 0xb7, 0x02, 0x0d, 0xba, 0x9a,\n\t0x2c, 0x1e, 0x13, 0xa6, 0x48, 0x23, 0x33, 0x84, 0x73, 0x1c, 0x27, 0x3e, 0x9a, 0x2f, 0xa8, 0x6e,\n\t0x45, 0x45, 0x2e, 0x48, 0xe0, 0xa0, 0xe2, 0x58, 0x05, 0x86, 0x3e, 0x7d, 0xe5, 0x81, 0x8b, 0x0b,\n\t0xae, 0x4d, 0xac, 0x21, 0x7d, 0x8e, 0x52, 0xb9, 0xb9, 0x75, 0x50, 0x07, 0xca, 0x4d, 0xc8, 0xe7,\n\t0x22, 0xa3, 0xcb, 0x56, 0x5b, 0x00, 0xc8, 0x48, 0x1e, 0x8f, 0x3d, 0x91, 0x1c, 0x33, 0x26, 0x45,\n\t0x81, 0x66, 0x07, 0xc6, 0x1a, 0x9b, 0xd3, 0x50, 0x3a, 0xd1, 0xa8, 0x60, 0xd0, 0x64, 0xed, 0xe6,\n\t0xc6, 0x78, 0x04, 0xe6, 0x8f, 0xa4, 0x5f, 0x4e, 0x40, 0x1b, 0xf3, 0x5c, 0x22, 0x94, 0x1e, 0xb1,\n\t0xb3, 0xd0, 0xe6, 0xe4, 0x2c, 0x0f, 0x6e, 0x1d, 0x61, 0x55, 0xfb, 0x49, 0xe0, 0xc0, 0x3a, 0x7b,\n\t0x33, 0x65, 0x84, 0xf6, 0x7a, 0xda, 0x24, 0x74, 0x17, 0x3d, 0x55, 0x03, 0xd6, 0xbc, 0x18, 0xda,\n\t0x72, 0x01, 0x25, 0xe0, 0x67, 0x54, 0x3f, 0x5b, 0x78, 0x00, 0xb4, 0xb1, 0xca, 0x6c, 0xe2, 0x81,\n\t0xad, 0x44, 0x5a, 0x84, 0x4e, 0x4d, 0x89, 0x7e, 0x92, 0x7e, 0x6e, 0xa0, 0x71, 0x1b, 0x26, 0x58,\n\t0x38, 0xee, 0x1c, 0x96, 0xfa, 0x67, 0x99, 0x53, 0x76, 0xe8, 0xa3, 0x28, 0x27, 0xfc, 0x2f, 0xdc,\n\t0x4d, 0x34, 0xac, 0x7e, 0xd0, 0x47, 0x7a, 0x7a, 0xac, 0xe7, 0x6a, 0x9b, 0x2c, 0x33, 0xa0, 0x9e,\n\t0x32, 0xaa, 0x33, 0xcc, 0x32, 0xb4, 0xac, 0x30, 0x28, 0xe3, 0x9e, 0xa7, 0x36, 0x5c, 0xde, 0x64,\n\t0xc9, 0x39, 0x6f, 0xfd, 0x15, 0x16, 0x58, 0x5e, 0xea, 0xcc, 0x40, 0xec, 0x88, 0xca, 0x3b, 0x0c,\n\t0xfb, 0x91, 0xb0, 0xb9, 0xb4, 0x78, 0xdf, 0x75, 0xd7, 0x0d, 0xf7, 0x96, 0xc5, 0x3b, 0x23, 0xfc,\n\t0x21, 0x79, 0x20, 0xe1, 0x39, 0x3e, 0xfc, 0x6b, 0xb7, 0x86, 0x9f, 0x81, 0x93, 0x81, 0x34, 0xba,\n\t0xc3, 0x02, 0x43, 0x3c, 0xdf, 0x1c, 0xa1, 0x53, 0xeb, 0xf8, 0x06, 0x8a, 0xc5, 0xe7, 0x5f, 0x36,\n\t0x8d, 0x4a, 0x0c, 0x5d, 0xc1, 0x3e, 0xaf, 0x56, 0xf3, 0xad, 0xfb, 0x15, 0x29, 0x83, 0x40, 0x68,\n\t0xb6, 0xe5, 0xea, 0xab, 0xe1, 0x06, 0x37, 0x62, 0x0e, 0x43, 0x31, 0xcb, 0xa3, 0x31, 0xf1, 0xff,\n\t0xd2, 0x0f, 0xfc, 0x42, 0x25, 0x92, 0x65, 0x33, 0x6b, 0x70, 0x45, 0xb0, 0xee, 0xdf, 0x9f, 0xdc,\n\t0xdb, 0x83, 0xb0, 0x09, 0xeb, 0x3d, 0xac, 0xb9, 0x7e, 0x9d, 0x17, 0x8c, 0xe4, 0x75, 0xa3, 0x50,\n\t0x26, 0x93, 0x81, 0x8b, 0xc4, 0x3e, 0xc6, 0x59, 0x80, 0xcd, 0x0d, 0xad, 0xe2, 0x43, 0xf2, 0xb3,\n\t0xfd, 0x50, 0x6f, 0xa3, 0x52, 0xec, 0x20, 0xea, 0xe2, 0x86, 0x8d, 0x3e, 0x8f, 0xcc, 0x87, 0x27,\n\t0x75, 0x73, 0x0e, 0xed, 0x2c, 0x25, 0xc3, 0x03, 0x19, 0xdf, 0xcf, 0xa1, 0xc2, 0x88, 0xed, 0x51,\n\t0x5d, 0x21, 0x9f, 0x25, 0xcf, 0xa0, 0xfa, 0xe3, 0x12, 0x13, 0x44, 0xb5, 0x99, 0x51, 0x63, 0xe0,\n\t0xc1, 0x86, 0x6d, 0xd9, 0x61, 0xaf, 0x3c, 0x25, 0x7b, 0xea, 0x09, 0x46, 0x0c, 0x2f, 0xbe, 0x9b,\n\t0xb6, 0x8f, 0x98, 0xf3, 0x70, 0x5b, 0x3e, 0xa3, 0xa0, 0x57, 0x77, 0xdd, 0x91, 0x48, 0xee, 0xb3,\n\t0x78, 0x01, 0x31, 0x99, 0xed, 0xd2, 0xa9, 0xc5, 0x4c, 0xb2, 0xbd, 0x7c, 0x7b, 0xe9, 0x4a, 0x65,\n\t0x0e, 0xb0, 0x3f, 0x7b, 0x95, 0x0d, 0x77, 0xb3, 0x55, 0x11, 0xff, 0xfb, 0xd6, 0x82, 0x09, 0xee,\n\t0x8f, 0x50, 0x76, 0x5f, 0x06, 0x57, 0xa2, 0xb6, 0xa1, 0x2f, 0x16, 0x2e, 0x0f, 0xef, 0x3c, 0x93,\n\t0x89, 0x24, 0x8d, 0x60, 0x91, 0x67, 0x98, 0x86, 0x43, 0x61, 0x7f, 0x60, 0x31, 0x7c, 0xa2, 0x4e,\n\t0x8e, 0xa0, 0xa2, 0x92, 0x47, 0x6f, 0x24, 0x5b, 0x14, 0x09, 0x15, 0xfb, 0xe5, 0x12, 0x37, 0x81,\n\t0x8d, 0xf7, 0x53, 0x5a, 0x15, 0xc1, 0x4f, 0xc5, 0x0a, 0x23, 0x3d, 0x44, 0x25, 0x8b, 0xa5, 0x7d,\n\t0xf7, 0xd2, 0xb7, 0x95, 0xc7, 0xf3, 0x4d, 0x2b, 0x18, 0xf0, 0x6f, 0x5e, 0x0a, 0xff, 0x9f, 0xb0,\n\t0xf5, 0x45, 0x35, 0x04, 0xc6, 0xc2, 0xab, 0x76, 0xbb, 0x35, 0xd3, 0x1a, 0xe6, 0x2b, 0x9f, 0xee,\n\t0xa8, 0x74, 0x09, 0x7e, 0x7b, 0x5b, 0x4e, 0xc6, 0x65, 0x90, 0x1f, 0x67, 0x70, 0x42, 0xae, 0x37,\n\t0xe3, 0x27, 0xc0, 0x0e, 0xeb, 0x4a, 0xe4, 0x58, 0x17, 0x87, 0x09, 0xba, 0xc3, 0xa1, 0x96, 0x3a,\n\t0x9e, 0x47, 0xfa, 0xc2, 0xcf, 0x70, 0x6f, 0x79, 0x4c, 0xe6, 0xcd, 0x73, 0x8c, 0x07, 0x9c, 0xe9,\n\t0x91, 0x08, 0x55, 0x08, 0x2f, 0x44, 0x08, 0x36, 0x9d, 0x91, 0x4d, 0x35, 0xaf, 0x2b, 0x99, 0x5d,\n\t0x2a, 0xdd, 0xf3, 0x47, 0xcf, 0xc2, 0x7b, 0x03, 0xea, 0x24, 0x6c, 0x86, 0x73, 0x64, 0xd7, 0x95,\n\t0xf9, 0x31, 0x6c, 0x86, 0x7e, 0xd8, 0x4d, 0x21, 0xdb, 0x9b, 0xcb, 0x22, 0x1c, 0xa4, 0x97, 0xbb,\n\t0x1b, 0x80, 0x75, 0x9f, 0xda, 0x2e, 0xad, 0xed, 0x87, 0x6a, 0x21, 0xfa, 0x38, 0x7f, 0x28, 0x71,\n\t0x44, 0xa9, 0x56, 0x4c, 0x36, 0x3c, 0x8c, 0xb4, 0xd0, 0x01, 0xe6, 0xf1, 0x07, 0x36, 0x14, 0xba,\n\t0xd5, 0xf7, 0xfc, 0x1e, 0x36, 0x44, 0x1f, 0x45, 0xa3, 0x0b, 0x84, 0xde, 0x8a, 0xb7, 0xa4, 0x93,\n\t0x4f, 0x64, 0x28, 0xa5, 0xce, 0x62, 0x5e, 0xef, 0x6c, 0xe6, 0xfd, 0x25, 0x99, 0x96, 0x8f, 0x7d,\n\t0x53, 0x8d, 0x25, 0x4e, 0x13, 0xfb, 0xe7, 0xef, 0xbc, 0x46, 0x74, 0x20, 0x43, 0x9f, 0xc3, 0x7d,\n\t0x5d, 0xdc, 0xd3, 0x96, 0x63, 0xe1, 0x10, 0xa1, 0xcc, 0x2c, 0x77, 0xd3, 0xf0, 0xed, 0x59, 0x28,\n\t0xd6, 0x2f, 0x07, 0x8d, 0x07, 0x54, 0xe1, 0x89, 0xb4, 0x73, 0x6e, 0x2d, 0x9e, 0xec, 0xb5, 0x9f,\n\t0x38, 0xaa, 0x29, 0xce, 0x49, 0x0a, 0x62, 0x5e, 0x0b, 0x3e, 0xac, 0x6f, 0xc0, 0xe2, 0x15, 0x53,\n\t0x41, 0x99, 0x75, 0xbb, 0xf5, 0x21, 0x77, 0xc7, 0x31, 0xb4, 0xcb, 0xca, 0xfd, 0x1a, 0xeb, 0x84,\n\t0x1f, 0xed, 0x17, 0xb0, 0x5f, 0x60, 0x69, 0x36, 0xc7, 0x30, 0x84, 0xf2, 0x92, 0x3b, 0x1a, 0x46,\n\t0xc6, 0xa3, 0x12, 0x9d, 0xb7, 0x0c, 0xfa, 0xd1, 0x33, 0x65, 0x0a, 0x72, 0x07, 0x46, 0x71, 0xbd,\n\t0x3f, 0x91, 0xf3, 0x26, 0xda, 0x87, 0x9a, 0xfd, 0x30, 0x86, 0x04, 0xbe, 0x5b, 0x25, 0x53, 0x37,\n\t0xef, 0xed, 0x22, 0x3a, 0xcf, 0xc6, 0xc5, 0x65, 0xe6, 0x58, 0x11, 0xaa, 0x0f, 0xe8, 0x84, 0x22,\n\t0x05, 0xe3, 0x7f, 0x6b, 0x13, 0xc8, 0x4c, 0x46, 0x81, 0xe2, 0x62, 0x37, 0x63, 0x13, 0xcb, 0x22,\n\t0x8d, 0x91, 0x68, 0xcf, 0xe9, 0xf5, 0x1f, 0x5a, 0x51, 0x8a, 0x29, 0x14, 0xdd, 0x51, 0xe3, 0xd4,\n\t0x3d, 0xfd, 0x09, 0xd6, 0x98, 0x4c, 0xee, 0xb6, 0x34, 0xc2, 0x46, 0xc5, 0xc2, 0xe2, 0xb2, 0xd4,\n\t0xa1, 0xc6, 0x71, 0xbf, 0xca, 0x97, 0x6c, 0x4c, 0xe8, 0x86, 0x31, 0x9f, 0x28, 0x31, 0x16, 0x6b,\n\t0xb7, 0x3e, 0x74, 0x14, 0xfd, 0x0a, 0x93, 0x45, 0x0c, 0xdb, 0xca, 0x5b, 0x6a, 0x4c, 0xb3, 0xb1,\n\t0x5c, 0x0a, 0x86, 0x14, 0xa7, 0x6b, 0x2a, 0x0a, 0xb7, 0x75, 0xb6, 0x93, 0x53, 0x51, 0x7a, 0xec,\n\t0xa2, 0x0e, 0xb2, 0xe7, 0x21, 0x54, 0x91, 0x3b, 0xdf, 0xcb, 0x63, 0x51, 0x29, 0x62, 0x28, 0x4e,\n\t0x76, 0xa1, 0xa7, 0xdd, 0x37, 0x94, 0xde, 0x6f, 0x75, 0x4a, 0xb5, 0x22, 0x88, 0x11, 0xd5, 0x7c,\n\t0x44, 0xa6, 0x43, 0x6e, 0x7f, 0x18, 0xed, 0x8d, 0x4f, 0x2a, 0x74, 0x99, 0x11, 0x13, 0xe6, 0x0d,\n\t0xa6, 0xfa, 0x77, 0x1d, 0xa5, 0x5a, 0x49, 0x01, 0x16, 0x2d, 0x2a, 0x57, 0xfc, 0x13, 0xe2, 0xc3,\n\t0xe0, 0x17, 0xa3, 0x57, 0xea, 0xb2, 0x5b, 0x1b, 0x9c, 0xce, 0x7b, 0xd2, 0x12, 0xf3, 0x54, 0xdf,\n\t0x38, 0x1a, 0x54, 0x7c, 0xbc, 0x07, 0x7e, 0xe6, 0xc8, 0xf6, 0x6e, 0x15, 0x17, 0x93, 0x4e, 0xf9,\n\t0xcb, 0xee, 0xa1, 0xb1, 0x89, 0xa4, 0xa4, 0xf5, 0xb3, 0x07, 0xdc, 0x16, 0xf1, 0x08, 0x4c, 0xd8,\n\t0xff, 0xbf, 0xe8, 0xaa, 0xf1, 0xe2, 0x07, 0xe8, 0xca, 0x0c, 0xd8, 0x7e, 0x4e, 0x74, 0xf1, 0x91,\n\t0x05, 0xa5, 0x3f, 0x21, 0x77, 0x33, 0x97, 0x10, 0x6d, 0xc3, 0xf6, 0xab, 0x2d, 0xcc, 0xf0, 0x3d,\n\t0x83, 0x32, 0x1a, 0xc4, 0xbc, 0x86, 0xdb, 0x78, 0xf7, 0x02, 0x2e, 0x43, 0x5d, 0x3e, 0x55, 0x44,\n\t0x8a, 0x88, 0x09, 0xe7, 0x3f, 0xc5, 0x03, 0xfe, 0xe9, 0xff, 0xf0, 0xae, 0xf6, 0x93, 0xd8, 0xc7,\n\t0x3e, 0x3f, 0x04, 0x82, 0xa6, 0x4f, 0x1a, 0x4e, 0x19, 0x75, 0x82, 0x8e, 0x27, 0xfd, 0x46, 0x03,\n\t0x09, 0x50, 0x8d, 0x24, 0xdb, 0xd7, 0xd4, 0xdf, 0x3c, 0x35, 0xd7, 0xec, 0x3c, 0xba, 0x83, 0x0a,\n\t0x66, 0x60, 0xca, 0x93, 0x37, 0x66, 0x19, 0xca, 0x9f, 0x41, 0xac, 0x0c, 0x73, 0x1d, 0xd5, 0x9a,\n\t0x30, 0x38, 0x3b, 0x59, 0x4c, 0xc3, 0xcc, 0x67, 0x13, 0xf1, 0x02, 0x30, 0x0c, 0xa8, 0x6f, 0x93,\n\t0x5b, 0x06, 0x82, 0x2e, 0x24, 0x10, 0x27, 0x54, 0xa6, 0x5f, 0x0c, 0x03, 0x1a, 0xa3, 0x9b, 0xc6,\n\t0x8e, 0x33, 0x92, 0x32, 0x33, 0xcb, 0xb2, 0x62, 0xe9, 0x19, 0xf2, 0x9b, 0xdd, 0x36, 0xaa, 0x67,\n\t0x19, 0xd3, 0x39, 0x47, 0x9c, 0x6c, 0x22, 0x46, 0x08, 0x7e, 0x94, 0x83, 0x7b, 0x52, 0xbc, 0xfe,\n\t0x46, 0xd2, 0x9e, 0x17, 0x24, 0x04, 0xa6, 0xca, 0x83, 0x6a, 0xb6, 0x88, 0x65, 0x36, 0x48, 0x2e,\n\t0x4c, 0xc8, 0x6d, 0xa7, 0xf9, 0xc9, 0x3c, 0xc2, 0xd2, 0x2f, 0xe0, 0x14, 0xed, 0x38, 0x51, 0xdd,\n\t0xea, 0x36, 0x56, 0xbe, 0x79, 0x03, 0x51, 0x22, 0x03, 0xae, 0x65, 0x60, 0xb7, 0x82, 0x86, 0x46,\n\t0x27, 0xf1, 0x7b, 0x91, 0xea, 0xc6, 0x59, 0x29, 0x43, 0x23, 0x1b, 0xa6, 0x7a, 0x14, 0x35, 0x8a,\n\t0x44, 0xd6, 0xde, 0xc8, 0x17, 0x43, 0x5f, 0x0f, 0xc4, 0x71, 0x11, 0xe5, 0xec, 0x21, 0x7f, 0x41,\n\t0xa2, 0xc6, 0x03, 0x28, 0x98, 0x7e, 0x45, 0xac, 0x30, 0x91, 0xee, 0x65, 0x8d, 0x04, 0xef, 0x18,\n\t0x8e, 0xbc, 0x3a, 0x21, 0x6e, 0xfb, 0xeb, 0x89, 0x2b, 0xc1, 0x35, 0x34, 0x90, 0x6d, 0x87, 0xa0,\n\t0xa2, 0x99, 0xed, 0x41, 0x66, 0x02, 0xd4, 0x04, 0x6c, 0xa2, 0x75, 0xb3, 0x11, 0x00, 0xd9, 0xaa,\n\t0x7a, 0x30, 0x82, 0x3a, 0x1a, 0x64, 0x4f, 0x5e, 0x1b, 0xbe, 0x82, 0xa0, 0xc7, 0x2c, 0xda, 0x8e,\n\t0x74, 0x06, 0x81, 0x7b, 0x77, 0xde, 0x12, 0xaf, 0x69, 0x21, 0x43, 0x3d, 0xd1, 0x96, 0xc9, 0x1c,\n\t0xb5, 0x8e, 0x42, 0x5c, 0x43, 0x8a, 0x7e, 0xbe, 0xba, 0xb0, 0x1e, 0x76, 0x8f, 0xe9, 0x34, 0xdb,\n\t0x43, 0x37, 0x05, 0x32, 0x2f, 0xea, 0xca, 0x2d, 0x11, 0x65, 0x1d, 0xa9, 0xd6, 0xe1, 0x9c, 0x6b,\n\t0x40, 0x16, 0x3a, 0x48, 0xa6, 0x38, 0xa5, 0x96, 0x18, 0x71, 0xc0, 0xcd, 0xb1, 0xf3, 0xa0, 0x3c,\n\t0x14, 0x18, 0x80, 0x78, 0x38, 0xa4, 0x3b, 0x37, 0x6c, 0x08, 0xaa, 0x5a, 0xdc, 0xe8, 0x72, 0x8e,\n\t0xc3, 0x15, 0x61, 0x28, 0x6e, 0xcf, 0x8f, 0xae, 0xb6, 0xdf, 0x00, 0xe7, 0xfc, 0x06, 0xcf, 0x5c,\n\t0xb0, 0x3d, 0x8b, 0x1d, 0x0a, 0x10, 0xa2, 0xb7, 0x71, 0x94, 0x9d, 0xe2, 0x5a, 0x28, 0x50, 0x9a,\n\t0xd8, 0x52, 0x7c, 0x48, 0x80, 0x4f, 0x21, 0xcb, 0x30, 0x4a, 0x87, 0x2c, 0xf0, 0x96, 0xe3, 0xd7,\n\t0xc8, 0xd4, 0xa6, 0x0c, 0x14, 0xa0, 0x43, 0xbe, 0x68, 0xfd, 0x0a, 0x67, 0x42, 0xdd, 0xfa, 0x4d,\n\t0x78, 0x09, 0xb8, 0x65, 0x31, 0xcc, 0x8d, 0x07, 0xfa, 0xec, 0x08, 0x75, 0x82, 0x50, 0x22, 0xdd,\n\t0xa0, 0xc2, 0x46, 0xa5, 0xc1, 0x41, 0x24, 0xc4, 0xe8, 0x16, 0x44, 0xb5, 0x92, 0xd4, 0xc5, 0x44,\n\t0xd3, 0x94, 0xa4, 0x5f, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compressed_data_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_data_handle_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfdata_stream_t *compressed_data_stream                  = NULL;\n\tlibfsntfs_compressed_data_handle_t *compressed_data_handle = NULL;\n\tint result                                                 = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                            = 3;\n\tint number_of_memset_fail_tests                            = 1;\n\tint test_number                                            = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1,\n\t          3414,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tcompressed_data_stream = NULL;\n\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          &compressed_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1,\n\t          3414,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          NULL,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompressed_data_handle = (libfsntfs_compressed_data_handle_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tcompressed_data_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          NULL,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          (uint32_t) -1,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_data_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_data_handle_initialize(\n\t\t          &compressed_data_handle,\n\t\t          compressed_data_stream,\n\t\t          2,\n\t\t          7638,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compressed_data_handle != NULL )\n\t\t\t{\n\t\t\t\tcompressed_data_handle->compressed_data_stream = NULL;\n\n\t\t\t\tlibfsntfs_compressed_data_handle_free(\n\t\t\t\t &compressed_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_data_handle\",\n\t\t\t compressed_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compressed_data_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compressed_data_handle_initialize(\n\t\t          &compressed_data_handle,\n\t\t          compressed_data_stream,\n\t\t          2,\n\t\t          7638,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compressed_data_handle != NULL )\n\t\t\t{\n\t\t\t\tcompressed_data_handle->compressed_data_stream = NULL;\n\n\t\t\t\tlibfsntfs_compressed_data_handle_free(\n\t\t\t\t &compressed_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compressed_data_handle\",\n\t\t\t compressed_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          &compressed_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_stream_free(\n\t          &compressed_data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_data_handle_free(\n\t\t &compressed_data_handle,\n\t\t NULL );\n\t}\n\tif( compressed_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &compressed_data_stream,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_data_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_data_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_data_handle_get_compressed_block_offsets function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_data_handle_get_compressed_block_offsets(\n     void )\n{\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfdata_stream_t *compressed_data_stream                  = NULL;\n\tlibfsntfs_compressed_data_handle_t *compressed_data_handle = NULL;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1,\n\t          3414,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tcompressed_data_stream = NULL;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compressed_data_handle_get_compressed_block_offsets(\n\t          compressed_data_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compressed_data_handle_get_compressed_block_offsets(\n\t          NULL,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          &compressed_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_data_handle_free(\n\t\t &compressed_data_handle,\n\t\t NULL );\n\t}\n\tif( compressed_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &compressed_data_stream,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_data_handle_read_segment_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_data_handle_read_segment_data(\n     void )\n{\n\tuint8_t segment_data[ 16 ];\n\n\tuint8_t expected_segment_data1[ 12 ] = {\n\t\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53 };\n\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfdata_stream_t *compressed_data_stream                  = NULL;\n\tlibfsntfs_compressed_data_handle_t *compressed_data_handle = NULL;\n\tssize_t read_count                                         = 0;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1,\n\t          3414,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tcompressed_data_stream = NULL;\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_compressed_data_handle_read_segment_data(\n\t              compressed_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              12,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 12 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          segment_data,\n\t          expected_segment_data1,\n\t          12 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_compressed_data_handle_read_segment_data(\n\t              NULL,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_data_handle_read_segment_data(\n\t              compressed_data_handle,\n\t              NULL,\n\t              -1,\n\t              0,\n\t              segment_data,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_data_handle_read_segment_data(\n\t              compressed_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              NULL,\n\t              16,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_compressed_data_handle_read_segment_data(\n\t              compressed_data_handle,\n\t              NULL,\n\t              0,\n\t              0,\n\t              segment_data,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          &compressed_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_data_handle_free(\n\t\t &compressed_data_handle,\n\t\t NULL );\n\t}\n\tif( compressed_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &compressed_data_stream,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compressed_data_handle_seek_segment_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compressed_data_handle_seek_segment_offset(\n     void )\n{\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfdata_stream_t *compressed_data_stream                  = NULL;\n\tlibfsntfs_compressed_data_handle_t *compressed_data_handle = NULL;\n\toff64_t offset                                             = 0;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_cluster_block_stream_initialize_from_data(\n\t          &compressed_data_stream,\n\t          fsntfs_test_compressed_data_handle_lzxpress_huffman_compressed_data1,\n\t          3414,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_stream\",\n\t compressed_data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compressed_data_handle_initialize(\n\t          &compressed_data_handle,\n\t          compressed_data_stream,\n\t          2,\n\t          7638,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tcompressed_data_stream = NULL;\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_compressed_data_handle_seek_segment_offset(\n\t          compressed_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_compressed_data_handle_seek_segment_offset(\n\t          NULL,\n\t          NULL,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_compressed_data_handle_seek_segment_offset(\n\t          compressed_data_handle,\n\t          NULL,\n\t          -1,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_compressed_data_handle_seek_segment_offset(\n\t          compressed_data_handle,\n\t          NULL,\n\t          0,\n\t          0,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_compressed_data_handle_free(\n\t          &compressed_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compressed_data_handle\",\n\t compressed_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compressed_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compressed_data_handle_free(\n\t\t &compressed_data_handle,\n\t\t NULL );\n\t}\n\tif( compressed_data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &compressed_data_stream,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_COMPRESSED_DATA_HANDLE_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_data_handle_initialize\",\n\t fsntfs_test_compressed_data_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_data_handle_free\",\n\t fsntfs_test_compressed_data_handle_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_data_handle_get_compressed_block_offsets\",\n\t fsntfs_test_compressed_data_handle_get_compressed_block_offsets );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_data_handle_read_segment_data\",\n\t fsntfs_test_compressed_data_handle_read_segment_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compressed_data_handle_seek_segment_offset\",\n\t fsntfs_test_compressed_data_handle_seek_segment_offset );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compression.c",
    "content": "/*\n * Library compression type test program\n *\n * Copyright (C) 2018-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compression.h\"\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n\nuint8_t fsntfs_test_compression_lznt1_compressed_data1[ 8192 ] = {\n\t0x65, 0xb8, 0x00, 0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x00, 0x20, 0x4c, 0x45, 0x53,\n\t0x53, 0x45, 0x52, 0x20, 0x00, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x80, 0x50, 0x55,\n\t0x42, 0x4c, 0x49, 0x43, 0x20, 0x00, 0x18, 0x60, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x00, 0x90, 0x11,\n\t0x08, 0x56, 0x00, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x00, 0x2c, 0x20, 0x32, 0x39,\n\t0x20, 0x4a, 0x75, 0x6e, 0x00, 0x65, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x00, 0x20, 0x43,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x40, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x02, 0x28, 0x20,\n\t0x00, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x00, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,\n\t0x46, 0x6f, 0x20, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x00, 0x7a, 0x2c, 0x20, 0x00, 0x49, 0x6e, 0x63,\n\t0x2e, 0x20, 0x3c, 0x68, 0x74, 0x00, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x66, 0x73, 0x66, 0x00, 0x2e,\n\t0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x40, 0x45, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x00, 0x54,\n\t0x69, 0x00, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x00, 0x74, 0x65, 0x64, 0x20, 0x74,\n\t0x6f, 0x20, 0x63, 0x01, 0x00, 0x5d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x00, 0x73, 0x74,\n\t0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2a, 0x20, 0x00, 0x2b, 0x62, 0x00, 0x4f, 0x6d, 0x01, 0x1c,\n\t0x69, 0x65, 0x00, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x01, 0x00, 0x39, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x08, 0x74,\n\t0x2c, 0x20, 0x00, 0x2f, 0x20, 0x63, 0x68, 0x61, 0x00, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x69,\n\t0x74, 0x02, 0x20, 0x00, 0x12, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x80, 0x6c, 0x6f, 0x77, 0x65,\n\t0x64, 0x2e, 0x0a, 0x80, 0x5f, 0xbc, 0x20, 0x54, 0x01, 0x1d, 0x80, 0x29, 0x82, 0x6f, 0x02, 0x25,\n\t0x65, 0x83, 0x93, 0x00, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x00, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x12, 0x62, 0x80, 0x2f, 0x20, 0x4c, 0x84, 0x31, 0x69, 0x6e, 0x63,\n\t0x80, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x80, 0x40, 0xa0, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x00, 0x5b, 0x73, 0x02, 0x55, 0xa0, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x81, 0x77, 0x73, 0x81, 0x4c,\n\t0x5d, 0x85, 0x2c, 0x33, 0x03, 0x53, 0x83, 0x2d, 0x0b, 0x2a, 0x0a, 0x04, 0x2a, 0x2c, 0x80, 0x20,\n\t0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x81, 0x5d, 0x09, 0x00, 0x7f, 0x62, 0x79, 0x00, 0x6b, 0x65,\n\t0x20, 0x61, 0x64, 0x17, 0x83, 0x26, 0x80, 0x41, 0x02, 0x8d, 0x73, 0x01, 0x54, 0x73, 0x20, 0x6c,\n\t0x1b, 0x00, 0x88, 0x01, 0x12, 0x65, 0x00, 0x65, 0x00, 0x64, 0x20, 0x20, 0x30, 0x08, 0x2e, 0x20,\n\t0x41, 0x07, 0x15, 0x44, 0x65, 0x66, 0x69, 0x06, 0x6e, 0x83, 0x42, 0x82, 0x0e, 0x41, 0x73, 0x20,\n\t0x75, 0x73, 0x01, 0xc0, 0x0b, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x0c, 0x20, 0x22, 0x42,\n\t0x4c, 0x04, 0x1e, 0x22, 0x20, 0x72, 0x65, 0xae, 0x66, 0x40, 0x78, 0x41, 0x5c, 0xd2, 0x2b, 0x4c,\n\t0xc2, 0x42, 0x0a, 0xd3, 0x42, 0x16, 0x2c, 0x42, 0x3d, 0xc1, 0x40, 0x22, 0xc1, 0x97, 0x47, 0x50,\n\t0x4c, 0x27, 0xdd, 0x13, 0x14, 0x12, 0x02, 0x2a, 0x22, 0x54, 0x00, 0x53, 0x4c, 0x69, 0xa0, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0xc9, 0x11, 0x61, 0x80, 0x7b, 0x03, 0xc0, 0x26, 0x80, 0x30, 0x77, 0x6f,\n\t0x72, 0x6b, 0x20, 0x67, 0x7a, 0x6f, 0x00, 0x03, 0x6e, 0x40, 0x03, 0x42, 0x49, 0xc0, 0x75, 0xc5,\n\t0x50, 0x0a, 0x4a, 0x6f, 0x40, 0x22, 0x72, 0x40, 0x4e, 0x61, 0x6e, 0xc0, 0x25, 0x20, 0x12, 0x41,\n\t0x00, 0x54, 0x69, 0x63, 0x82, 0x9f, 0x20, 0x6f, 0x72, 0x44, 0x20, 0x61, 0xc0, 0xab, 0x6d, 0x62,\n\t0x69, 0x01, 0x0e, 0x57, 0xe1, 0x81, 0x11, 0x61, 0x73, 0x20, 0x64, 0x41, 0x4a, 0x01, 0x12, 0x46,\n\t0x52, 0x50, 0x41, 0x6e, 0x20, 0x22, 0xc8, 0x0d, 0x22, 0x81, 0x8d, 0x61, 0x08, 0x6e, 0x79, 0x20,\n\t0x02, 0x1e, 0x74, 0x68, 0x61, 0x74, 0xe0, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x02, 0x54, 0x01, 0x75,\n\t0x00, 0x1a, 0x04, 0x69, 0x6e, 0x80, 0x7f, 0x66, 0x61, 0x63, 0x65, 0x20, 0x00, 0x70, 0x72, 0x6f,\n\t0x76, 0x69, 0x64, 0x65, 0x64, 0x0e, 0x0a, 0x44, 0x6f, 0x44, 0x32, 0x83, 0xa2, 0x77, 0x68, 0x69,\n\t0x63, 0x26, 0x68, 0x05, 0xa1, 0xc2, 0x29, 0x77, 0x69, 0xc0, 0xab, 0x62, 0x61, 0x4f, 0x41, 0x66,\n\t0x40, 0xd7, 0xc1, 0x50, 0x04, 0x0c, 0x2e, 0x0a, 0x43, 0x70, 0x6e, 0x02, 0x67, 0xc0, 0x2c, 0x73,\n\t0x75, 0x62, 0x63, 0x6c, 0x61, 0xfe, 0x73, 0xc2, 0x93, 0xc0, 0x41, 0x82, 0x02, 0x86, 0x2d, 0x43,\n\t0x89, 0x84, 0x0d, 0x01, 0x17, 0x14, 0x64, 0x65, 0x40, 0x90, 0x64, 0x80, 0x0d, 0x6d, 0x6f, 0x64,\n\t0x64, 0x65, 0x0a, 0x40, 0xb4, 0x75, 0x73, 0x81, 0xbf, 0xd2, 0x14, 0x20, 0xc3, 0xcb, 0x14, 0x43,\n\t0x45, 0x20, 0x22, 0x43, 0x6f, 0x88, 0x24, 0xe3, 0x1f, 0xa3, 0xa3, 0x1f, 0xc0, 0x1b, 0x64, 0x75,\n\t0x63, 0xc3, 0x2e, 0x63, 0x82, 0x04, 0x43, 0x41, 0x0b, 0x00, 0x2b, 0x6c, 0x69, 0x6e, 0x6b, 0xa3,\n\t0x0c, 0x0a, 0xa1, 0x49, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x60, 0x31, 0x65, 0xe0, 0x66, 0x19, 0x22,\n\t0x3a, 0x2e, 0x20, 0xe0, 0x6d, 0xa0, 0x24, 0x61, 0x72, 0x74, 0xc0, 0x69, 0x63, 0x75, 0x6c, 0x61,\n\t0x72, 0xa1, 0x79, 0x29, 0x6f, 0x3d, 0xe4, 0x18, 0x0a, 0x02, 0x07, 0xe3, 0x25, 0xa1, 0x22, 0x0a,\n\t0x12, 0x20, 0x77, 0x21, 0xc0, 0x36, 0x6d, 0x61, 0x64, 0x65, 0xa1, 0x1d, 0x61, 0x6c, 0x9e, 0x73,\n\t0xc0, 0x84, 0x20, 0x7a, 0x80, 0x12, 0x21, 0x05, 0x22, 0x4c, 0x20, 0x11, 0x9b, 0xe0, 0x2f, 0x24,\n\t0x96, 0x22, 0x42, 0x1a, 0x61, 0x4a, 0x22, 0x4d, 0x00, 0x62, 0x02, 0x6d, 0xa0, 0x68, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x06, 0x70, 0xa1, 0x74, 0xa0, 0x2b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x10,\n\t0x65, 0x22, 0x20, 0x66, 0xb0, 0x43, 0x6d, 0x65, 0x61, 0x74, 0x6e, 0x73, 0xc1, 0x17, 0x0a, 0x71,\n\t0x06, 0x42, 0x06, 0x8e, 0x13, 0x2c, 0x80, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x83, 0x21,\n\t0xf8, 0x79, 0x20, 0x73, 0xe2, 0x0b, 0x80, 0x57, 0x60, 0x31, 0x61, 0x0c, 0x60, 0x86, 0xb7, 0x66,\n\t0x83, 0x8e, 0x07, 0x60, 0x0d, 0x61, 0xc0, 0x96, 0x20, 0x88, 0x73, 0x80, 0x48, 0x92, 0x72, 0x40,\n\t0x1a, 0x69, 0x6e, 0x80, 0x1c, 0x6f, 0x6c, 0x02, 0x58, 0xf1, 0x00, 0x6d, 0x72, 0x65, 0x0a, 0xaa,\n\t0x45, 0x68, 0x2d, 0xc3, 0x70, 0xc1, 0x9b, 0xf9, 0x26, 0x49, 0x6e, 0x6b, 0x20, 0x08, 0x04, 0x21,\n\t0xe7, 0x20, 0x6b, 0x19, 0xa9, 0x35, 0x06, 0x43, 0x00, 0x46, 0x3d, 0x21, 0x6f, 0x62, 0x6a, 0x65,\n\t0x63, 0xf6, 0x74, 0xe2, 0x19, 0xe1, 0x7e, 0x2f, 0xc0, 0x26, 0x48, 0x1c, 0x66, 0x22, 0x0a, 0x13,\n\t0x27, 0x80, 0xa5, 0x28, 0x22, 0x80, 0xc1, 0x61, 0x0a, 0x61, 0xba, 0x75, 0x74, 0x20, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x61, 0x66, 0x67, 0x72, 0x80, 0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x40,\n\t0x67, 0x39, 0x62, 0x08, 0x72, 0x65, 0x43, 0x4d, 0xc1, 0x28, 0xcf, 0x24, 0x66, 0x72, 0x7c, 0x6f,\n\t0x6d, 0xe2, 0x32, 0xca, 0x0c, 0xa1, 0xbd, 0x87, 0x2f, 0xa1, 0x06, 0x53, 0xe0, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x84, 0x4f, 0x60, 0xc5, 0x65, 0xb0, 0x03, 0xca, 0x49, 0x22, 0x23, 0x31, 0x2e, 0x20,\n\t0x45, 0x78, 0x63, 0xec, 0x65, 0x70, 0x61, 0x33, 0xc1, 0xa0, 0x53, 0x80, 0x1c, 0x02, 0xde, 0x45,\n\t0x06, 0xa3, 0x44, 0x9b, 0x82, 0x05, 0x59, 0x6f, 0x75, 0x40, 0x80, 0x79, 0x80, 0x20, 0xd0, 0x6e,\n\t0x76, 0x65, 0x79, 0x20, 0x6d, 0x63, 0xa1, 0x91, 0x60, 0x2d, 0x17, 0x22, 0x84, 0xc0, 0xdd, 0xe0,\n\t0xc6, 0x73, 0x03, 0x08, 0x73, 0x20, 0x33, 0x39, 0xc1, 0x24, 0x20, 0x34, 0xe3, 0x08, 0x07, 0x95,\n\t0x22, 0x5c, 0x6f, 0x75, 0xd0, 0x74, 0x20, 0x62, 0x65, 0x61, 0x1c, 0x62, 0xa1, 0xe4, 0xa1, 0x71,\n\t0x9f, 0xe4, 0x06, 0xc0, 0x06, 0x68, 0xd1, 0x60, 0xaa, 0x02, 0x0f, 0x32, 0x2e, 0xe0, 0x97, 0x03,\n\t0x61, 0x0e, 0x41, 0x06, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x85, 0x27, 0x3c, 0x73, 0x42, 0x04,\n\t0x49, 0x66, 0x20, 0x79, 0xc1, 0x13, 0x73, 0x81, 0x03, 0x43, 0x13, 0x70, 0x79, 0x65, 0x18, 0xc4,\n\t0x35, 0x92, 0x22, 0x2c, 0xe6, 0x20, 0xa0, 0x25, 0x90, 0x02, 0x72, 0x20, 0x60, 0x42, 0x70, 0x04,\n\t0x33, 0x52, 0x3a, 0x73, 0xb0, 0x01, 0x0a, 0x80, 0x4c, 0x83, 0x19, 0x57, 0x61, 0x61, 0x20, 0xf0,\n\t0x66, 0x75, 0x6e, 0x63, 0xc2, 0x11, 0x00, 0x1f, 0x11, 0x1c, 0x41, 0x12, 0x7c, 0x62, 0x65, 0x13,\n\t0x6b, 0x41, 0x08, 0x80, 0x44, 0x10, 0x46, 0xf8, 0x18, 0x0a, 0xd7, 0x92, 0x52, 0x40, 0x67, 0x12,\n\t0x34, 0x20, 0x46, 0x05, 0x28, 0x09, 0x5a, 0x11, 0x73, 0x90, 0x20, 0x61, 0x72, 0x67, 0xf2, 0x7a,\n\t0x20, 0x70, 0x30, 0x4e, 0x71, 0x51, 0x14, 0x68, 0x65, 0x6e, 0xd2, 0x1d, 0x36, 0x03, 0x60, 0x13,\n\t0x69, 0x48, 0x6e, 0x76, 0x6f, 0xe0, 0x2c, 0x29, 0x2c, 0x91, 0x01, 0x6e, 0xfd, 0x33, 0x0e, 0x61,\n\t0x2a, 0x18, 0x77, 0x0e, 0x13, 0x0d, 0x40, 0x40, 0x30, 0x62, 0xc1, 0x45, 0xc2, 0x3a, 0x71, 0x7e,\n\t0x20, 0x61, 0x29, 0x20, 0xa3, 0x19, 0xa9, 0x6f, 0x7e, 0x2c, 0x16, 0x5b, 0x70, 0x05, 0x90, 0x5d,\n\t0xb2, 0x13, 0xd0, 0x5d, 0x40, 0x1d, 0x67, 0x98, 0x6f, 0x6f, 0x64, 0x60, 0x0b, 0x11, 0x4c, 0x65,\n\t0x66, 0xa0, 0x3b, 0xee, 0x74, 0x20, 0x0f, 0xf1, 0x91, 0x30, 0x86, 0x75, 0x70, 0x8d, 0xe1, 0x0d,\n\t0x42, 0x14, 0x39, 0x81, 0x26, 0x65, 0x76, 0xf0, 0x86, 0x80, 0x1e, 0xfa, 0x66, 0x64, 0x6f, 0xff,\n\t0x40, 0x62, 0x01, 0x39, 0x62, 0x7d, 0x72, 0x5a, 0xf1, 0x03, 0x9d, 0x14, 0x12, 0x0d, 0xf7, 0x11,\n\t0xa2, 0x73, 0x50, 0x31, 0x6c, 0x20, 0x6f, 0xb0, 0x7e, 0x61, 0xb0, 0x85, 0x17, 0xb2, 0x1a, 0x31,\n\t0x91, 0x00, 0x08, 0x6d, 0xb0, 0x8e, 0x20, 0x20, 0x77, 0x4b, 0x00, 0x68, 0xe0, 0x06, 0x72, 0xd0,\n\t0x12, 0x72, 0x74, 0x91, 0x1d, 0x69, 0x1a, 0x74, 0x40, 0x93, 0x75, 0xc0, 0x88, 0xa0, 0x64, 0x72,\n\t0x65, 0x6d, 0x1c, 0x61, 0x69, 0x30, 0x4b, 0x91, 0x4b, 0x30, 0x22, 0x66, 0x75, 0x6c, 0x36, 0x2c,\n\t0x60, 0x6f, 0xe2, 0x0f, 0x62, 0xe7, 0x0f, 0x44, 0x88, 0x50, 0x4c, 0xf4, 0x2c, 0x20, 0x72, 0x56,\n\t0x6e, 0xa1, 0x97, 0xe4, 0x26, 0xef, 0x86, 0x60, 0x30, 0x27, 0x91, 0x67, 0xa1, 0x0b, 0x99, 0x13,\n\t0x20, 0x61, 0xa3, 0x75, 0x62, 0x6c, 0x1d, 0xc0, 0x8f, 0x6f, 0xd3, 0x13, 0xe1, 0x9a, 0x52, 0x28,\n\t0x33, 0x2e, 0x20, 0xee, 0x4f, 0x83, 0x42, 0x31, 0x45, 0x71, 0x9f, 0x6f, 0xd3, 0x92, 0x82, 0x2b,\n\t0x80, 0x0d, 0x1c, 0x72, 0x69, 0x90, 0x58, 0x62, 0x3c, 0x44, 0x29, 0x20, 0x48, 0x65, 0x81, 0x10,\n\t0x5d, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x93, 0x2c, 0xff, 0x41, 0x5b, 0xd9, 0x46, 0x11, 0x10,\n\t0xf1, 0x0e, 0x6b, 0x26, 0x82, 0x38, 0xd8, 0x98, 0xf0, 0x00, 0x43, 0xb0, 0x78, 0xd5, 0x05, 0x0a,\n\t0x61, 0x20, 0x68, 0x73, 0x05, 0x66, 0xf7, 0x70, 0x05, 0x43, 0x0a, 0xc0, 0x24, 0x70, 0xf0, 0x67,\n\t0xa1, 0x04, 0xa1, 0x1b, 0xf4, 0x07, 0x33, 0x90, 0x69, 0x6c, 0x3d, 0x73, 0x75, 0xc0, 0x7a, 0x03,\n\t0x08, 0x0a, 0x63, 0x1f, 0x90, 0x51, 0xd5, 0x23, 0x82, 0x9e, 0xd0, 0x12, 0xc2, 0x33, 0x63, 0x68,\n\t0x6f, 0x3f, 0x10, 0xa1, 0x5c, 0x24, 0x60, 0x21, 0x21, 0xa9, 0xf0, 0x69, 0x57, 0xa2, 0x64, 0x0a,\n\t0xce, 0x6d, 0x65, 0x0f, 0x00, 0x08, 0x51, 0x21, 0x6c, 0x69, 0x70, 0xae, 0xe0, 0x2e, 0x55, 0x60,\n\t0xae, 0x6e, 0xf0, 0x2f, 0x72, 0x60, 0x8a, 0x6c, 0x41, 0x1d, 0x61, 0x3c, 0x6d, 0x65, 0x10, 0x0c,\n\t0x90, 0x38, 0x62, 0x36, 0x60, 0xaf, 0x75, 0x63, 0xe2, 0x74, 0x00, 0x27, 0x0a, 0x6c, 0x61, 0x10,\n\t0x07, 0xb0, 0x1e, 0xa1, 0x53, 0xc8, 0x61, 0x63, 0x63, 0x20, 0x99, 0x6f, 0x72, 0x50, 0x02, 0x01,\n\t0x58, 0x45, 0x60, 0x6d, 0x6c, 0x80, 0x0f, 0x63, 0x72, 0x6f, 0x00, 0x01, 0x69, 0xba, 0x6e, 0xc0,\n\t0x78, 0x65, 0x06, 0x3b, 0x43, 0xa9, 0x60, 0x50, 0x70, 0x50, 0x64, 0x19, 0xc0, 0xaa, 0x28, 0x74,\n\t0xd0, 0x35, 0x40, 0x03, 0x66, 0x65, 0x77, 0x0b, 0x60, 0x4a, 0xa1, 0x02, 0x73, 0xa1, 0x40, 0x6c,\n\t0x65, 0x6e, 0x67, 0x9c, 0x74, 0x68, 0xe0, 0x35, 0x40, 0x06, 0x10, 0xb4, 0x20, 0x62, 0x60, 0x3a,\n\t0x39, 0x25, 0x12, 0x66, 0x6f, 0x01, 0xb3, 0xa0, 0x1b, 0x86, 0x34, 0x47, 0x69, 0x8a, 0x76, 0xb2,\n\t0x8e, 0x6d, 0xa0, 0x94, 0x6e, 0x74, 0x20, 0xe0, 0x0c, 0xf3, 0x50, 0x10, 0xc3, 0x24, 0x65, 0x61,\n\t0x60, 0x13, 0x72, 0xbb, 0x14, 0x25, 0x39, 0x1c, 0xff, 0x32, 0x41, 0x50, 0x17, 0xc1, 0x24, 0x85,\n\t0x1f, 0xe0, 0x10, 0xa2, 0xa9, 0xa1, 0x6e, 0xb0, 0xb9, 0x7f, 0xc0, 0xbe, 0x55, 0x02, 0x55, 0x83,\n\t0x12, 0x54, 0x61, 0x2e, 0x70, 0x02, 0xd0, 0x42, 0x65, 0xbf, 0xd1, 0x03, 0x25, 0x57, 0x02, 0x8c,\n\t0x20, 0x04, 0xf4, 0x9f, 0xd2, 0x27, 0x20, 0xb0, 0x2e, 0xf4, 0x41, 0x63, 0xf0, 0x89, 0x70, 0x61,\n\t0x9b, 0x41, 0x1e, 0x39, 0x08, 0x22, 0x2f, 0xff, 0xe1, 0xa4, 0x07, 0x43, 0xc4, 0x5d, 0x72, 0x06,\n\t0x32, 0x2e, 0xa4, 0xc4, 0x81, 0x06, 0xd5, 0xc4, 0xfd, 0x92, 0x05, 0x34, 0x01, 0x58, 0xb8, 0x91,\n\t0x93, 0x2a, 0xfe, 0x60, 0xeb, 0x8a, 0x54, 0x47, 0xc7, 0x7f, 0x23, 0x80, 0x33, 0xc0, 0x3c, 0x2c,\n\t0x0a, 0x74, 0x00, 0x47, 0x10, 0x4f, 0x28, 0x6f, 0x67, 0x65, 0xb0, 0x0a, 0x72, 0x10, 0x84, 0x66,\n\t0x66, 0xe1, 0xd1, 0x63, 0x76, 0x65, 0x6c, 0x79, 0xa1, 0x18, 0xc1, 0x22, 0x10, 0x8b, 0x6f, 0xf0,\n\t0xcf, 0x80, 0x77, 0xd9, 0x5a, 0xf4, 0x19, 0x0a, 0x3d, 0x85, 0x95, 0x15, 0x63, 0xf8, 0x6f, 0x6e,\n\t0x74, 0xe0, 0x40, 0x30, 0x26, 0xb0, 0x15, 0x61, 0x10, 0x7b, 0x09, 0xc5, 0x81, 0x24, 0x72, 0xa1,\n\t0x44, 0x73, 0x65, 0x0a, 0xd0, 0x1f, 0xa0, 0x1c, 0x1c, 0x65, 0x72, 0xf1, 0x39, 0x80, 0x36, 0x50,\n\t0xb1, 0x62, 0x75, 0x67, 0x7e, 0x67, 0xd1, 0x00, 0x62, 0x30, 0x59, 0x07, 0x21, 0x26, 0x43, 0x66,\n\t0xb2, 0x97, 0x64, 0xe4, 0x6f, 0x20, 0x22, 0x1f, 0x6f, 0x66, 0x10, 0x5f, 0x60, 0x27, 0xbf, 0x22,\n\t0xff, 0xbf, 0x22, 0x80, 0xb2, 0x52, 0x18, 0xbe, 0x22, 0x0b, 0x0a, 0x71, 0x20, 0x21, 0x18, 0xa1,\n\t0x0b, 0x7f, 0xdf, 0x22, 0x01, 0xdd, 0x21, 0x0c, 0xdf, 0x22, 0x20, 0x24, 0xdf, 0x22, 0x80, 0xcf,\n\t0x64, 0xfb, 0xe3, 0xae, 0xdf, 0x22, 0x20, 0xdb, 0x22, 0x5b, 0x08, 0xff, 0x22, 0xf2, 0xe1, 0x30,\n\t0x79, 0xc7, 0xff, 0x22, 0xb0, 0xf3, 0xfa, 0x22, 0x20, 0x63, 0x29, 0x00, 0xf0, 0x7f, 0xc7, 0x91,\n\t0x32, 0x0b, 0x64, 0x69, 0x73, 0x30, 0x39, 0x79, 0x73, 0x70, 0x84, 0x37, 0x35, 0xf4, 0x83, 0x34,\n\t0x40, 0xc9, 0x75, 0x91, 0x18, 0xb1, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x63, 0x80, 0x92, 0x6f, 0x30,\n\t0xdb, 0x63, 0x94, 0x41, 0x23, 0x65, 0x07, 0x2e, 0x03, 0x86, 0x97, 0x75, 0x12, 0x61, 0x6d, 0x6f,\n\t0x6e, 0x67, 0x03, 0xc4, 0x13, 0x80, 0x61, 0x6e, 0x73, 0xb7, 0x00, 0x6f, 0x74, 0x69, 0x63, 0x65,\n\t0x73, 0x2c, 0x20, 0x80, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x01, 0x70, 0x00, 0x61, 0x20,\n\t0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x00, 0x6e, 0x63, 0x65, 0x20, 0x64, 0x69, 0x72, 0x65, 0x00,\n\t0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x00, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20,\n\t0x74, 0x02, 0x6f, 0x01, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x80, 0x70, 0x69, 0x65, 0x73,\n\t0x20, 0x6f, 0x66, 0x02, 0x38, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x08, 0x61,\n\t0x6e, 0x64, 0x00, 0x1e, 0x69, 0x73, 0x20, 0x6c, 0x09, 0x00, 0xb2, 0x6e, 0x73, 0x00, 0x86, 0x6f,\n\t0x63, 0x75, 0x6d, 0x20, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x01, 0x68, 0x64, 0x29, 0x80, 0x20, 0x44,\n\t0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x05, 0x6e, 0x40, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x00, 0x62,\n\t0x3a, 0x03, 0x02, 0x1f, 0x00, 0x57, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x10, 0x6e, 0x76, 0x65,\n\t0x79, 0x02, 0x58, 0x4d, 0x69, 0x6e, 0x10, 0x69, 0x6d, 0x61, 0x6c, 0x00, 0x12, 0x72, 0x72, 0x65,\n\t0x20, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x01, 0x8f, 0x53, 0x6f, 0xc4, 0x75, 0x72, 0x00, 0xa0, 0x75,\n\t0x6e, 0x64, 0x01, 0x93, 0x00, 0x9c, 0x90, 0x74, 0x65, 0x72, 0x6d, 0x04, 0x8c, 0x69, 0x73, 0x01,\n\t0x69, 0x5d, 0x01, 0x49, 0x4c, 0x03, 0x83, 0x00, 0xdf, 0x02, 0x95, 0x65, 0x0c, 0x44, 0x41, 0x04,\n\t0x70, 0x70, 0x80, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x01, 0x80, 0x0c, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x05, 0x20, 0x73, 0x75, 0xc0, 0x69, 0x74,\n\t0x61, 0x62, 0x6c, 0x65, 0x01, 0x0a, 0x83, 0x22, 0x03, 0x84, 0x38, 0x82, 0x36, 0x74, 0x68, 0x61,\n\t0x74, 0x20, 0x70, 0xf1, 0x00, 0x05, 0x69, 0x74, 0x2c, 0x82, 0x55, 0x84, 0x90, 0x85, 0x1e, 0x00,\n\t0x9e, 0x50, 0x6f, 0x6d, 0x62, 0x69, 0x01, 0x76, 0x72, 0x80, 0xaa, 0x6c, 0x18, 0x69, 0x6e, 0x6b,\n\t0x02, 0x13, 0x89, 0x3b, 0x77, 0x69, 0x74, 0x02, 0x68, 0x00, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66,\n\t0x69, 0x80, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x81, 0x47, 0x6c, 0x6f, 0x66, 0x85, 0x22,\n\t0x01, 0xbd, 0x4c, 0x00, 0x1d, 0x00, 0x0e, 0x56, 0x83, 0x04, 0x0e, 0x00, 0xc2, 0x70, 0x72, 0x6f,\n\t0x64, 0x75, 0x80, 0x80, 0x14, 0x61, 0x20, 0x06, 0x1d, 0x43, 0x03, 0x36, 0x64, 0x20, 0x57, 0x70,\n\t0x6f, 0x72, 0x6b, 0x2c, 0x01, 0x66, 0x00, 0x1d, 0x85, 0x22, 0x6d, 0x08, 0x61, 0x6e, 0x6e, 0x00,\n\t0x95, 0x73, 0x70, 0x65, 0x63, 0x61, 0x03, 0x34, 0x62, 0x79, 0x20, 0x73, 0x01, 0xee, 0xc0, 0x3e,\n\t0x36, 0x3f, 0x0d, 0x71, 0x80, 0x40, 0x80, 0x77, 0x81, 0x60, 0xc0, 0x5a, 0x45, 0x10, 0x43, 0x6f,\n\t0x87, 0x0f, 0x60, 0x03, 0x75, 0x81, 0x5a, 0x31, 0x29, 0x20, 0x55, 0x40, 0x7b, 0x84, 0x61, 0x20,\n\t0x86, 0x4c, 0x73, 0x68, 0x61, 0x72, 0xc0, 0x2c, 0x00, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x00, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0xe6, 0x6d, 0xc1, 0x52, 0x40, 0x87,\n\t0x6e, 0x6b, 0xc1, 0x71, 0x82, 0x3f, 0x88, 0x29, 0xc2, 0x4c, 0x43, 0x0b, 0x2e, 0x20, 0x20, 0x41,\n\t0x47, 0x12, 0x87, 0x0e, 0x47, 0xc0, 0x95, 0xc1, 0x8e, 0x02, 0x5e, 0x28, 0x61, 0x29, 0x81, 0xa4,\n\t0x73, 0x02, 0x20, 0x00, 0x61, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0xd4, 0x6d, 0x65, 0xc5, 0x2a,\n\t0x61, 0x41, 0xa7, 0x79, 0x85, 0x35, 0x04, 0x15, 0x00, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64,\n\t0x79, 0x3c, 0x20, 0x70, 0x00, 0x92, 0x40, 0xa4, 0x80, 0xa1, 0x46, 0x6d, 0x27, 0x73, 0x31, 0x40,\n\t0x0c, 0x6d, 0x70, 0x75, 0x80, 0x91, 0xc5, 0x10, 0x73, 0x79, 0x10, 0x73, 0x74, 0x65, 0x6d, 0x43,\n\t0x7d, 0x28, 0x62, 0x29, 0x28, 0x20, 0x77, 0x69, 0x00, 0xc8, 0x6f, 0x80, 0x7b, 0x61, 0x74, 0xe6,\n\t0x65, 0x80, 0x10, 0x41, 0x02, 0x6c, 0x79, 0x40, 0x05, 0xd2, 0x6f, 0x05, 0x11, 0x4f, 0x44, 0xc7,\n\t0x45, 0x20, 0x02, 0x2e, 0x00, 0x31, 0x69, 0x6e, 0x00, 0x1a, 0x66, 0x00, 0x61, 0x63, 0x65, 0x2d,\n\t0x63, 0x6f, 0x6d, 0x70, 0xf7, 0x40, 0xa0, 0xc1, 0x98, 0xc5, 0x42, 0x20, 0x43, 0x7b, 0x85, 0x10,\n\t0x04, 0x7d, 0x83, 0x5a, 0x00, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x01, 0x00, 0xab,\n\t0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x19, 0x83, 0xaf, 0x49, 0x6e, 0x81, 0xad, 0xc2, 0x02,\n\t0x2c, 0x20, 0x62, 0x0c, 0x75, 0x74, 0xc0, 0x36, 0x00, 0x27, 0x69, 0x66, 0x20, 0x79, 0x00, 0x6f,\n\t0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x84, 0x20, 0x6f, 0x80, 0x59, 0x72, 0x77, 0x69, 0x73,\n\t0x02, 0x49, 0x80, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0xc0, 0xf7, 0x0d, 0xc0, 0x75, 0x6f,\n\t0xc1, 0x19, 0x62, 0x0a, 0x73, 0x75, 0x63, 0x68, 0xfb, 0x00, 0x47, 0x66, 0x09, 0x20, 0xc3, 0x5d,\n\t0x0d, 0x45, 0x41, 0x13, 0x04, 0x7e, 0xe3, 0x23, 0x0c, 0x6f, 0x6e, 0xa0, 0x0d, 0x43, 0x83, 0x20,\n\t0x65, 0x78, 0x74, 0x4f, 0x81, 0x2b, 0x42, 0x1d, 0xee, 0x09, 0x63, 0x73, 0x6e, 0x65, 0xa0, 0x8e,\n\t0x73, 0x1b, 0xa1, 0x42, 0x60, 0x06, 0x69, 0xe3, 0x18, 0x22, 0x87, 0x65, 0x78, 0x65, 0xfe, 0x63,\n\t0x60, 0x30, 0x13, 0x62, 0x81, 0x35, 0x21, 0x0f, 0xea, 0x5c, 0x41, 0x17, 0x01, 0x61, 0xe4, 0x64,\n\t0x20, 0x00, 0x5a, 0x72, 0x65, 0xc0, 0x29, 0x00, 0x6e, 0x21, 0x4b, 0x5e, 0x6f, 0x45, 0x6e, 0x81,\n\t0x01, 0x24, 0x4c, 0x1f, 0x6f, 0x6e, 0x67, 0x46, 0x6e, 0xc2, 0x6b, 0x27, 0x6e, 0x2e, 0x20, 0x28,\n\t0x49, 0x02, 0x72, 0xc1, 0x29, 0x11, 0xa0, 0x7c, 0x20, 0x6f, 0x70, 0xa2, 0x86, 0x34, 0x64, 0x30,\n\t0x03, 0x23, 0x7f, 0x95, 0x31, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x64, 0x61, 0x63, 0xc2, 0x3c,\n\t0x6e, 0x79, 0xc1, 0x17, 0x60, 0x11, 0x20, 0x1f, 0x9a, 0x9a, 0x41, 0xa8, 0x8b, 0x6d, 0xe8, 0x16,\n\t0x03, 0x20, 0x64, 0x65, 0x2e, 0xcc, 0x20, 0x49, 0x83, 0x3b, 0xaa, 0x11, 0x31, 0x2c, 0x02, 0x3e,\n\t0x82, 0x0e, 0x7f, 0x20, 0x84, 0x62, 0x3a, 0xe1, 0x0d, 0xc9, 0x13, 0x21, 0x08, 0xc8, 0x45, 0xe4,\n\t0x84, 0x20, 0xff, 0x1f, 0x84, 0xa0, 0xac, 0x84, 0x3e, 0x41, 0x08, 0x60, 0x44, 0x40, 0x66, 0x64,\n\t0x84, 0x0c, 0xab, 0xc9, 0xa3, 0xb3, 0x2e, 0x29, 0x41, 0xba, 0x35, 0x2e, 0x80, 0x03, 0xa2, 0xa0,\n\t0x5e, 0x64, 0x00, 0x5b, 0x61, 0x81, 0xa0, 0xc6, 0x82, 0x59, 0x59, 0x40, 0x53, 0x6d, 0x7a, 0x61,\n\t0xc0, 0x71, 0x6c, 0x00, 0x61, 0x20, 0x82, 0xe3, 0x84, 0xa0, 0x62, 0x69, 0x78, 0x6c, 0x69, 0x74,\n\t0x41, 0xcb, 0x42, 0x48, 0x80, 0x88, 0xc0, 0x41, 0x77, 0xe1, 0x40, 0x9a, 0x20, 0x62, 0x61, 0x73,\n\t0x40, 0x32, 0x00, 0x96, 0x40, 0x1a, 0x7a, 0x0a, 0x45, 0x6a, 0x73, 0x61, 0x61, 0x81, 0x99, 0xe1,\n\t0x00, 0x02, 0xb8, 0x73, 0x87, 0x20, 0x3e, 0x40, 0xb6, 0x05, 0x8f, 0x74, 0x6f, 0x67, 0x65, 0x00,\n\t0x06, 0x2e, 0x72, 0x43, 0x75, 0xa2, 0x60, 0x85, 0x0d, 0x0a, 0x91, 0x0d, 0x6e, 0x6f, 0x7c, 0x74,\n\t0x20, 0x08, 0x2e, 0xe0, 0x8b, 0x80, 0xc7, 0xa1, 0x10, 0x01, 0x03, 0x63, 0xce, 0x6f, 0x00, 0xb4,\n\t0x80, 0x10, 0x00, 0x0e, 0x74, 0x68, 0x80, 0x59, 0x2a, 0xcc, 0xfe, 0x63, 0xa3, 0xd6, 0x82, 0x5e,\n\t0x21, 0x90, 0xa4, 0x1e, 0x05, 0x11, 0x49, 0xc7, 0xe0, 0x82, 0xc1, 0x40, 0x49, 0x72, 0x0a, 0x63,\n\t0x68, 0x6f, 0x60, 0xd4, 0x80, 0xb5, 0xe1, 0x83, 0x39, 0x64, 0x6f, 0x20, 0x62, 0x20, 0x14, 0x85,\n\t0x50, 0x8c, 0xe3, 0xfd, 0x00, 0x9e, 0x41, 0x25, 0x49, 0x22, 0x97, 0xa3, 0x5d, 0xc0, 0x11, 0x45,\n\t0x0c, 0x42, 0x88, 0x21, 0x8b, 0x9f, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x80, 0x72, 0x6b, 0xcf, 0xc3,\n\t0x27, 0x41, 0x37, 0x23, 0x28, 0xa4, 0x31, 0x79, 0x2c, 0x40, 0x3e, 0x86, 0x04, 0xbd, 0x03, 0x04,\n\t0x6e, 0xa0, 0x53, 0x22, 0x13, 0x75, 0x05, 0x77, 0x12, 0x2c, 0x01, 0x04, 0x9f, 0x83, 0x0e, 0x70,\n\t0x07, 0x24, 0x0d, 0xfd, 0x77, 0xa0, 0x05, 0x63, 0x65, 0xc0, 0x7f, 0xa3, 0x33, 0x4b, 0xb0, 0x53,\n\t0x47, 0x69, 0x76, 0x32, 0x53, 0x6d, 0xc0, 0x70, 0xf8, 0x6e, 0x74, 0x20, 0x90, 0x14, 0x50, 0x0f,\n\t0x03, 0x19, 0x70, 0x06, 0xa1, 0x57, 0x8d, 0x61, 0x72, 0x64, 0x46, 0x20, 0x92, 0x1f, 0x70, 0x61,\n\t0x72, 0x70, 0x4c, 0xb0, 0x66, 0x20, 0x69, 0x74, 0x31, 0x07, 0x50, 0x53, 0x61, 0x78, 0x0c, 0x07,\n\t0xc5, 0x5b, 0x64, 0x20, 0x63, 0x48, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x33, 0xf0, 0x82, 0x00, 0x8b,\n\t0x77, 0x68, 0x30, 0x8c, 0xd1, 0x8a, 0x66, 0x69, 0x9f, 0xe0, 0x1b, 0x40, 0x06, 0x31, 0x04, 0x76,\n\t0x38, 0x31, 0x41, 0x75, 0x6e, 0x56, 0x0f, 0x0f, 0xf1, 0x4e, 0x35, 0x17, 0xf6, 0x12, 0xc2, 0x0b,\n\t0x36, 0x2e, 0x20, 0x52, 0x64, 0x65, 0x76, 0x40, 0x53, 0x64, 0x20, 0x74, 0x58, 0x1a, 0x8f, 0x4c,\n\t0x64, 0x65, 0x73, 0x41, 0x91, 0x47, 0x65, 0xb0, 0x75, 0x30, 0x8a, 0x50, 0x2c, 0x75, 0x62, 0x00,\n\t0x85, 0xda, 0x0f, 0x54, 0xb0, 0x11, 0x46, 0x72, 0x00, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74,\n\t0x77, 0x79, 0x61, 0x24, 0x46, 0x6f, 0x50, 0x13, 0x53, 0x5b, 0xd2, 0x2f, 0x31, 0x03, 0x73, 0x2e,\n\t0x68, 0xe0, 0x58, 0x63, 0x06, 0xd0, 0x3f, 0x2f, 0xb0, 0x4b, 0x6e, 0x65, 0xf2, 0x77, 0xb5, 0x80,\n\t0x73, 0x0a, 0x54, 0x64, 0xd1, 0x37, 0x1f, 0x07, 0x18, 0x07, 0xe0, 0x20, 0x66, 0x72, 0x6f, 0x6d,\n\t0x82, 0x70, 0x72, 0x9a, 0x00, 0x71, 0xd8, 0x2e, 0x20, 0x53, 0x21, 0x5d, 0xd0, 0x04, 0x0a, 0x94,\n\t0x85, 0x90, 0x9e, 0x03, 0x81, 0x6c, 0x00, 0x60, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x02, 0x72,\n\t0x01, 0x40, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0xbf, 0x42, 0x03, 0xf0, 0x0a, 0xf5, 0x71, 0x14,\n\t0x03, 0x03, 0x65, 0xb0, 0x0a, 0x0a, 0x30, 0x8a, 0x03, 0xa0, 0xa1, 0x01, 0x03, 0x64, 0x65, 0x74,\n\t0x61, 0x69, 0x6c, 0x91, 0x01, 0x03, 0x61, 0x64, 0x64, 0xe0, 0x74, 0x73, 0x20, 0x01, 0x0b, 0x17,\n\t0x20, 0x47, 0x80, 0x6c, 0x71, 0x98, 0x72, 0xb1, 0x41, 0x63, 0x65, 0x72, 0x64, 0x6e, 0x73, 0x62,\n\t0x14, 0x45, 0x61, 0x70, 0x65, 0xe4, 0x04, 0x20, 0x8d, 0x90, 0x1c, 0x67, 0xf0, 0x20, 0xb1, 0x96,\n\t0x64, 0x69, 0x73, 0xe1, 0xa5, 0x30, 0x75, 0x69, 0x73, 0x68, 0x21, 0x19, 0x15, 0x02, 0x6e, 0x75,\n\t0xf0, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4e, 0x91, 0x1b, 0xa5, 0x3e, 0x50, 0xaa, 0x53, 0x40, 0x33,\n\t0x90, 0x12, 0x63, 0x65, 0xf0, 0x03, 0x64, 0x80, 0x21, 0x20, 0x9d, 0xf5, 0x8c, 0x73, 0xf0, 0x30,\n\t0x70, 0x80, 0xa0, 0x2f, 0x65, 0x72, 0x90, 0x09, 0xbc, 0x6e, 0x20, 0x23, 0x04, 0x20, 0x2a, 0x34,\n\t0x05, 0x3f, 0x14, 0x20, 0x5f, 0x1b, 0xe9, 0x31, 0x2b, 0x20, 0x22, 0xd0, 0x17, 0x61, 0x10, 0x30,\n\t0x90, 0x75, 0x00, 0x93, 0xf1, 0xe4, 0x03, 0x22, 0x0a, 0x61, 0xc1, 0xa2, 0xf0, 0xae, 0x11, 0x6b,\n\t0xe0, 0x9e, 0xf9, 0x81, 0x08, 0x68, 0x61, 0x50, 0x2d, 0x00, 0x0a, 0xd5, 0x60, 0x60, 0x1a, 0x16,\n\t0x3b, 0xaf, 0xf2, 0x39, 0x40, 0x7e, 0xc0, 0x10, 0x10, 0x1d, 0x0a, 0x10, 0x33, 0x64, 0x40, 0x4d,\n\t0x40, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x20, 0x03, 0x72, 0xdb, 0xe3, 0x26, 0x20, 0x0b, 0x70,\n\t0xf3, 0x1f, 0x97, 0x0a, 0x20, 0xf0, 0x07, 0x90, 0x04, 0x4d, 0x2e, 0x08, 0x0a, 0x97, 0x02, 0xd2,\n\t0x47, 0x65, 0x20, 0x7f, 0x25, 0x64, 0xdf, 0x72, 0x25, 0x85, 0x13, 0x80, 0x28, 0x33, 0x55, 0x83,\n\t0x13, 0x0a, 0xe0, 0x71, 0x86, 0x13, 0xdc, 0x64, 0x6f, 0xb0, 0x0c, 0x11, 0x4d, 0x13, 0x14, 0x79,\n\t0x30, 0x56, 0xa4, 0x0e, 0xf7, 0xa4, 0x13, 0xf5, 0x30, 0x47, 0x27, 0x0a, 0x0f, 0x13, 0x01, 0x13,\n\t0x24, 0x67, 0x80, 0x5c, 0xfd, 0xc0, 0x4c, 0x6f, 0x31, 0xa0, 0xc0, 0x13, 0xb5, 0x04, 0x80, 0x0c,\n\t0x01, 0x12, 0x4f, 0x04, 0xd2, 0x20, 0xbb, 0x32, 0x20, 0x65, 0x10, 0x03, 0x20, 0x1f, 0x0e, 0x9f,\n\t0x33, 0xff, 0x13, 0x0e, 0x91, 0x65, 0x00, 0x70, 0xb1, 0x05, 0xdf, 0x21, 0xdf, 0x21, 0xd5, 0x21,\n\t0x00, 0x2a, 0x00, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x31, 0x70, 0xb0, 0x64, 0x65,\n\t0x0a, 0x60, 0x42, 0x30, 0x04, 0x72, 0x20, 0xc0, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x16, 0x37,\n\t0xcf, 0x0f, 0xcb, 0xdf, 0x22, 0x12, 0x4e, 0x20, 0x50, 0xae, 0x6c, 0x6c, 0xc2, 0x21, 0x80, 0x54,\n\t0x61, 0x63, 0x4b, 0x72, 0x6f, 0x78, 0x79, 0xf0, 0xa4, 0xc2, 0x0c, 0x63, 0x2e, 0x20, 0x40, 0x9a,\n\t0x60, 0xa4, 0xe2, 0xa6, 0x66, 0x81, 0x80, 0x65, 0x70, 0x7c, 0x74, 0x61, 0xb1, 0xd5, 0x24, 0x1e,\n\t0x85, 0x12, 0xb0, 0x64, 0x91, 0xc4, 0x61, 0x02, 0x6e, 0x91, 0x02, 0x61, 0x75, 0x74, 0x68, 0x6f,\n\t0x72, 0xfc, 0x69, 0x7a, 0xb2, 0x0e, 0xf2, 0xb2, 0xe1, 0x26, 0x90, 0x27, 0x14, 0x16, 0x72, 0x06,\n\t0xdf, 0x95, 0x03, 0x81, 0x78, 0x30, 0x0c, 0x05, 0x71, 0xf0, 0x36, 0x00, 0x0f, 0x00, 0x1f, 0x01,\n\t0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01,\n\t0x1f, 0x01, 0xff, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f,\n\t0x01, 0x1f, 0x01, 0x1f, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1f, 0x01, 0x1a, 0x01, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0,\n\t0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f,\n\t0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00, 0xfc, 0x0f, 0x03, 0xb0, 0x02, 0x00,\n\t0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_compression_lzxpress_huffman_compressed_data1[ 4096 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x08, 0x00, 0xb0, 0x89, 0x00, 0xb7, 0x98, 0xa9, 0x9a, 0xba, 0xba, 0xb0, 0x0a, 0x0b, 0x0b,\n\t0x80, 0x8b, 0x8a, 0x89, 0x9b, 0x0b, 0x97, 0xba, 0x09, 0x8a, 0xa9, 0xaa, 0xa0, 0x00, 0x00, 0x00,\n\t0x50, 0x57, 0x46, 0x76, 0x56, 0x8a, 0x66, 0x55, 0xb6, 0x55, 0x65, 0x77, 0x69, 0x0b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x98, 0x0a, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0xb9, 0xa9, 0xaa, 0x0b, 0x00, 0x00, 0xbb,\n\t0x77, 0x89, 0x88, 0xa9, 0x9a, 0xbb, 0x0b, 0x90, 0x76, 0x87, 0xa9, 0xaa, 0xaa, 0x9a, 0xa0, 0x9a,\n\t0x76, 0x77, 0x98, 0x9a, 0xa9, 0xb9, 0xbb, 0x9a, 0x75, 0x78, 0xa8, 0xa9, 0xa9, 0xba, 0xab, 0x80,\n\t0x66, 0x77, 0x98, 0x09, 0x0a, 0xba, 0x00, 0xa0, 0x76, 0x78, 0x98, 0xa9, 0x0a, 0xa0, 0xab, 0xa0,\n\t0x80, 0x9a, 0xba, 0xbb, 0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x3b, 0xef, 0x00, 0xc0, 0xf0, 0xce, 0x50, 0xfc, 0x9b, 0xa3, 0x9f, 0x9f, 0xe2, 0x9b, 0x76, 0x06,\n\t0x87, 0x6f, 0xe2, 0x9b, 0xd1, 0x65, 0x2f, 0x0e, 0xf8, 0x8b, 0xf0, 0xe8, 0x03, 0xf3, 0x99, 0xf5,\n\t0x1e, 0xbe, 0x6b, 0x7e, 0x8b, 0x55, 0xbe, 0xfa, 0xa5, 0x30, 0x02, 0x41, 0x46, 0x83, 0xc3, 0x3b,\n\t0x40, 0xc0, 0xef, 0x96, 0x1f, 0x88, 0x13, 0xdc, 0x77, 0x07, 0x0e, 0x69, 0xdf, 0xcc, 0xa0, 0x11,\n\t0x44, 0xd4, 0x24, 0x58, 0xdd, 0xb3, 0x6f, 0x7c, 0x32, 0x0e, 0xd5, 0x44, 0x12, 0x3d, 0x43, 0x2e,\n\t0x0e, 0x12, 0xa9, 0xc2, 0x21, 0x27, 0x44, 0x8b, 0x6c, 0xea, 0xad, 0xc3, 0x01, 0x72, 0x39, 0xf0,\n\t0x83, 0xb5, 0xba, 0xe0, 0xc1, 0xf7, 0xef, 0x29, 0xee, 0xa4, 0xcc, 0x9e, 0x26, 0xf1, 0xff, 0x19,\n\t0x34, 0x05, 0xb5, 0x22, 0x31, 0xa6, 0xba, 0x40, 0x50, 0x7c, 0x29, 0x58, 0xcb, 0x0b, 0xb6, 0x16,\n\t0x40, 0xc0, 0xbb, 0xb6, 0x43, 0x99, 0x0d, 0x49, 0x4b, 0x42, 0xa9, 0x0a, 0xb1, 0xa5, 0xcc, 0x07,\n\t0x5d, 0x1a, 0xf9, 0x53, 0x61, 0x87, 0x40, 0x6e, 0x01, 0xd3, 0xd6, 0x28, 0xc6, 0x42, 0x9d, 0xa0,\n\t0x0d, 0xbe, 0xb0, 0x5d, 0x27, 0xad, 0x00, 0x2b, 0x00, 0x3d, 0xa4, 0x1e, 0x33, 0x19, 0x98, 0x58,\n\t0x61, 0x42, 0xa7, 0x8f, 0xc0, 0x8a, 0x3c, 0xde, 0xa2, 0x51, 0x53, 0x0e, 0xc0, 0x96, 0x36, 0xa8,\n\t0xeb, 0x47, 0xa3, 0x96, 0x83, 0xdd, 0x58, 0x15, 0x28, 0x52, 0x28, 0xc2, 0x19, 0x49, 0x71, 0x0e,\n\t0x1e, 0x34, 0x2c, 0x31, 0x9e, 0x89, 0x42, 0xcb, 0x8b, 0xc7, 0x90, 0x13, 0x2a, 0x12, 0x02, 0xc6,\n\t0x45, 0x6e, 0x09, 0x2e, 0x88, 0xea, 0x36, 0xac, 0xb4, 0x3b, 0xa8, 0x5d, 0x66, 0x94, 0x73, 0xcf,\n\t0x15, 0x3a, 0xa8, 0x5e, 0xe7, 0xd2, 0x5d, 0xb8, 0x4d, 0xe1, 0x4c, 0xfa, 0x38, 0xb5, 0x2a, 0xad,\n\t0xa8, 0x54, 0x00, 0x40, 0x30, 0xd9, 0xf0, 0x1f, 0x79, 0x51, 0xfa, 0x5c, 0x47, 0x8d, 0x40, 0x9d,\n\t0xe9, 0x4b, 0x18, 0x6a, 0x83, 0xa5, 0xb2, 0xf4, 0x40, 0x3a, 0x82, 0x18, 0x45, 0xc7, 0xe5, 0x03,\n\t0x24, 0x94, 0x81, 0x7e, 0x19, 0xfc, 0x82, 0x70, 0x21, 0x32, 0xc7, 0x86, 0xec, 0x7b, 0xf3, 0x41,\n\t0x2d, 0xab, 0x0a, 0xd1, 0x41, 0x98, 0x48, 0x03, 0xf4, 0xe1, 0x22, 0xa7, 0x96, 0x00, 0x39, 0x70,\n\t0x91, 0xa0, 0x52, 0xcb, 0x91, 0xc2, 0xa2, 0xc0, 0x8d, 0x03, 0xba, 0xc6, 0xfa, 0x0d, 0x94, 0x41,\n\t0x76, 0x2d, 0x6f, 0xb3, 0xd5, 0x22, 0x2d, 0xce, 0x72, 0x1e, 0xe2, 0x1c, 0x0e, 0x29, 0x6d, 0x05,\n\t0xe3, 0xc8, 0x9b, 0x48, 0xd4, 0x44, 0x44, 0x92, 0xcd, 0xc5, 0x92, 0x20, 0xc6, 0x77, 0x38, 0x72,\n\t0x50, 0x75, 0x00, 0x9d, 0x8f, 0xa6, 0x9f, 0x2a, 0x4d, 0xa4, 0xc5, 0x26, 0x16, 0x13, 0xcd, 0xdc,\n\t0x90, 0x06, 0xf2, 0xb8, 0x74, 0x48, 0xc6, 0x43, 0x32, 0x60, 0x51, 0xe4, 0x49, 0x31, 0x24, 0x6c,\n\t0x90, 0x10, 0x16, 0x23, 0xd2, 0x0f, 0x96, 0x36, 0x7b, 0x7c, 0x91, 0x03, 0xd8, 0x40, 0x55, 0xc8,\n\t0x4a, 0xd5, 0x38, 0xcb, 0x7e, 0x64, 0x64, 0xfc, 0x1b, 0x5e, 0xf1, 0x90, 0x5d, 0x05, 0x2d, 0x29,\n\t0x2c, 0xd2, 0x26, 0x1f, 0xdc, 0x80, 0xb7, 0x51, 0x5e, 0xab, 0x1e, 0x93, 0xf7, 0x4f, 0x51, 0x08,\n\t0x12, 0x08, 0x86, 0x8a, 0x5b, 0x6c, 0x95, 0x6a, 0xea, 0xdb, 0xd2, 0x3a, 0xa2, 0xaf, 0xba, 0xea,\n\t0xbb, 0x62, 0x21, 0xef, 0x28, 0x6d, 0x66, 0xaa, 0x29, 0x2c, 0xdc, 0x12, 0x0f, 0xd3, 0xba, 0xd1,\n\t0x56, 0x91, 0xbc, 0xd7, 0xae, 0xa6, 0x31, 0xe1, 0x46, 0x70, 0xe9, 0x05, 0xe2, 0x15, 0x60, 0x2b,\n\t0x20, 0xa1, 0x98, 0x47, 0xf4, 0xdb, 0xff, 0xdb, 0x2c, 0x2a, 0xd8, 0x3a, 0x84, 0xb0, 0x7a, 0xdc,\n\t0x43, 0xdf, 0xd3, 0x62, 0x70, 0x10, 0xd6, 0xa8, 0x38, 0x07, 0x53, 0x74, 0x41, 0x87, 0x00, 0xf1,\n\t0x3d, 0x64, 0x58, 0x23, 0x66, 0x4b, 0xa8, 0x03, 0x74, 0xf4, 0x5b, 0xdb, 0x77, 0xb7, 0x84, 0xcb,\n\t0x5d, 0x2d, 0xc9, 0xe4, 0x86, 0x78, 0x59, 0xd0, 0xc7, 0x99, 0xd3, 0xa1, 0xae, 0x55, 0xd8, 0xdd,\n\t0x32, 0x5e, 0x0f, 0x32, 0xb8, 0x21, 0xe1, 0x12, 0x31, 0x16, 0xb3, 0x88, 0x17, 0xa8, 0x90, 0xc7,\n\t0xc3, 0xf5, 0x62, 0xe9, 0x46, 0x5c, 0x83, 0xdd, 0x9c, 0xd2, 0x30, 0xb0, 0xff, 0x2a, 0x44, 0x6e,\n\t0xc9, 0x1b, 0xf9, 0x33, 0x10, 0x4f, 0x2e, 0x00, 0x29, 0x3c, 0x52, 0xc1, 0xf4, 0x07, 0x8b, 0x14,\n\t0x79, 0x15, 0x63, 0x07, 0x24, 0xa6, 0x8d, 0x45, 0xc6, 0x7c, 0xaa, 0x44, 0x6e, 0x19, 0xf1, 0x7d,\n\t0x11, 0x6c, 0x94, 0x25, 0xc4, 0xa8, 0x22, 0xcd, 0x10, 0x82, 0x34, 0xe8, 0xf9, 0x25, 0x85, 0x80,\n\t0x1c, 0x68, 0x73, 0xf8, 0x3c, 0x01, 0xec, 0x90, 0xba, 0x8a, 0x7f, 0x2d, 0x72, 0x1a, 0xed, 0x67,\n\t0x02, 0xa0, 0x1d, 0xc7, 0x03, 0xd0, 0x2b, 0x6b, 0xb6, 0x71, 0x8e, 0xb9, 0x02, 0x31, 0x70, 0x24,\n\t0x7b, 0x89, 0x65, 0x44, 0x20, 0xd1, 0x7e, 0x7d, 0x5d, 0xaf, 0xb1, 0x69, 0xa1, 0x92, 0x6e, 0xdc,\n\t0x52, 0x80, 0xb5, 0xd9, 0x66, 0x6e, 0xaa, 0x38, 0x4b, 0xa1, 0xf2, 0x2e, 0xe2, 0x4a, 0x42, 0x44,\n\t0x00, 0x5f, 0x8b, 0xbb, 0x08, 0xd9, 0xa8, 0xd2, 0xa3, 0x13, 0xa5, 0xfd, 0x1b, 0x51, 0x72, 0x24,\n\t0xf4, 0xd7, 0x15, 0xe9, 0x09, 0x74, 0x84, 0x7a, 0x26, 0x32, 0x41, 0xdf, 0x38, 0x29, 0x58, 0xbc,\n\t0x14, 0x0f, 0x2a, 0x91, 0x50, 0xed, 0xf8, 0xbd, 0xc8, 0xdf, 0xeb, 0x6f, 0xf6, 0x63, 0x3d, 0xc5,\n\t0xe8, 0x25, 0x17, 0x47, 0x12, 0xdc, 0x8b, 0x6c, 0x44, 0x23, 0x64, 0x8d, 0x33, 0x2b, 0x5c, 0xc6,\n\t0xa6, 0x57, 0xd2, 0x94, 0xd4, 0x47, 0x11, 0x07, 0x36, 0x6e, 0xc9, 0x56, 0x37, 0xd2, 0x76, 0xcd,\n\t0xfd, 0xd1, 0x40, 0xd6, 0x28, 0x71, 0x34, 0x7c, 0xe0, 0x5f, 0x5f, 0x36, 0xf4, 0xb1, 0x74, 0xdf,\n\t0x9f, 0xad, 0x96, 0x12, 0xec, 0x2f, 0x25, 0xd5, 0x3b, 0x8b, 0x27, 0x2c, 0xd6, 0x55, 0xd7, 0xe0,\n\t0x94, 0x7b, 0xbc, 0x19, 0x8c, 0x72, 0xda, 0x16, 0x41, 0x26, 0xe3, 0xf3, 0x79, 0xcb, 0xc1, 0x2f,\n\t0xa7, 0xf3, 0x6d, 0xb6, 0x5b, 0xf2, 0x22, 0xe4, 0x40, 0x19, 0xa4, 0x38, 0x3d, 0x05, 0x89, 0x41,\n\t0xa2, 0x96, 0x47, 0xcc, 0xea, 0x46, 0x13, 0xaa, 0x10, 0xa0, 0x4b, 0x9e, 0x56, 0xb0, 0x2a, 0x98,\n\t0x0e, 0x0e, 0x7f, 0x04, 0xd3, 0xbf, 0xca, 0x20, 0xa6, 0xec, 0x55, 0xcd, 0xdd, 0x32, 0x2b, 0x44,\n\t0x42, 0x0a, 0x0a, 0x66, 0x4d, 0xe9, 0x5e, 0x93, 0x72, 0xc7, 0x5a, 0xb1, 0x22, 0xfb, 0x6f, 0x1e,\n\t0xf6, 0x3d, 0x94, 0x54, 0x34, 0x96, 0x9f, 0xd2, 0x0d, 0x11, 0xc3, 0x99, 0xf8, 0x74, 0x68, 0x95,\n\t0x0d, 0xe7, 0x8a, 0xc0, 0xfe, 0xc9, 0xeb, 0x46, 0x82, 0x1b, 0x3f, 0x2d, 0x5c, 0x07, 0x2d, 0x22,\n\t0x55, 0x81, 0x6d, 0xb9, 0x24, 0x25, 0xe5, 0x1f, 0x52, 0x90, 0x8b, 0x60, 0x71, 0x74, 0x08, 0xa7,\n\t0xb3, 0x5b, 0xed, 0x29, 0xc4, 0x42, 0x21, 0x07, 0x6e, 0x39, 0xc9, 0x0e, 0xdc, 0xe2, 0x56, 0x98,\n\t0x69, 0xc9, 0x1a, 0x0e, 0xc8, 0xca, 0x44, 0x59, 0x50, 0x99, 0xa7, 0x9e, 0x4b, 0xbb, 0x8b, 0x74,\n\t0x75, 0x9a, 0xa1, 0xd8, 0x31, 0x07, 0xf2, 0x5d, 0x36, 0x3e, 0x53, 0x85, 0x84, 0x34, 0x38, 0x4d,\n\t0x13, 0x5f, 0x20, 0xac, 0xa6, 0x22, 0xaa, 0x42, 0x27, 0xba, 0x7b, 0x0b, 0x7d, 0xde, 0xa6, 0x0c,\n\t0x2a, 0x11, 0x8c, 0x21, 0x9a, 0xfc, 0x8a, 0x1c, 0xb6, 0x3e, 0x75, 0x42, 0xfd, 0x60, 0x1a, 0x5d,\n\t0xa5, 0xd4, 0x6a, 0x01, 0x54, 0x0a, 0x1f, 0x64, 0x9b, 0xc1, 0x02, 0xe8, 0xeb, 0x64, 0xad, 0xcd,\n\t0xe8, 0xda, 0x31, 0x51, 0xea, 0x44, 0x1d, 0x1a, 0xca, 0xa6, 0x04, 0xbb, 0xa3, 0x5e, 0x03, 0x1a,\n\t0xad, 0x26, 0x21, 0x34, 0xdb, 0xb8, 0x4e, 0xc9, 0xe3, 0x02, 0x8b, 0x12, 0x9e, 0x8f, 0x41, 0x22,\n\t0xf0, 0x5a, 0x36, 0xce, 0xdf, 0x2c, 0x8b, 0xb8, 0xd2, 0x78, 0x06, 0x35, 0x1f, 0x38, 0x06, 0xd4,\n\t0x10, 0x71, 0x0b, 0x2a, 0x15, 0xd9, 0x2d, 0x43, 0x81, 0x0d, 0xb0, 0xa8, 0xf7, 0x07, 0xb5, 0x4a,\n\t0xa6, 0x4b, 0xa5, 0x40, 0xe7, 0x99, 0x10, 0x81, 0x48, 0x0a, 0x55, 0xb1, 0xb7, 0xfe, 0x63, 0x95,\n\t0xfc, 0x02, 0xb0, 0xe3, 0xac, 0x02, 0xf5, 0x8a, 0x48, 0xef, 0x44, 0x40, 0xde, 0xae, 0x97, 0xd1,\n\t0x35, 0x39, 0x30, 0x85, 0x59, 0x22, 0x22, 0x2d, 0x0d, 0xf9, 0xba, 0x28, 0xa5, 0xfc, 0x8f, 0xd1,\n\t0xc8, 0x4d, 0xa0, 0x5e, 0x4d, 0x08, 0xf4, 0xaf, 0x7d, 0xb2, 0xf8, 0x4f, 0x0e, 0xc7, 0x16, 0x77,\n\t0x0c, 0x8d, 0x09, 0x2d, 0x17, 0xf1, 0x93, 0xbd, 0x1b, 0x79, 0xd6, 0x6c, 0x3f, 0xfa, 0x6f, 0xd8,\n\t0x96, 0x43, 0xfb, 0x5d, 0x40, 0x87, 0x3a, 0x4c, 0x27, 0xdd, 0x1f, 0xa7, 0xba, 0xa8, 0x59, 0x7c,\n\t0x7e, 0xcd, 0x1b, 0xc2, 0x94, 0x83, 0x9a, 0x1f, 0x93, 0x97, 0x53, 0x30, 0x89, 0x98, 0x8e, 0x5a,\n\t0xca, 0x19, 0xd0, 0x88, 0x86, 0xa5, 0x3b, 0x46, 0x91, 0x38, 0x49, 0xd9, 0xc3, 0xab, 0xc7, 0xb1,\n\t0x85, 0xa3, 0x0f, 0xf2, 0x24, 0xc8, 0x38, 0xbd, 0x19, 0xe1, 0xbe, 0xe1, 0xe3, 0xca, 0x20, 0x3a,\n\t0x5e, 0x8a, 0x68, 0x4f, 0x71, 0x6e, 0x7c, 0x09, 0x4d, 0x23, 0x99, 0xfd, 0x60, 0x9f, 0xc7, 0x18,\n\t0x80, 0xd5, 0x99, 0x59, 0xa7, 0x58, 0xe6, 0x55, 0x0e, 0x88, 0xb0, 0xe9, 0x76, 0xe5, 0x92, 0x35,\n\t0x42, 0x9a, 0x26, 0xf2, 0xdf, 0xe1, 0xa6, 0xfa, 0x84, 0xbc, 0xf0, 0x43, 0xd5, 0x75, 0xbd, 0x0c,\n\t0xb0, 0x6e, 0x8a, 0x16, 0xe3, 0x88, 0x7b, 0x42, 0x71, 0x28, 0x98, 0x9e, 0x44, 0xc4, 0x52, 0x88,\n\t0x75, 0x05, 0x2f, 0x06, 0x46, 0xc4, 0x5d, 0x60, 0xca, 0xcb, 0x8f, 0x79, 0x7f, 0x9e, 0x23, 0x86,\n\t0xf4, 0x5f, 0xee, 0xfb, 0x67, 0xa8, 0x3a, 0x8d, 0xc6, 0xe8, 0xcf, 0xb9, 0xf1, 0x0b, 0x2d, 0xb4,\n\t0x42, 0xb7, 0x8f, 0x24, 0x79, 0x8d, 0x40, 0x15, 0xbd, 0x1b, 0x9d, 0x67, 0xc2, 0x7b, 0xc3, 0x55,\n\t0xf2, 0x2b, 0x2b, 0xf1, 0x27, 0xe5, 0x25, 0x61, 0xc8, 0x4e, 0x8a, 0x52, 0x84, 0x94, 0x32, 0xd6,\n\t0x0a, 0x12, 0xd7, 0x96, 0x37, 0x7a, 0x4a, 0x65, 0x44, 0x34, 0x78, 0xc7, 0xb4, 0xd3, 0x78, 0xbf,\n\t0x7a, 0xcf, 0xd8, 0xc6, 0x5f, 0x2c, 0xeb, 0x81, 0x16, 0xc5, 0xcb, 0xb7, 0x7a, 0x65, 0x5c, 0xb5,\n\t0xa2, 0x1a, 0xd2, 0x90, 0xea, 0x5d, 0x3c, 0xe8, 0xa6, 0x27, 0x59, 0xb7, 0xaf, 0x5f, 0x17, 0x2b,\n\t0x49, 0x41, 0xf7, 0x12, 0x21, 0x5b, 0x10, 0x47, 0xc8, 0xf3, 0x63, 0xaa, 0xeb, 0xd3, 0x73, 0xd2,\n\t0x50, 0x8d, 0x4e, 0x6f, 0x31, 0x9f, 0x3e, 0xef, 0x85, 0x4e, 0x0c, 0xc8, 0x4d, 0x15, 0x82, 0x5a,\n\t0xbb, 0x42, 0xdc, 0x8d, 0xbd, 0x72, 0x0f, 0x75, 0xe4, 0x44, 0x5b, 0x43, 0x65, 0xa4, 0x5d, 0x1e,\n\t0x78, 0x46, 0x44, 0xcb, 0x83, 0xdb, 0x0d, 0xa8, 0xa6, 0xba, 0x38, 0xcd, 0x5c, 0xa1, 0x84, 0xa0,\n\t0x5d, 0x6b, 0x24, 0x27, 0x47, 0xc1, 0x3b, 0x94, 0xef, 0x3c, 0xe1, 0x39, 0x8c, 0x63, 0x05, 0x92,\n\t0xf1, 0xd6, 0x50, 0x51, 0x8c, 0x53, 0xaf, 0x44, 0xd0, 0xb1, 0x3f, 0xd8, 0x1d, 0x03, 0x65, 0x99,\n\t0x1f, 0x2a, 0x87, 0x80, 0x47, 0xc6, 0x70, 0xfd, 0x93, 0x96, 0xd8, 0x13, 0xb6, 0x47, 0x6a, 0xb2,\n\t0x65, 0x7a, 0x2e, 0x48, 0x3a, 0x51, 0xf3, 0x86, 0xb4, 0xd1, 0x17, 0x16, 0xcb, 0xe3, 0x6b, 0xcb,\n\t0x99, 0xbf, 0x7e, 0x81, 0x7d, 0x94, 0x0f, 0x9b, 0x09, 0x1d, 0xbe, 0xd0, 0xf2, 0xaa, 0xc0, 0x3f,\n\t0xe9, 0xe7, 0xb0, 0x4c, 0xb9, 0x9d, 0xb6, 0x1a, 0x00, 0x87, 0x48, 0xb7, 0x02, 0x0d, 0xba, 0x9a,\n\t0x2c, 0x1e, 0x13, 0xa6, 0x48, 0x23, 0x33, 0x84, 0x73, 0x1c, 0x27, 0x3e, 0x9a, 0x2f, 0xa8, 0x6e,\n\t0x45, 0x45, 0x2e, 0x48, 0xe0, 0xa0, 0xe2, 0x58, 0x05, 0x86, 0x3e, 0x7d, 0xe5, 0x81, 0x8b, 0x0b,\n\t0xae, 0x4d, 0xac, 0x21, 0x7d, 0x8e, 0x52, 0xb9, 0xb9, 0x75, 0x50, 0x07, 0xca, 0x4d, 0xc8, 0xe7,\n\t0x22, 0xa3, 0xcb, 0x56, 0x5b, 0x00, 0xc8, 0x48, 0x1e, 0x8f, 0x3d, 0x91, 0x1c, 0x33, 0x26, 0x45,\n\t0x81, 0x66, 0x07, 0xc6, 0x1a, 0x9b, 0xd3, 0x50, 0x3a, 0xd1, 0xa8, 0x60, 0xd0, 0x64, 0xed, 0xe6,\n\t0xc6, 0x78, 0x04, 0xe6, 0x8f, 0xa4, 0x5f, 0x4e, 0x40, 0x1b, 0xf3, 0x5c, 0x22, 0x94, 0x1e, 0xb1,\n\t0xb3, 0xd0, 0xe6, 0xe4, 0x2c, 0x0f, 0x6e, 0x1d, 0x61, 0x55, 0xfb, 0x49, 0xe0, 0xc0, 0x3a, 0x7b,\n\t0x33, 0x65, 0x84, 0xf6, 0x7a, 0xda, 0x24, 0x74, 0x17, 0x3d, 0x55, 0x03, 0xd6, 0xbc, 0x18, 0xda,\n\t0x72, 0x01, 0x25, 0xe0, 0x67, 0x54, 0x3f, 0x5b, 0x78, 0x00, 0xb4, 0xb1, 0xca, 0x6c, 0xe2, 0x81,\n\t0xad, 0x44, 0x5a, 0x84, 0x4e, 0x4d, 0x89, 0x7e, 0x92, 0x7e, 0x6e, 0xa0, 0x71, 0x1b, 0x26, 0x58,\n\t0x38, 0xee, 0x1c, 0x96, 0xfa, 0x67, 0x99, 0x53, 0x76, 0xe8, 0xa3, 0x28, 0x27, 0xfc, 0x2f, 0xdc,\n\t0x4d, 0x34, 0xac, 0x7e, 0xd0, 0x47, 0x7a, 0x7a, 0xac, 0xe7, 0x6a, 0x9b, 0x2c, 0x33, 0xa0, 0x9e,\n\t0x32, 0xaa, 0x33, 0xcc, 0x32, 0xb4, 0xac, 0x30, 0x28, 0xe3, 0x9e, 0xa7, 0x36, 0x5c, 0xde, 0x64,\n\t0xc9, 0x39, 0x6f, 0xfd, 0x15, 0x16, 0x58, 0x5e, 0xea, 0xcc, 0x40, 0xec, 0x88, 0xca, 0x3b, 0x0c,\n\t0xfb, 0x91, 0xb0, 0xb9, 0xb4, 0x78, 0xdf, 0x75, 0xd7, 0x0d, 0xf7, 0x96, 0xc5, 0x3b, 0x23, 0xfc,\n\t0x21, 0x79, 0x20, 0xe1, 0x39, 0x3e, 0xfc, 0x6b, 0xb7, 0x86, 0x9f, 0x81, 0x93, 0x81, 0x34, 0xba,\n\t0xc3, 0x02, 0x43, 0x3c, 0xdf, 0x1c, 0xa1, 0x53, 0xeb, 0xf8, 0x06, 0x8a, 0xc5, 0xe7, 0x5f, 0x36,\n\t0x8d, 0x4a, 0x0c, 0x5d, 0xc1, 0x3e, 0xaf, 0x56, 0xf3, 0xad, 0xfb, 0x15, 0x29, 0x83, 0x40, 0x68,\n\t0xb6, 0xe5, 0xea, 0xab, 0xe1, 0x06, 0x37, 0x62, 0x0e, 0x43, 0x31, 0xcb, 0xa3, 0x31, 0xf1, 0xff,\n\t0xd2, 0x0f, 0xfc, 0x42, 0x25, 0x92, 0x65, 0x33, 0x6b, 0x70, 0x45, 0xb0, 0xee, 0xdf, 0x9f, 0xdc,\n\t0xdb, 0x83, 0xb0, 0x09, 0xeb, 0x3d, 0xac, 0xb9, 0x7e, 0x9d, 0x17, 0x8c, 0xe4, 0x75, 0xa3, 0x50,\n\t0x26, 0x93, 0x81, 0x8b, 0xc4, 0x3e, 0xc6, 0x59, 0x80, 0xcd, 0x0d, 0xad, 0xe2, 0x43, 0xf2, 0xb3,\n\t0xfd, 0x50, 0x6f, 0xa3, 0x52, 0xec, 0x20, 0xea, 0xe2, 0x86, 0x8d, 0x3e, 0x8f, 0xcc, 0x87, 0x27,\n\t0x75, 0x73, 0x0e, 0xed, 0x2c, 0x25, 0xc3, 0x03, 0x19, 0xdf, 0xcf, 0xa1, 0xc2, 0x88, 0xed, 0x51,\n\t0x5d, 0x21, 0x9f, 0x25, 0xcf, 0xa0, 0xfa, 0xe3, 0x12, 0x13, 0x44, 0xb5, 0x99, 0x51, 0x63, 0xe0,\n\t0xc1, 0x86, 0x6d, 0xd9, 0x61, 0xaf, 0x3c, 0x25, 0x7b, 0xea, 0x09, 0x46, 0x0c, 0x2f, 0xbe, 0x9b,\n\t0xb6, 0x8f, 0x98, 0xf3, 0x70, 0x5b, 0x3e, 0xa3, 0xa0, 0x57, 0x77, 0xdd, 0x91, 0x48, 0xee, 0xb3,\n\t0x78, 0x01, 0x31, 0x99, 0xed, 0xd2, 0xa9, 0xc5, 0x4c, 0xb2, 0xbd, 0x7c, 0x7b, 0xe9, 0x4a, 0x65,\n\t0x0e, 0xb0, 0x3f, 0x7b, 0x95, 0x0d, 0x77, 0xb3, 0x55, 0x11, 0xff, 0xfb, 0xd6, 0x82, 0x09, 0xee,\n\t0x8f, 0x50, 0x76, 0x5f, 0x06, 0x57, 0xa2, 0xb6, 0xa1, 0x2f, 0x16, 0x2e, 0x0f, 0xef, 0x3c, 0x93,\n\t0x89, 0x24, 0x8d, 0x60, 0x91, 0x67, 0x98, 0x86, 0x43, 0x61, 0x7f, 0x60, 0x31, 0x7c, 0xa2, 0x4e,\n\t0x8e, 0xa0, 0xa2, 0x92, 0x47, 0x6f, 0x24, 0x5b, 0x14, 0x09, 0x15, 0xfb, 0xe5, 0x12, 0x37, 0x81,\n\t0x8d, 0xf7, 0x53, 0x5a, 0x15, 0xc1, 0x4f, 0xc5, 0x0a, 0x23, 0x3d, 0x44, 0x25, 0x8b, 0xa5, 0x7d,\n\t0xf7, 0xd2, 0xb7, 0x95, 0xc7, 0xf3, 0x4d, 0x2b, 0x18, 0xf0, 0x6f, 0x5e, 0x0a, 0xff, 0x9f, 0xb0,\n\t0xf5, 0x45, 0x35, 0x04, 0xc6, 0xc2, 0xab, 0x76, 0xbb, 0x35, 0xd3, 0x1a, 0xe6, 0x2b, 0x9f, 0xee,\n\t0xa8, 0x74, 0x09, 0x7e, 0x7b, 0x5b, 0x4e, 0xc6, 0x65, 0x90, 0x1f, 0x67, 0x70, 0x42, 0xae, 0x37,\n\t0xe3, 0x27, 0xc0, 0x0e, 0xeb, 0x4a, 0xe4, 0x58, 0x17, 0x87, 0x09, 0xba, 0xc3, 0xa1, 0x96, 0x3a,\n\t0x9e, 0x47, 0xfa, 0xc2, 0xcf, 0x70, 0x6f, 0x79, 0x4c, 0xe6, 0xcd, 0x73, 0x8c, 0x07, 0x9c, 0xe9,\n\t0x91, 0x08, 0x55, 0x08, 0x2f, 0x44, 0x08, 0x36, 0x9d, 0x91, 0x4d, 0x35, 0xaf, 0x2b, 0x99, 0x5d,\n\t0x2a, 0xdd, 0xf3, 0x47, 0xcf, 0xc2, 0x7b, 0x03, 0xea, 0x24, 0x6c, 0x86, 0x73, 0x64, 0xd7, 0x95,\n\t0xf9, 0x31, 0x6c, 0x86, 0x7e, 0xd8, 0x4d, 0x21, 0xdb, 0x9b, 0xcb, 0x22, 0x1c, 0xa4, 0x97, 0xbb,\n\t0x1b, 0x80, 0x75, 0x9f, 0xda, 0x2e, 0xad, 0xed, 0x87, 0x6a, 0x21, 0xfa, 0x38, 0x7f, 0x28, 0x71,\n\t0x44, 0xa9, 0x56, 0x4c, 0x36, 0x3c, 0x8c, 0xb4, 0xd0, 0x01, 0xe6, 0xf1, 0x07, 0x36, 0x14, 0xba,\n\t0xd5, 0xf7, 0xfc, 0x1e, 0x36, 0x44, 0x1f, 0x45, 0xa3, 0x0b, 0x84, 0xde, 0x8a, 0xb7, 0xa4, 0x93,\n\t0x4f, 0x64, 0x28, 0xa5, 0xce, 0x62, 0x5e, 0xef, 0x6c, 0xe6, 0xfd, 0x25, 0x99, 0x96, 0x8f, 0x7d,\n\t0x53, 0x8d, 0x25, 0x4e, 0x13, 0xfb, 0xe7, 0xef, 0xbc, 0x46, 0x74, 0x20, 0x43, 0x9f, 0xc3, 0x7d,\n\t0x5d, 0xdc, 0xd3, 0x96, 0x63, 0xe1, 0x10, 0xa1, 0xcc, 0x2c, 0x77, 0xd3, 0xf0, 0xed, 0x59, 0x28,\n\t0xd6, 0x2f, 0x07, 0x8d, 0x07, 0x54, 0xe1, 0x89, 0xb4, 0x73, 0x6e, 0x2d, 0x9e, 0xec, 0xb5, 0x9f,\n\t0x38, 0xaa, 0x29, 0xce, 0x49, 0x0a, 0x62, 0x5e, 0x0b, 0x3e, 0xac, 0x6f, 0xc0, 0xe2, 0x15, 0x53,\n\t0x41, 0x99, 0x75, 0xbb, 0xf5, 0x21, 0x77, 0xc7, 0x31, 0xb4, 0xcb, 0xca, 0xfd, 0x1a, 0xeb, 0x84,\n\t0x1f, 0xed, 0x17, 0xb0, 0x5f, 0x60, 0x69, 0x36, 0xc7, 0x30, 0x84, 0xf2, 0x92, 0x3b, 0x1a, 0x46,\n\t0xc6, 0xa3, 0x12, 0x9d, 0xb7, 0x0c, 0xfa, 0xd1, 0x33, 0x65, 0x0a, 0x72, 0x07, 0x46, 0x71, 0xbd,\n\t0x3f, 0x91, 0xf3, 0x26, 0xda, 0x87, 0x9a, 0xfd, 0x30, 0x86, 0x04, 0xbe, 0x5b, 0x25, 0x53, 0x37,\n\t0xef, 0xed, 0x22, 0x3a, 0xcf, 0xc6, 0xc5, 0x65, 0xe6, 0x58, 0x11, 0xaa, 0x0f, 0xe8, 0x84, 0x22,\n\t0x05, 0xe3, 0x7f, 0x6b, 0x13, 0xc8, 0x4c, 0x46, 0x81, 0xe2, 0x62, 0x37, 0x63, 0x13, 0xcb, 0x22,\n\t0x8d, 0x91, 0x68, 0xcf, 0xe9, 0xf5, 0x1f, 0x5a, 0x51, 0x8a, 0x29, 0x14, 0xdd, 0x51, 0xe3, 0xd4,\n\t0x3d, 0xfd, 0x09, 0xd6, 0x98, 0x4c, 0xee, 0xb6, 0x34, 0xc2, 0x46, 0xc5, 0xc2, 0xe2, 0xb2, 0xd4,\n\t0xa1, 0xc6, 0x71, 0xbf, 0xca, 0x97, 0x6c, 0x4c, 0xe8, 0x86, 0x31, 0x9f, 0x28, 0x31, 0x16, 0x6b,\n\t0xb7, 0x3e, 0x74, 0x14, 0xfd, 0x0a, 0x93, 0x45, 0x0c, 0xdb, 0xca, 0x5b, 0x6a, 0x4c, 0xb3, 0xb1,\n\t0x5c, 0x0a, 0x86, 0x14, 0xa7, 0x6b, 0x2a, 0x0a, 0xb7, 0x75, 0xb6, 0x93, 0x53, 0x51, 0x7a, 0xec,\n\t0xa2, 0x0e, 0xb2, 0xe7, 0x21, 0x54, 0x91, 0x3b, 0xdf, 0xcb, 0x63, 0x51, 0x29, 0x62, 0x28, 0x4e,\n\t0x76, 0xa1, 0xa7, 0xdd, 0x37, 0x94, 0xde, 0x6f, 0x75, 0x4a, 0xb5, 0x22, 0x88, 0x11, 0xd5, 0x7c,\n\t0x44, 0xa6, 0x43, 0x6e, 0x7f, 0x18, 0xed, 0x8d, 0x4f, 0x2a, 0x74, 0x99, 0x11, 0x13, 0xe6, 0x0d,\n\t0xa6, 0xfa, 0x77, 0x1d, 0xa5, 0x5a, 0x49, 0x01, 0x16, 0x2d, 0x2a, 0x57, 0xfc, 0x13, 0xe2, 0xc3,\n\t0xe0, 0x17, 0xa3, 0x57, 0xea, 0xb2, 0x5b, 0x1b, 0x9c, 0xce, 0x7b, 0xd2, 0x12, 0xf3, 0x54, 0xdf,\n\t0x38, 0x1a, 0x54, 0x7c, 0xbc, 0x07, 0x7e, 0xe6, 0xc8, 0xf6, 0x6e, 0x15, 0x17, 0x93, 0x4e, 0xf9,\n\t0xcb, 0xee, 0xa1, 0xb1, 0x89, 0xa4, 0xa4, 0xf5, 0xb3, 0x07, 0xdc, 0x16, 0xf1, 0x08, 0x4c, 0xd8,\n\t0xff, 0xbf, 0xe8, 0xaa, 0xf1, 0xe2, 0x07, 0xe8, 0xca, 0x0c, 0xd8, 0x7e, 0x4e, 0x74, 0xf1, 0x91,\n\t0x05, 0xa5, 0x3f, 0x21, 0x77, 0x33, 0x97, 0x10, 0x6d, 0xc3, 0xf6, 0xab, 0x2d, 0xcc, 0xf0, 0x3d,\n\t0x83, 0x32, 0x1a, 0xc4, 0xbc, 0x86, 0xdb, 0x78, 0xf7, 0x02, 0x2e, 0x43, 0x5d, 0x3e, 0x55, 0x44,\n\t0x8a, 0x88, 0x09, 0xe7, 0x3f, 0xc5, 0x03, 0xfe, 0xe9, 0xff, 0xf0, 0xae, 0xf6, 0x93, 0xd8, 0xc7,\n\t0x3e, 0x3f, 0x04, 0x82, 0xa6, 0x4f, 0x1a, 0x4e, 0x19, 0x75, 0x82, 0x8e, 0x27, 0xfd, 0x46, 0x03,\n\t0x09, 0x50, 0x8d, 0x24, 0xdb, 0xd7, 0xd4, 0xdf, 0x3c, 0x35, 0xd7, 0xec, 0x3c, 0xba, 0x83, 0x0a,\n\t0x66, 0x60, 0xca, 0x93, 0x37, 0x66, 0x19, 0xca, 0x9f, 0x41, 0xac, 0x0c, 0x73, 0x1d, 0xd5, 0x9a,\n\t0x30, 0x38, 0x3b, 0x59, 0x4c, 0xc3, 0xcc, 0x67, 0x13, 0xf1, 0x02, 0x30, 0x0c, 0xa8, 0x6f, 0x93,\n\t0x5b, 0x06, 0x82, 0x2e, 0x24, 0x10, 0x27, 0x54, 0xa6, 0x5f, 0x0c, 0x03, 0x1a, 0xa3, 0x9b, 0xc6,\n\t0x8e, 0x33, 0x92, 0x32, 0x33, 0xcb, 0xb2, 0x62, 0xe9, 0x19, 0xf2, 0x9b, 0xdd, 0x36, 0xaa, 0x67,\n\t0x19, 0xd3, 0x39, 0x47, 0x9c, 0x6c, 0x22, 0x46, 0x08, 0x7e, 0x94, 0x83, 0x7b, 0x52, 0xbc, 0xfe,\n\t0x46, 0xd2, 0x9e, 0x17, 0x24, 0x04, 0xa6, 0xca, 0x83, 0x6a, 0xb6, 0x88, 0x65, 0x36, 0x48, 0x2e,\n\t0x4c, 0xc8, 0x6d, 0xa7, 0xf9, 0xc9, 0x3c, 0xc2, 0xd2, 0x2f, 0xe0, 0x14, 0xed, 0x38, 0x51, 0xdd,\n\t0xea, 0x36, 0x56, 0xbe, 0x79, 0x03, 0x51, 0x22, 0x03, 0xae, 0x65, 0x60, 0xb7, 0x82, 0x86, 0x46,\n\t0x27, 0xf1, 0x7b, 0x91, 0xea, 0xc6, 0x59, 0x29, 0x43, 0x23, 0x1b, 0xa6, 0x7a, 0x14, 0x35, 0x8a,\n\t0x44, 0xd6, 0xde, 0xc8, 0x17, 0x43, 0x5f, 0x0f, 0xc4, 0x71, 0x11, 0xe5, 0xec, 0x21, 0x7f, 0x41,\n\t0xa2, 0xc6, 0x03, 0x28, 0x98, 0x7e, 0x45, 0xac, 0x30, 0x91, 0xee, 0x65, 0x8d, 0x04, 0xef, 0x18,\n\t0x8e, 0xbc, 0x3a, 0x21, 0x6e, 0xfb, 0xeb, 0x89, 0x2b, 0xc1, 0x35, 0x34, 0x90, 0x6d, 0x87, 0xa0,\n\t0xa2, 0x99, 0xed, 0x41, 0x66, 0x02, 0xd4, 0x04, 0x6c, 0xa2, 0x75, 0xb3, 0x11, 0x00, 0xd9, 0xaa,\n\t0x7a, 0x30, 0x82, 0x3a, 0x1a, 0x64, 0x4f, 0x5e, 0x1b, 0xbe, 0x82, 0xa0, 0xc7, 0x2c, 0xda, 0x8e,\n\t0x74, 0x06, 0x81, 0x7b, 0x77, 0xde, 0x12, 0xaf, 0x69, 0x21, 0x43, 0x3d, 0xd1, 0x96, 0xc9, 0x1c,\n\t0xb5, 0x8e, 0x42, 0x5c, 0x43, 0x8a, 0x7e, 0xbe, 0xba, 0xb0, 0x1e, 0x76, 0x8f, 0xe9, 0x34, 0xdb,\n\t0x43, 0x37, 0x05, 0x32, 0x2f, 0xea, 0xca, 0x2d, 0x11, 0x65, 0x1d, 0xa9, 0xd6, 0xe1, 0x9c, 0x6b,\n\t0x40, 0x16, 0x3a, 0x48, 0xa6, 0x38, 0xa5, 0x96, 0x18, 0x71, 0xc0, 0xcd, 0xb1, 0xf3, 0xa0, 0x3c,\n\t0x14, 0x18, 0x80, 0x78, 0x38, 0xa4, 0x3b, 0x37, 0x6c, 0x08, 0xaa, 0x5a, 0xdc, 0xe8, 0x72, 0x8e,\n\t0xc3, 0x15, 0x61, 0x28, 0x6e, 0xcf, 0x8f, 0xae, 0xb6, 0xdf, 0x00, 0xe7, 0xfc, 0x06, 0xcf, 0x5c,\n\t0xb0, 0x3d, 0x8b, 0x1d, 0x0a, 0x10, 0xa2, 0xb7, 0x71, 0x94, 0x9d, 0xe2, 0x5a, 0x28, 0x50, 0x9a,\n\t0xd8, 0x52, 0x7c, 0x48, 0x80, 0x4f, 0x21, 0xcb, 0x30, 0x4a, 0x87, 0x2c, 0xf0, 0x96, 0xe3, 0xd7,\n\t0xc8, 0xd4, 0xa6, 0x0c, 0x14, 0xa0, 0x43, 0xbe, 0x68, 0xfd, 0x0a, 0x67, 0x42, 0xdd, 0xfa, 0x4d,\n\t0x78, 0x09, 0xb8, 0x65, 0x31, 0xcc, 0x8d, 0x07, 0xfa, 0xec, 0x08, 0x75, 0x82, 0x50, 0x22, 0xdd,\n\t0xa0, 0xc2, 0x46, 0xa5, 0xc1, 0x41, 0x24, 0xc4, 0xe8, 0x16, 0x44, 0xb5, 0x92, 0xd4, 0xc5, 0x44,\n\t0xd3, 0x94, 0xa4, 0x5f, 0x00, 0x00, 0x39, 0x00, 0x31, 0x00, 0x65, 0x00, 0x66, 0x00, 0x62, 0x00,\n\t0x38, 0x00, 0x62, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x3f, 0x00, 0x5c, 0x00,\n\t0x53, 0x00, 0x54, 0x00, 0x4f, 0x00, 0x52, 0x00, 0x41, 0x00, 0x47, 0x00, 0x45, 0x00, 0x23, 0x00,\n\t0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x23, 0x00, 0x7b, 0x00,\n\t0x30, 0x00, 0x61, 0x00, 0x63, 0x00, 0x36, 0x00, 0x62, 0x00, 0x63, 0x00, 0x36, 0x00, 0x61, 0x00,\n\t0x2d, 0x00, 0x37, 0x00, 0x35, 0x00, 0x36, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x31, 0x00,\n\t0x65, 0x00, 0x37, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x66, 0x00, 0x62, 0x00, 0x30, 0x00, 0x2d, 0x00,\n\t0x38, 0x00, 0x30, 0x00, 0x36, 0x00, 0x65, 0x00, 0x36, 0x00, 0x66, 0x00, 0x36, 0x00, 0x65, 0x00,\n\t0x36, 0x00, 0x39, 0x00, 0x36, 0x00, 0x33, 0x00, 0x7d, 0x00, 0x23, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x46, 0x00, 0x45, 0x00, 0x32, 0x00,\n\t0x34, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x23, 0x00, 0x7b, 0x00,\n\t0x35, 0x00, 0x33, 0x00, 0x66, 0x00, 0x35, 0x00, 0x36, 0x00, 0x33, 0x00, 0x30, 0x00, 0x64, 0x00,\n\t0x2d, 0x00, 0x62, 0x00, 0x36, 0x00, 0x62, 0x00, 0x66, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x31, 0x00,\n\t0x64, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x34, 0x00, 0x66, 0x00, 0x32, 0x00, 0x2d, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x61, 0x00, 0x30, 0x00, 0x63, 0x00, 0x39, 0x00, 0x31, 0x00, 0x65, 0x00,\n\t0x66, 0x00, 0x62, 0x00, 0x38, 0x00, 0x62, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x5c, 0x00,\n\t0x3f, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x54, 0x00, 0x4f, 0x00, 0x52, 0x00, 0x41, 0x00, 0x47, 0x00,\n\t0x45, 0x00, 0x23, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00,\n\t0x23, 0x00, 0x7b, 0x00, 0x32, 0x00, 0x34, 0x00, 0x62, 0x00, 0x37, 0x00, 0x35, 0x00, 0x66, 0x00,\n\t0x63, 0x00, 0x66, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x64, 0x00, 0x35, 0x00, 0x37, 0x00, 0x2d, 0x00,\n\t0x31, 0x00, 0x31, 0x00, 0x65, 0x00, 0x39, 0x00, 0x2d, 0x00, 0x61, 0x00, 0x30, 0x00, 0x62, 0x00,\n\t0x34, 0x00, 0x2d, 0x00, 0x35, 0x00, 0x32, 0x00, 0x35, 0x00, 0x34, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x65, 0x00, 0x65, 0x00, 0x62, 0x00, 0x36, 0x00, 0x30, 0x00, 0x35, 0x00, 0x7d, 0x00, 0x23, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x23, 0x00, 0x7b, 0x00, 0x35, 0x00, 0x33, 0x00, 0x66, 0x00, 0x35, 0x00, 0x36, 0x00, 0x33, 0x00,\n\t0x30, 0x00, 0x64, 0x00, 0x2d, 0x00, 0x62, 0x00, 0x36, 0x00, 0x62, 0x00, 0x66, 0x00, 0x2d, 0x00,\n\t0x31, 0x00, 0x31, 0x00, 0x64, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x34, 0x00, 0x66, 0x00,\n\t0x32, 0x00, 0x2d, 0x00, 0x30, 0x00, 0x30, 0x00, 0x61, 0x00, 0x30, 0x00, 0x63, 0x00, 0x39, 0x00,\n\t0x31, 0x00, 0x65, 0x00, 0x66, 0x00, 0x62, 0x00, 0x38, 0x00, 0x62, 0x00, 0x7d, 0x00, 0x00, 0x00,\n\t0x5c, 0x00, 0x5c, 0x00, 0x3f, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x54, 0x00, 0x4f, 0x00, 0x52, 0x00,\n\t0x41, 0x00, 0x47, 0x00, 0x45, 0x00, 0x23, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x6d, 0x00, 0x65, 0x00, 0x23, 0x00, 0x7b, 0x00, 0x33, 0x00, 0x31, 0x00, 0x66, 0x00, 0x64, 0x00,\n\t0x36, 0x00, 0x65, 0x00, 0x38, 0x00, 0x61, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x30, 0x00, 0x62, 0x00,\n\t0x66, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x31, 0x00, 0x65, 0x00, 0x39, 0x00, 0x2d, 0x00, 0x61, 0x00,\n\t0x30, 0x00, 0x39, 0x00, 0x33, 0x00, 0x2d, 0x00, 0x35, 0x00, 0x32, 0x00, 0x35, 0x00, 0x34, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x65, 0x00, 0x65, 0x00, 0x62, 0x00, 0x36, 0x00, 0x30, 0x00, 0x35, 0x00,\n\t0x7d, 0x00, 0x23, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x30, 0x00, 0x23, 0x00, 0x7b, 0x00, 0x35, 0x00, 0x33, 0x00, 0x66, 0x00, 0x35, 0x00,\n\t0x36, 0x00, 0x33, 0x00, 0x30, 0x00, 0x64, 0x00, 0x2d, 0x00, 0x62, 0x00, 0x36, 0x00, 0x62, 0x00,\n\t0x66, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x31, 0x00, 0x64, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x39, 0x00,\n\t0x34, 0x00, 0x66, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x30, 0x00, 0x30, 0x00, 0x61, 0x00, 0x30, 0x00 };\n\nuint8_t fsntfs_test_compression_uncompressed_data1[ 7638 ] = {\n\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53, 0x53, 0x45, 0x52, 0x20,\n\t0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x4c,\n\t0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x39, 0x20, 0x4a, 0x75, 0x6e, 0x65,\n\t0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,\n\t0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x30, 0x37, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,\n\t0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a,\n\t0x2f, 0x2f, 0x66, 0x73, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x45, 0x76, 0x65,\n\t0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74,\n\t0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64,\n\t0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x72, 0x62, 0x61, 0x74,\n\t0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e,\n\t0x67, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f,\n\t0x77, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,\n\t0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69,\n\t0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x74, 0x68, 0x65, 0x20,\n\t0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65,\n\t0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,\n\t0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20,\n\t0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x30, 0x2e, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x44,\n\t0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41,\n\t0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x20, 0x22,\n\t0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73,\n\t0x73, 0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x22, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20,\n\t0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x67,\n\t0x6f, 0x76, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74,\n\t0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x22, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x6e, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x6b,\n\t0x65, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74,\n\t0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a,\n\t0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20,\n\t0x62, 0x75, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64,\n\t0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e,\n\t0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x63,\n\t0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20,\n\t0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x65, 0x6d, 0x65, 0x64,\n\t0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x0a, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67,\n\t0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72,\n\t0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,\n\t0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62,\n\t0x79, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x6c,\n\t0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a, 0x77,\n\t0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x61, 0x73, 0x20,\n\t0x6d, 0x61, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x61, 0x6c,\n\t0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a,\n\t0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65,\n\t0x20, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69,\n\t0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,\n\t0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73,\n\t0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x6f, 0x6c, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f,\n\t0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,\n\t0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c,\n\t0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x61,\n\t0x6e, 0x64, 0x20, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,\n\t0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72,\n\t0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x66, 0x72, 0x6f,\n\t0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31,\n\t0x2e, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x53,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76,\n\t0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,\n\t0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x33, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x34,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,\n\t0x0a, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x62,\n\t0x6f, 0x75, 0x6e, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x32, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e,\n\t0x67, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d,\n\t0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64,\n\t0x2c, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20,\n\t0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61,\n\t0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20,\n\t0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x28, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,\n\t0x74, 0x68, 0x65, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20,\n\t0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20,\n\t0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69,\n\t0x66, 0x69, 0x65, 0x64, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x0a, 0x20,\n\t0x20, 0x20, 0x61, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,\n\t0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,\n\t0x61, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x61, 0x69, 0x74, 0x68, 0x20, 0x65, 0x66, 0x66,\n\t0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65,\n\t0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76,\n\t0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70,\n\t0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x6f,\n\t0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x65, 0x72,\n\t0x66, 0x6f, 0x72, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,\n\t0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x75,\n\t0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x62, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x6e, 0x65,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,\n\t0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,\n\t0x66, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x33, 0x2e,\n\t0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72,\n\t0x69, 0x61, 0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64,\n\t0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70,\n\t0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,\n\t0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x61, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20,\n\t0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x63, 0x6f,\n\t0x64, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x70,\n\t0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x66,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65,\n\t0x64, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f,\n\t0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6d,\n\t0x65, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,\n\t0x73, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,\n\t0x65, 0x0a, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x63,\n\t0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6d, 0x61, 0x6c,\n\t0x6c, 0x20, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x2c, 0x20, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,\n\t0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74,\n\t0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x28, 0x74, 0x65, 0x6e, 0x20, 0x6f, 0x72,\n\t0x20, 0x66, 0x65, 0x77, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20,\n\t0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20,\n\t0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,\n\t0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69,\n\t0x76, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74,\n\t0x69, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f,\n\t0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,\n\t0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,\n\t0x20, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65,\n\t0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64,\n\t0x20, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20,\n\t0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20,\n\t0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62,\n\t0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x34, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65,\n\t0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,\n\t0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,\n\t0x68, 0x6f, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x0a, 0x74, 0x61, 0x6b, 0x65,\n\t0x6e, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x20, 0x65, 0x66, 0x66, 0x65,\n\t0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72,\n\t0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x6f, 0x72, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x0a, 0x65,\n\t0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,\n\t0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6d, 0x6f,\n\t0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x69, 0x66, 0x20,\n\t0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68,\n\t0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,\n\t0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70,\n\t0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20,\n\t0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69,\n\t0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f,\n\t0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x41, 0x63,\n\t0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x63, 0x6f, 0x70, 0x79,\n\t0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x64, 0x75,\n\t0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e,\n\t0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20,\n\t0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x64,\n\t0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65,\n\t0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x69,\n\t0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50,\n\t0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,\n\t0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x64, 0x29, 0x20, 0x44, 0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c,\n\t0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70,\n\t0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x6e,\n\t0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,\n\t0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,\n\t0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x6c, 0x69, 0x6e,\n\t0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,\n\t0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74,\n\t0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65,\n\t0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,\n\t0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x29, 0x20, 0x55, 0x73, 0x65,\n\t0x20, 0x61, 0x20, 0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x61, 0x72,\n\t0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61,\n\t0x6e, 0x69, 0x73, 0x6d, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x73, 0x75, 0x69,\n\t0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x20,\n\t0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x61, 0x29, 0x20,\n\t0x75, 0x73, 0x65, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65,\n\t0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6c,\n\t0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70,\n\t0x75, 0x74, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x62, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c,\n\t0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x6c,\n\t0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,\n\t0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74,\n\t0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65,\n\t0x72, 0x77, 0x69, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75,\n\t0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47,\n\t0x50, 0x4c, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79,\n\t0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x72,\n\t0x65, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65,\n\t0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,\n\t0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64,\n\t0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x28, 0x49, 0x66, 0x0a, 0x20, 0x20,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x34, 0x64, 0x30, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,\n\t0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,\n\t0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x64,\n\t0x31, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76,\n\t0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65,\n\t0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63,\n\t0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x29, 0x0a,\n\t0x0a, 0x20, 0x20, 0x35, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75,\n\t0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61,\n\t0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20,\n\t0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73,\n\t0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f,\n\t0x6e, 0x76, 0x65, 0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x75, 0x6e, 0x64,\n\t0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72,\n\t0x0a, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20,\n\t0x64, 0x6f, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,\n\t0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29,\n\t0x20, 0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73,\n\t0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69,\n\t0x65, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e,\n\t0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70, 0x72, 0x6f,\n\t0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x77, 0x69,\n\t0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,\n\t0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65,\n\t0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20,\n\t0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x61,\n\t0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x63, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x36, 0x2e, 0x20, 0x52, 0x65, 0x76, 0x69, 0x73, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20,\n\t0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,\n\t0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77,\n\t0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,\n\t0x61, 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73,\n\t0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,\n\t0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,\n\t0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x69, 0x6d,\n\t0x65, 0x2e, 0x20, 0x53, 0x75, 0x63, 0x68, 0x20, 0x6e, 0x65, 0x77, 0x0a, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6d,\n\t0x69, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x20, 0x74,\n\t0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x64,\n\t0x69, 0x66, 0x66, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20,\n\t0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70,\n\t0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65,\n\t0x72, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20,\n\t0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x49,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74, 0x65,\n\t0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n\t0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,\n\t0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,\n\t0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,\n\t0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x70, 0x75, 0x62,\n\t0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,\n\t0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e,\n\t0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65,\n\t0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e,\n\t0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x0a, 0x47, 0x65,\n\t0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,\n\t0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68,\n\t0x6f, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73,\n\t0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,\n\t0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x70,\n\t0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f,\n\t0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x73,\n\t0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20,\n\t0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65,\n\t0x0a, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20,\n\t0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x74,\n\t0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x27, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20,\n\t0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,\n\t0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x70, 0x65, 0x72,\n\t0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20,\n\t0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_decompress_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_decompress_data(\n     void )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint8_t *uncompressed_data    = NULL;\n\tvoid *memset_result           = NULL;\n\tsize_t uncompressed_data_size = 0;\n\tint result                    = 0;\n\n\t/* Initialize test\n\t */\n\tuncompressed_data = (uint8_t *) memory_allocate(\n\t                                 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"uncompressed_data\",\n\t uncompressed_data );\n\n\t/* Test regular cases\n\t */\n\tmemset_result = memory_set(\n\t                 uncompressed_data,\n\t                 0,\n\t                 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tuncompressed_data_size = 8192;\n\n\tresult = libfsntfs_decompress_data(\n\t          fsntfs_test_compression_lznt1_compressed_data1,\n\t          8192,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t          uncompressed_data,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"uncompressed_data_size\",\n\t uncompressed_data_size,\n\t (size_t) 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          uncompressed_data,\n\t          fsntfs_test_compression_uncompressed_data1,\n\t          7638 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemset_result = memory_set(\n\t                 uncompressed_data,\n\t                 0,\n\t                 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tuncompressed_data_size = 8192;\n\n\tresult = libfsntfs_decompress_data(\n\t          fsntfs_test_compression_lzxpress_huffman_compressed_data1,\n\t          4096,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZXPRESS_HUFFMAN,\n\t          uncompressed_data,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"uncompressed_data_size\",\n\t uncompressed_data_size,\n\t (size_t) 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          uncompressed_data,\n\t          fsntfs_test_compression_uncompressed_data1,\n\t          7638 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Test error cases\n\t */\n\tmemset_result = memory_set(\n\t                 uncompressed_data,\n\t                 0,\n\t                 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tuncompressed_data_size = 8192;\n\n\tresult = libfsntfs_decompress_data(\n\t          NULL,\n\t          8192,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t          uncompressed_data,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_decompress_data(\n\t          uncompressed_data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t          uncompressed_data,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_decompress_data(\n\t          fsntfs_test_compression_lznt1_compressed_data1,\n\t          8192,\n\t          -1,\n\t          uncompressed_data,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_decompress_data(\n\t          fsntfs_test_compression_lznt1_compressed_data1,\n\t          8192,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t          NULL,\n\t          &uncompressed_data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_decompress_data(\n\t          fsntfs_test_compression_lznt1_compressed_data1,\n\t          8192,\n\t          LIBFSNTFS_COMPRESSION_METHOD_LZNT1,\n\t          uncompressed_data,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tmemory_free(\n\t uncompressed_data );\n\n\tuncompressed_data = NULL;\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( uncompressed_data != NULL )\n\t{\n\t\tmemory_free(\n\t\t uncompressed_data );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_decompress_data\",\n\t fsntfs_test_decompress_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compression_unit_data_handle.c",
    "content": "/*\n * Library compression_unit_data_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compression_unit_data_handle.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_compression_unit_data_handle_data1[ 80 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x01, 0x01, 0x0e, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compression_unit_data_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compression_unit_data_handle_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_compression_unit_data_handle_t *compression_unit_data_handle = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                               = NULL;\n\tint result                                                             = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                        = 1;\n\tint number_of_memset_fail_tests                                        = 1;\n\tint test_number                                                        = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_compression_unit_data_handle_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t          &compression_unit_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compression_unit_data_handle\",\n\t compression_unit_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compression_unit_data_handle_free(\n\t          &compression_unit_data_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compression_unit_data_handle\",\n\t compression_unit_data_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompression_unit_data_handle = (libfsntfs_compression_unit_data_handle_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t          &compression_unit_data_handle,\n\t          io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tcompression_unit_data_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t          &compression_unit_data_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t          &compression_unit_data_handle,\n\t          io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compression_unit_data_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t\t          &compression_unit_data_handle,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compression_unit_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compression_unit_data_handle_free(\n\t\t\t\t &compression_unit_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compression_unit_data_handle\",\n\t\t\t compression_unit_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compression_unit_data_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compression_unit_data_handle_initialize(\n\t\t          &compression_unit_data_handle,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compression_unit_data_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compression_unit_data_handle_free(\n\t\t\t\t &compression_unit_data_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compression_unit_data_handle\",\n\t\t\t compression_unit_data_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compression_unit_data_handle != NULL )\n\t{\n\t\tlibfsntfs_compression_unit_data_handle_free(\n\t\t &compression_unit_data_handle,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compression_unit_data_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compression_unit_data_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compression_unit_data_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compression_unit_data_handle_initialize\",\n\t fsntfs_test_compression_unit_data_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compression_unit_data_handle_free\",\n\t fsntfs_test_compression_unit_data_handle_free );\n\n\t/* TODO add tests for libfsntfs_compression_unit_data_handle_get_number_of_descriptors */\n\n\t/* TODO add tests for libfsntfs_compression_unit_data_handle_get_descriptor_by_index */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_compression_unit_descriptor.c",
    "content": "/*\n * Library compression_unit_descriptor type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_compression_unit_descriptor.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_compression_unit_descriptor_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compression_unit_descriptor_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                             = NULL;\n\tlibfsntfs_compression_unit_descriptor_t *compression_unit_descriptor = NULL;\n\tint result                                                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                      = 1;\n\tint number_of_memset_fail_tests                                      = 1;\n\tint test_number                                                      = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_compression_unit_descriptor_initialize(\n\t          &compression_unit_descriptor,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"compression_unit_descriptor\",\n\t compression_unit_descriptor );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_compression_unit_descriptor_free(\n\t          &compression_unit_descriptor,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"compression_unit_descriptor\",\n\t compression_unit_descriptor );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compression_unit_descriptor_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tcompression_unit_descriptor = (libfsntfs_compression_unit_descriptor_t *) 0x12345678UL;\n\n\tresult = libfsntfs_compression_unit_descriptor_initialize(\n\t          &compression_unit_descriptor,\n\t          &error );\n\n\tcompression_unit_descriptor = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compression_unit_descriptor_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compression_unit_descriptor_initialize(\n\t\t          &compression_unit_descriptor,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( compression_unit_descriptor != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compression_unit_descriptor_free(\n\t\t\t\t &compression_unit_descriptor,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compression_unit_descriptor\",\n\t\t\t compression_unit_descriptor );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_compression_unit_descriptor_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_compression_unit_descriptor_initialize(\n\t\t          &compression_unit_descriptor,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( compression_unit_descriptor != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_compression_unit_descriptor_free(\n\t\t\t\t &compression_unit_descriptor,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"compression_unit_descriptor\",\n\t\t\t compression_unit_descriptor );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( compression_unit_descriptor != NULL )\n\t{\n\t\tlibfsntfs_compression_unit_descriptor_free(\n\t\t &compression_unit_descriptor,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_compression_unit_descriptor_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_compression_unit_descriptor_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_compression_unit_descriptor_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compression_unit_descriptor_initialize\",\n\t fsntfs_test_compression_unit_descriptor_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_compression_unit_descriptor_free\",\n\t fsntfs_test_compression_unit_descriptor_free );\n\n\t/* TODO: add tests for libfsntfs_compression_unit_descriptor_append_data_segment */\n\n\t/* TODO: add tests for libfsntfs_compression_unit_descriptor_print */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_data_run.c",
    "content": "/*\n * Library data_run type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_data_run.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n\nuint8_t fsntfs_test_data_run_data1[ 6 ] = {\n\t0x11, 0x03, 0x37, 0x01, 0x0d, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_data_run_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_run_initialize(\n     void )\n{\n\tlibcerror_error_t *error        = NULL;\n\tlibfsntfs_data_run_t *data_run  = NULL;\n\tint result                      = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests = 1;\n\tint number_of_memset_fail_tests = 1;\n\tint test_number                 = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_run_initialize(\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_run\",\n\t data_run );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_data_run_free(\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_run\",\n\t data_run );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_run_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdata_run = (libfsntfs_data_run_t *) 0x12345678UL;\n\n\tresult = libfsntfs_data_run_initialize(\n\t          &data_run,\n\t          &error );\n\n\tdata_run = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_data_run_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_data_run_initialize(\n\t\t          &data_run,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( data_run != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_data_run_free(\n\t\t\t\t &data_run,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"data_run\",\n\t\t\t data_run );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_data_run_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_data_run_initialize(\n\t\t          &data_run,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( data_run != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_data_run_free(\n\t\t\t\t &data_run,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"data_run\",\n\t\t\t data_run );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( data_run != NULL )\n\t{\n\t\tlibfsntfs_data_run_free(\n\t\t &data_run,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_run_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_run_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_run_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_run_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_run_read_data(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_data_run_t *data_run   = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tssize_t read_count               = 0;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_data_run_initialize(\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_run\",\n\t data_run );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              fsntfs_test_data_run_data1,\n\t              6,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 3 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->cluster_block_number\",\n\t data_run->cluster_block_number,\n\t (uint64_t) 55 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->start_offset\",\n\t (uint64_t) data_run->start_offset,\n\t (uint64_t) 55 * 4096 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->size\",\n\t (uint64_t) data_run->size,\n\t (uint64_t) 12288 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"data_run->range_flags\",\n\t (uint32_t) data_run->range_flags,\n\t (uint32_t) 0 );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              &( fsntfs_test_data_run_data1[ 3 ] ),\n\t              6 - 3,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 2 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->cluster_block_number\",\n\t data_run->cluster_block_number,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->start_offset\",\n\t (uint64_t) data_run->start_offset,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->size\",\n\t (uint64_t) data_run->size,\n\t (uint64_t) 53248 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"data_run->range_flags\",\n\t (uint32_t) data_run->range_flags,\n\t (uint32_t) LIBFDATA_RANGE_FLAG_IS_SPARSE );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              &( fsntfs_test_data_run_data1[ 5 ] ),\n\t              6 - 5,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->cluster_block_number\",\n\t data_run->cluster_block_number,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->start_offset\",\n\t (uint64_t) data_run->start_offset,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"data_run->size\",\n\t (uint64_t) data_run->size,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"data_run->range_flags\",\n\t (uint32_t) data_run->range_flags,\n\t (uint32_t) 0 );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_data_run_read_data(\n\t              NULL,\n\t              io_handle,\n\t              fsntfs_test_data_run_data1,\n\t              6,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              NULL,\n\t              fsntfs_test_data_run_data1,\n\t              6,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              NULL,\n\t              6,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              fsntfs_test_data_run_data1,\n\t              (size_t) SSIZE_MAX + 1,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_run_read_data(\n\t              data_run,\n\t              io_handle,\n\t              fsntfs_test_data_run_data1,\n\t              0,\n\t              data_run->cluster_block_number,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_data_run_free(\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_run\",\n\t data_run );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( data_run != NULL )\n\t{\n\t\tlibfsntfs_data_run_free(\n\t\t &data_run,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_data_run_initialize\",\n\t fsntfs_test_data_run_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_data_run_free\",\n\t fsntfs_test_data_run_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_data_run_read_data\",\n\t fsntfs_test_data_run_read_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_data_stream.c",
    "content": "/*\n * Library data_stream type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_SYS_TIME_H )\n#include <sys/time.h>\n#endif\n\n#include <time.h>\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_rwlock.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_data_stream.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\n/* Define to make fsntfs_test_file generate verbose output\n#define FSNTFS_TEST_DATA_STREAM_VERBOSE\n */\n\n#define FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE\t4096\n\nuint8_t fsntfs_test_data_stream_data1[ 112 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x01, 0x11, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x56, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x57, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x72, 0x00,\n\t0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x44, 0x00, 0x61, 0x00, 0x74, 0x00,\n\t0x61, 0x00, 0x11, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_data_stream_data2[ 24576 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x09, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x45, 0x53, 0x53, 0x45, 0x52, 0x20,\n\t0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x4c,\n\t0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x39, 0x20, 0x4a, 0x75, 0x6e, 0x65,\n\t0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,\n\t0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x30, 0x37, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,\n\t0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a,\n\t0x2f, 0x2f, 0x66, 0x73, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a, 0x20, 0x45, 0x76, 0x65,\n\t0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74,\n\t0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64,\n\t0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x72, 0x62, 0x61, 0x74,\n\t0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e,\n\t0x67, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f,\n\t0x77, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,\n\t0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69,\n\t0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x74, 0x68, 0x65, 0x20,\n\t0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65,\n\t0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,\n\t0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20,\n\t0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x30, 0x2e, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x44,\n\t0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41,\n\t0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x2c, 0x20, 0x22,\n\t0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73,\n\t0x73, 0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x22, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x22, 0x20, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20,\n\t0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x67,\n\t0x6f, 0x76, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74,\n\t0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x22, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x6e, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x6b,\n\t0x65, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74,\n\t0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a,\n\t0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20,\n\t0x62, 0x75, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64,\n\t0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e,\n\t0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x63,\n\t0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20,\n\t0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x65, 0x6d, 0x65, 0x64,\n\t0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x0a, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67,\n\t0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72,\n\t0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,\n\t0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61,\n\t0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62,\n\t0x79, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x6c,\n\t0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a, 0x77,\n\t0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x61, 0x73, 0x20,\n\t0x6d, 0x61, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x61, 0x6c,\n\t0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a,\n\t0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65,\n\t0x20, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x43, 0x6f,\n\t0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69,\n\t0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,\n\t0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73,\n\t0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x6f, 0x6c, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f,\n\t0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,\n\t0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,\n\t0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c,\n\t0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x61,\n\t0x6e, 0x64, 0x20, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,\n\t0x61, 0x6d, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72,\n\t0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x66, 0x72, 0x6f,\n\t0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31,\n\t0x2e, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x53,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76,\n\t0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,\n\t0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x33, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x34,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,\n\t0x0a, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x62,\n\t0x6f, 0x75, 0x6e, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x32, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e,\n\t0x67, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d,\n\t0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64,\n\t0x2c, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c,\n\t0x69, 0x74, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20,\n\t0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61,\n\t0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20,\n\t0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x28, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d,\n\t0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,\n\t0x74, 0x68, 0x65, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20,\n\t0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20,\n\t0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69,\n\t0x66, 0x69, 0x65, 0x64, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x0a, 0x20,\n\t0x20, 0x20, 0x61, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,\n\t0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,\n\t0x61, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x61, 0x69, 0x74, 0x68, 0x20, 0x65, 0x66, 0x66,\n\t0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65,\n\t0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x76,\n\t0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70,\n\t0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x6f,\n\t0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x65, 0x72,\n\t0x66, 0x6f, 0x72, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,\n\t0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x75,\n\t0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6d, 0x65,\n\t0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x62, 0x29, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x6e, 0x65,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,\n\t0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,\n\t0x66, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x33, 0x2e,\n\t0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72,\n\t0x69, 0x61, 0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x20, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64,\n\t0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x70, 0x70,\n\t0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6e, 0x63,\n\t0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,\n\t0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x61, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20,\n\t0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,\n\t0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x63, 0x6f,\n\t0x64, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x70,\n\t0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x69, 0x66,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65,\n\t0x64, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f,\n\t0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6d,\n\t0x65, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,\n\t0x73, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,\n\t0x65, 0x0a, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x63,\n\t0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6d, 0x61, 0x6c,\n\t0x6c, 0x20, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x2c, 0x20, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,\n\t0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74,\n\t0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x28, 0x74, 0x65, 0x6e, 0x20, 0x6f, 0x72,\n\t0x20, 0x66, 0x65, 0x77, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20,\n\t0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20,\n\t0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,\n\t0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69,\n\t0x76, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74,\n\t0x69, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f,\n\t0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,\n\t0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,\n\t0x20, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65,\n\t0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64,\n\t0x20, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20,\n\t0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,\n\t0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20,\n\t0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62,\n\t0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x34, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65,\n\t0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,\n\t0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,\n\t0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,\n\t0x68, 0x6f, 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2c, 0x0a, 0x74, 0x61, 0x6b, 0x65,\n\t0x6e, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x20, 0x65, 0x66, 0x66, 0x65,\n\t0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72,\n\t0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x6f, 0x72, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x0a, 0x65,\n\t0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,\n\t0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6d, 0x6f,\n\t0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x69, 0x66, 0x20,\n\t0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68,\n\t0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,\n\t0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70,\n\t0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57,\n\t0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20,\n\t0x69, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69,\n\t0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f,\n\t0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x41, 0x63,\n\t0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,\n\t0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,\n\t0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69,\n\t0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n\t0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x61, 0x20,\n\t0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x63, 0x6f, 0x70, 0x79,\n\t0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x64, 0x75,\n\t0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,\n\t0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20,\n\t0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e,\n\t0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20,\n\t0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x64,\n\t0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65,\n\t0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x69,\n\t0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50,\n\t0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,\n\t0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x64, 0x29, 0x20, 0x44, 0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c,\n\t0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70,\n\t0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x69,\n\t0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x6e,\n\t0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,\n\t0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,\n\t0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x6c, 0x69, 0x6e,\n\t0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x56,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,\n\t0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x6d,\n\t0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74,\n\t0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x65,\n\t0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,\n\t0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,\n\t0x79, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x29, 0x20, 0x55, 0x73, 0x65,\n\t0x20, 0x61, 0x20, 0x73, 0x75, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x61, 0x72,\n\t0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61,\n\t0x6e, 0x69, 0x73, 0x6d, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x73, 0x75, 0x69,\n\t0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x20,\n\t0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x61, 0x29, 0x20,\n\t0x75, 0x73, 0x65, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65,\n\t0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6c,\n\t0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e,\n\t0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70,\n\t0x75, 0x74, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x79, 0x73, 0x74,\n\t0x65, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x62, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c,\n\t0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x6c,\n\t0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,\n\t0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,\n\t0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20,\n\t0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20,\n\t0x20, 0x65, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74,\n\t0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69,\n\t0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65,\n\t0x72, 0x77, 0x69, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75,\n\t0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47,\n\t0x50, 0x4c, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79,\n\t0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20,\n\t0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x57, 0x6f,\n\t0x72, 0x6b, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x72,\n\t0x65, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65,\n\t0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x41,\n\t0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,\n\t0x61, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64,\n\t0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x28, 0x49, 0x66, 0x0a, 0x20, 0x20,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20,\n\t0x34, 0x64, 0x30, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,\n\t0x0a, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x20,\n\t0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,\n\t0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x64,\n\t0x31, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76,\n\t0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65,\n\t0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73,\n\t0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x0a, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63,\n\t0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x29, 0x0a,\n\t0x0a, 0x20, 0x20, 0x35, 0x2e, 0x20, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75,\n\t0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61,\n\t0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20,\n\t0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74,\n\t0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x0a,\n\t0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74,\n\t0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73,\n\t0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f,\n\t0x6e, 0x76, 0x65, 0x79, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,\n\t0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x75, 0x6e, 0x64,\n\t0x65, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72,\n\t0x0a, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20,\n\t0x64, 0x6f, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,\n\t0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x61, 0x29,\n\t0x20, 0x41, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,\n\t0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20,\n\t0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73,\n\t0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64,\n\t0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69,\n\t0x65, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64, 0x20,\n\t0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,\n\t0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e,\n\t0x0a, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x47, 0x69, 0x76, 0x65, 0x20, 0x70, 0x72, 0x6f,\n\t0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x77, 0x69,\n\t0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72,\n\t0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,\n\t0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65,\n\t0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20,\n\t0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x61,\n\t0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x63, 0x6f,\n\t0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20,\n\t0x20, 0x36, 0x2e, 0x20, 0x52, 0x65, 0x76, 0x69, 0x73, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20,\n\t0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,\n\t0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a,\n\t0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77,\n\t0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,\n\t0x61, 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73,\n\t0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,\n\t0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,\n\t0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,\n\t0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x69, 0x6d,\n\t0x65, 0x2e, 0x20, 0x53, 0x75, 0x63, 0x68, 0x20, 0x6e, 0x65, 0x77, 0x0a, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6d,\n\t0x69, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x20, 0x74,\n\t0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x64,\n\t0x69, 0x66, 0x66, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20,\n\t0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70,\n\t0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65,\n\t0x72, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20,\n\t0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x49,\n\t0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73,\n\t0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74,\n\t0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,\n\t0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,\n\t0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,\n\t0x6e, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74, 0x65,\n\t0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n\t0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,\n\t0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,\n\t0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,\n\t0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,\n\t0x61, 0x74, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,\n\t0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x70, 0x75, 0x62,\n\t0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,\n\t0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e,\n\t0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c,\n\t0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65,\n\t0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e,\n\t0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72,\n\t0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74,\n\t0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x0a, 0x47, 0x65,\n\t0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,\n\t0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68,\n\t0x6f, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,\n\t0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73,\n\t0x65, 0x72, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,\n\t0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x70,\n\t0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f,\n\t0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20,\n\t0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x61, 0x73, 0x20, 0x79,\n\t0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x73,\n\t0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20,\n\t0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65,\n\t0x0a, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20,\n\t0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,\n\t0x47, 0x4e, 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72,\n\t0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,\n\t0x65, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x74,\n\t0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x27, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c,\n\t0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20,\n\t0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,\n\t0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x70, 0x65, 0x72,\n\t0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,\n\t0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20,\n\t0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73,\n\t0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_data_stream_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_data_stream_t *data_stream     = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 3;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_data_stream_data1,\n\t          112,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_initialize(\n\t          &data_stream,\n\t          io_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_data_stream_free(\n\t          &data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_initialize(\n\t          NULL,\n\t          io_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdata_stream = (libfsntfs_data_stream_t *) 0x12345678UL;\n\n\tresult = libfsntfs_data_stream_initialize(\n\t          &data_stream,\n\t          io_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tdata_stream = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_initialize(\n\t          &data_stream,\n\t          NULL,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_initialize(\n\t          &data_stream,\n\t          io_handle,\n\t          NULL,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_data_stream_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_data_stream_initialize(\n\t\t          &data_stream,\n\t\t          io_handle,\n\t\t          NULL,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( data_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_data_stream_free(\n\t\t\t\t &data_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"data_stream\",\n\t\t\t data_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_data_stream_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_data_stream_initialize(\n\t\t          &data_stream,\n\t\t          io_handle,\n\t\t          NULL,\n\t\t          mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( data_stream != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_data_stream_free(\n\t\t\t\t &data_stream,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"data_stream\",\n\t\t\t data_stream );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( data_stream != NULL )\n\t{\n\t\tlibfsntfs_data_stream_free(\n\t\t &data_stream,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_data_stream_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_data_stream_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_utf8_name_size(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          data_stream,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 18 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          data_stream,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_utf8_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          data_stream,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_utf8_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf8_name_size(\n\t          data_stream,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_utf8_name(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tuint8_t utf8_name[ 32 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          utf8_name,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          NULL,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_utf8_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          utf8_name,\n\t          32,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_utf8_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf8_name(\n\t          data_stream,\n\t          utf8_name,\n\t          32,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_utf16_name_size(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t          data_stream,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 18 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t          data_stream,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_utf16_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t          data_stream,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_utf16_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf16_name_size(\n\t          data_stream,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_utf16_name(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tuint16_t utf16_name[ 32 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          utf16_name,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          NULL,\n\t          32,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_utf16_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          utf16_name,\n\t          32,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_utf16_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_utf16_name(\n\t          data_stream,\n\t          utf16_name,\n\t          32,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_read_buffer function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_read_buffer(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tuint8_t buffer[ FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE ];\n\n\tlibcerror_error_t *error     = NULL;\n\ttime_t timestamp             = 0;\n\tsize64_t data_size           = 0;\n\tsize64_t remaining_data_size = 0;\n\tsize_t read_size             = 0;\n\tssize_t read_count           = 0;\n\toff64_t offset               = 0;\n\toff64_t read_offset          = 0;\n\tint number_of_tests          = 1024;\n\tint random_number            = 0;\n\tint result                   = 0;\n\tint test_number              = 0;\n\n\t/* Determine size\n\t */\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_size = FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE;\n\n\tif( data_size < FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE )\n\t{\n\t\tread_size = (size_t) data_size;\n\t}\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) read_size );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tif( data_size > 8 )\n\t{\n\t\t/* Set offset to data_size - 8\n\t\t */\n\t\toffset = libfsntfs_data_stream_seek_offset(\n\t\t          data_stream,\n\t\t          -8,\n\t\t          SEEK_END,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t (int64_t) data_size - 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer on data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_data_stream_read_buffer(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer beyond data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_data_stream_read_buffer(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Stress test read buffer\n\t */\n\ttimestamp = time(\n\t             NULL );\n\n\tsrand(\n\t (unsigned int) timestamp );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tremaining_data_size = data_size;\n\n\tfor( test_number = 0;\n\t     test_number < number_of_tests;\n\t     test_number++ )\n\t{\n\t\trandom_number = rand();\n\n\t\tFSNTFS_TEST_ASSERT_GREATER_THAN_INT(\n\t\t \"random_number\",\n\t\t random_number,\n\t\t -1 );\n\n\t\tread_size = (size_t) random_number % FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE;\n\n#if defined( FSNTFS_TEST_DATA_STREAM_VERBOSE )\n\t\tfprintf(\n\t\t stdout,\n\t\t \"libfsntfs_data_stream_read_buffer: at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") of size: %\" PRIzd \"\\n\",\n\t\t read_offset,\n\t\t read_offset,\n\t\t read_size );\n#endif\n\t\tread_count = libfsntfs_data_stream_read_buffer(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              read_size,\n\t\t              &error );\n\n\t\tif( read_size > remaining_data_size )\n\t\t{\n\t\t\tread_size = (size_t) remaining_data_size;\n\t\t}\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) read_size );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tread_offset += read_count;\n\n\t\tresult = libfsntfs_data_stream_get_offset(\n\t\t          data_stream,\n\t\t          &offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t read_offset );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tremaining_data_size -= read_count;\n\n\t\tif( remaining_data_size == 0 )\n\t\t{\n\t\t\toffset = libfsntfs_data_stream_seek_offset(\n\t\t\t          data_stream,\n\t\t\t          0,\n\t\t\t          SEEK_SET,\n\t\t\t          &error );\n\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t\t \"offset\",\n\t\t\t offset,\n\t\t\t (int64_t) 0 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tread_offset = 0;\n\n\t\t\tremaining_data_size = data_size;\n\t\t}\n\t}\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              NULL,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              data_stream,\n\t              NULL,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              data_stream,\n\t              buffer,\n\t              (size_t) SSIZE_MAX + 1,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_read_buffer with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_read_buffer with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_data_stream_read_buffer(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_read_buffer_at_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_read_buffer_at_offset(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tuint8_t buffer[ FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE ];\n\n\tlibcerror_error_t *error     = NULL;\n\ttime_t timestamp             = 0;\n\tsize64_t data_size           = 0;\n\tsize64_t remaining_data_size = 0;\n\tsize_t read_size             = 0;\n\tssize_t read_count           = 0;\n\toff64_t offset               = 0;\n\toff64_t read_offset          = 0;\n\tint number_of_tests          = 1024;\n\tint random_number            = 0;\n\tint result                   = 0;\n\tint test_number              = 0;\n\n\t/* Determine size\n\t */\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_size = FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE;\n\n\tif( data_size < FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE )\n\t{\n\t\tread_size = (size_t) data_size;\n\t}\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) read_size );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tif( data_size > 8 )\n\t{\n\t\t/* Read buffer on data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t\t              data_size - 8,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer beyond data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t\t              data_size + 8,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Stress test read buffer\n\t */\n\ttimestamp = time(\n\t             NULL );\n\n\tsrand(\n\t (unsigned int) timestamp );\n\n\tfor( test_number = 0;\n\t     test_number < number_of_tests;\n\t     test_number++ )\n\t{\n\t\trandom_number = rand();\n\n\t\tFSNTFS_TEST_ASSERT_GREATER_THAN_INT(\n\t\t \"random_number\",\n\t\t random_number,\n\t\t -1 );\n\n\t\tif( data_size > 0 )\n\t\t{\n\t\t\tread_offset = (off64_t) random_number % data_size;\n\t\t}\n\t\tread_size = (size_t) random_number % FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE;\n\n#if defined( FSNTFS_TEST_DATA_STREAM_VERBOSE )\n\t\tfprintf(\n\t\t stdout,\n\t\t \"libfsntfs_data_stream_read_buffer_at_offset: at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") of size: %\" PRIzd \"\\n\",\n\t\t read_offset,\n\t\t read_offset,\n\t\t read_size );\n#endif\n\t\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t\t              data_stream,\n\t\t              buffer,\n\t\t              read_size,\n\t\t              read_offset,\n\t\t              &error );\n\n\t\tremaining_data_size = data_size - read_offset;\n\n\t\tif( read_size > remaining_data_size )\n\t\t{\n\t\t\tread_size = (size_t) remaining_data_size;\n\t\t}\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) read_size );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tread_offset += read_count;\n\n\t\tresult = libfsntfs_data_stream_get_offset(\n\t\t          data_stream,\n\t\t          &offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t read_offset );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              NULL,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              NULL,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              buffer,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              -1,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_read_buffer_at_offset with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_read_buffer_at_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_data_stream_read_buffer_at_offset(\n\t              data_stream,\n\t              buffer,\n\t              FSNTFS_TEST_DATA_STREAM_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_seek_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_seek_offset(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t size            = 0;\n\toff64_t offset           = 0;\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_END,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tsize = (size64_t) offset;\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          1024,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          -512,\n\t          SEEK_CUR,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 512 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          (off64_t) ( size + 512 ),\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) ( size + 512 ) );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          NULL,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          -1,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          -1,\n\t          SEEK_CUR,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          (off64_t) ( -1 * ( size + 1 ) ),\n\t          SEEK_END,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_seek_offset with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t (int64_t) offset,\n\t\t (int64_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_seek_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\toffset = libfsntfs_data_stream_seek_offset(\n\t          data_stream,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t (int64_t) offset,\n\t\t (int64_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_offset(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\toff64_t offset           = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_offset(\n\t          data_stream,\n\t          &offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_offset(\n\t          NULL,\n\t          &offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_offset(\n\t          data_stream,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_offset with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_offset(\n\t          data_stream,\n\t          &offset,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_offset(\n\t          data_stream,\n\t          &offset,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_size(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t size            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          &size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_size(\n\t          NULL,\n\t          &size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          &size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_size(\n\t          data_stream,\n\t          &size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_number_of_extents function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_number_of_extents(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_extents    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          data_stream,\n\t          &number_of_extents,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_extents\",\n\t number_of_extents,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          NULL,\n\t          &number_of_extents,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          data_stream,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_number_of_extents with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          data_stream,\n\t          &number_of_extents,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_number_of_extents with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_number_of_extents(\n\t          data_stream,\n\t          &number_of_extents,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_data_stream_get_extent_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_data_stream_get_extent_by_index(\n     libfsntfs_data_stream_t *data_stream )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t extent_size     = 0;\n\toff64_t extent_offset    = 0;\n\tuint32_t extent_flags    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          NULL,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          -1,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          NULL,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          &extent_offset,\n\t          NULL,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_data_stream_get_extent_by_index with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_data_stream_get_extent_by_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_data_stream_get_extent_by_index(\n\t          data_stream,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibbfio_handle_t *file_io_handle         = NULL;\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_data_stream_t *data_stream     = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_DATA_STREAM_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_data_stream_initialize\",\n\t fsntfs_test_data_stream_initialize );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_data_stream_free\",\n\t fsntfs_test_data_stream_free );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize data stream for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_data_stream_data1,\n\t          112,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_data_stream_data2,\n\t          24576,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_data_stream_initialize(\n\t          &data_stream,\n\t          io_handle,\n\t          file_io_handle,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_utf8_name_size\",\n\t fsntfs_test_data_stream_get_utf8_name_size,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_utf8_name\",\n\t fsntfs_test_data_stream_get_utf8_name,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_utf16_name_size\",\n\t fsntfs_test_data_stream_get_utf16_name_size,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_utf16_name\",\n\t fsntfs_test_data_stream_get_utf16_name,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_read_buffer\",\n\t fsntfs_test_data_stream_read_buffer,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_read_buffer_at_offset\",\n\t fsntfs_test_data_stream_read_buffer_at_offset,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_seek_offset\",\n\t fsntfs_test_data_stream_seek_offset,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_offset\",\n\t fsntfs_test_data_stream_get_offset,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_size\",\n\t fsntfs_test_data_stream_get_size,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_number_of_extents\",\n\t fsntfs_test_data_stream_get_number_of_extents,\n\t data_stream );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_data_stream_get_extent_by_index\",\n\t fsntfs_test_data_stream_get_extent_by_index,\n\t data_stream );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_data_stream_free(\n\t          &data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( data_stream != NULL )\n\t{\n\t\tlibfsntfs_data_stream_free(\n\t         &data_stream,\n\t         &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t         &mft_attribute,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_directory_entries_tree.c",
    "content": "/*\n * Library directory_entries_tree type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n#include \"../libfsntfs/libfsntfs_directory_entries_tree.h\"\n#include \"../libfsntfs/libfsntfs_directory_entry.h\"\n#include \"../libfsntfs/libfsntfs_index.h\"\n#include \"../libfsntfs/libfsntfs_index_node.h\"\n#include \"../libfsntfs/libfsntfs_index_value.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_entry.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_directory_entries_tree_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tint result                                                 = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                            = 1;\n\tint number_of_memset_fail_tests                            = 1;\n\tint test_number                                            = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdirectory_entries_tree = (libfsntfs_directory_entries_tree_t *) 0x12345678UL;\n\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tdirectory_entries_tree = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_directory_entries_tree_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_directory_entries_tree_initialize(\n\t\t          &directory_entries_tree,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( directory_entries_tree != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_directory_entries_tree_free(\n\t\t\t\t &directory_entries_tree,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"directory_entries_tree\",\n\t\t\t directory_entries_tree );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_directory_entries_tree_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_directory_entries_tree_initialize(\n\t\t          &directory_entries_tree,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( directory_entries_tree != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_directory_entries_tree_free(\n\t\t\t\t &directory_entries_tree,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"directory_entries_tree\",\n\t\t\t directory_entries_tree );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_insert_index_value function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_insert_index_value(\n     void )\n{\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tlibfsntfs_index_value_t *index_value                       = NULL;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n/* TODO implement */\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_insert_index_value(\n\t          NULL,\n\t          0,\n\t          index_value,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_insert_index_value(\n\t          directory_entries_tree,\n\t          0,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_read_from_index_node function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_read_from_index_node(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle                           = NULL;\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tlibfsntfs_index_node_t *index_node                         = NULL;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n/* TODO implement */\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_read_from_index_node(\n\t          NULL,\n\t          file_io_handle,\n\t          index_node,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_index_node(\n\t          directory_entries_tree,\n\t          NULL,\n\t          index_node,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_index_node(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_index_node(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          LIBFSNTFS_MAXIMUM_RECURSION_DEPTH + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_read_from_i30_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_read_from_i30_index(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle                           = NULL;\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tlibfsntfs_io_handle_t *io_handle                           = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry                           = NULL;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n/* TODO implement */\n/* TODO implement test with LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY */\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_read_from_i30_index(\n\t          NULL,\n\t          io_handle,\n\t          file_io_handle,\n\t          mft_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_i30_index(\n\t          directory_entries_tree,\n\t          NULL,\n\t          file_io_handle,\n\t          mft_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_i30_index(\n\t          directory_entries_tree,\n\t          io_handle,\n\t          NULL,\n\t          mft_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_read_from_i30_index(\n\t          directory_entries_tree,\n\t          io_handle,\n\t          file_io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_number_of_entries function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_number_of_entries(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_entries    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_number_of_entries(\n\t          directory_entries_tree,\n\t          &number_of_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_entries\",\n\t number_of_entries,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_number_of_entries(\n\t          NULL,\n\t          &number_of_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_number_of_entries(\n\t          directory_entries_tree,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_entry_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_entry_by_index(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO implement file IO handle\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_index(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          0,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_index(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_index(\n\t          directory_entries_tree,\n\t          NULL,\n\t          0,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_index(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          -1,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_index(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tuint8_t name[ 5 ]                            = { 'n', 'a', 'm', 'e', 0 };\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_index_node_t *index_node           = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO implement file IO handle\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          NULL,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          NULL,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          NULL,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          NULL,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          LIBFSNTFS_MAXIMUM_RECURSION_DEPTH + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_entry_by_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_entry_by_utf8_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tuint8_t name[ 5 ]                            = { 'n', 'a', 'm', 'e', 0 };\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_index_t *i30_index                 = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO implement file IO handle\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t          NULL,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ti30_index = directory_entries_tree->i30_index;\n\n\tdirectory_entries_tree->i30_index = NULL;\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tdirectory_entries_tree->i30_index = i30_index;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf8_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tuint16_t name[ 5 ]                           = { 'n', 'a', 'm', 'e', 0 };\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_index_node_t *index_node           = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO implement file IO handle\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          NULL,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          NULL,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          NULL,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          NULL,\n\t          4,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          index_node,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          LIBFSNTFS_MAXIMUM_RECURSION_DEPTH + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entries_tree_get_entry_by_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entries_tree_get_entry_by_utf16_name(\n     libfsntfs_directory_entries_tree_t *directory_entries_tree )\n{\n\tuint16_t name[ 5 ]                           = { 'n', 'a', 'm', 'e', 0 };\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_index_t *i30_index                 = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO implement file IO handle\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t          NULL,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ti30_index = directory_entries_tree->i30_index;\n\n\tdirectory_entries_tree->i30_index = NULL;\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          &directory_entry,\n\t          &error );\n\n\tdirectory_entries_tree->i30_index = i30_index;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entries_tree_get_entry_by_utf16_name(\n\t          directory_entries_tree,\n\t          file_io_handle,\n\t          name,\n\t          4,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_directory_entries_tree_t *directory_entries_tree = NULL;\n\tint result                                                 = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entries_tree_initialize\",\n\t fsntfs_test_directory_entries_tree_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entries_tree_free\",\n\t fsntfs_test_directory_entries_tree_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entries_tree_insert_index_value\",\n\t fsntfs_test_directory_entries_tree_insert_index_value );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entries_tree_read_from_index_node\",\n\t fsntfs_test_directory_entries_tree_read_from_index_node );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entries_tree_read_from_i30_index\",\n\t fsntfs_test_directory_entries_tree_read_from_i30_index );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize data stream for tests\n\t */\n\tresult = libfsntfs_directory_entries_tree_initialize(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_number_of_entries\",\n\t fsntfs_test_directory_entries_tree_get_number_of_entries,\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_entry_by_index\",\n\t fsntfs_test_directory_entries_tree_get_entry_by_index,\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name\",\n\t fsntfs_test_directory_entries_tree_get_entry_from_index_node_by_utf8_name,\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_entry_by_utf8_name\",\n\t fsntfs_test_directory_entries_tree_get_entry_by_utf8_name,\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name\",\n\t fsntfs_test_directory_entries_tree_get_entry_from_index_node_by_utf16_name,\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entries_tree_get_entry_by_utf16_name\",\n\t fsntfs_test_directory_entries_tree_get_entry_by_utf16_name,\n\t directory_entries_tree );\n\n\t/* TODO add tests for libfsntfs_directory_entries_tree_read_element_data */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entries_tree_free(\n\t          &directory_entries_tree,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entries_tree\",\n\t directory_entries_tree );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entries_tree != NULL )\n\t{\n\t\tlibfsntfs_directory_entries_tree_free(\n\t\t &directory_entries_tree,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_directory_entry.c",
    "content": "/*\n * Library directory_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcdata.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_directory_entry.h\"\n#include \"../libfsntfs/libfsntfs_file_name_values.h\"\n\nuint8_t fsntfs_test_directory_entry_data1[ 74 ] = {\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_directory_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_initialize(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tint result                                   = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests              = 1;\n\tint number_of_memset_fail_tests              = 1;\n\tint test_number                              = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_free(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdirectory_entry = (libfsntfs_directory_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &directory_entry,\n\t          &error );\n\n\tdirectory_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_directory_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_directory_entry_initialize(\n\t\t          &directory_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( directory_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t\t &directory_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"directory_entry\",\n\t\t\t directory_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_directory_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_directory_entry_initialize(\n\t\t          &directory_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( directory_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_directory_entry_free(\n\t\t\t\t &directory_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"directory_entry\",\n\t\t\t directory_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_clone function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_clone(\n     void )\n{\n\tlibcerror_error_t *error                                 = NULL;\n\tlibfsntfs_directory_entry_t *destination_directory_entry = NULL;\n\tlibfsntfs_directory_entry_t *source_directory_entry      = NULL;\n\tint result                                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &source_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"source_directory_entry\",\n\t source_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n/* TODO add file name values */\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_clone(\n\t          &destination_directory_entry,\n\t          source_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"destination_directory_entry\",\n\t destination_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_free(\n\t          &destination_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"destination_directory_entry\",\n\t destination_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_clone(\n\t          &destination_directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"destination_directory_entry\",\n\t destination_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_clone(\n\t          NULL,\n\t          source_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entry_free(\n\t          &source_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"source_directory_entry\",\n\t source_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( destination_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &destination_directory_entry,\n\t\t NULL );\n\t}\n\tif( source_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &source_directory_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_compare_by_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_compare_by_file_reference(\n     void )\n{\n\tlibcerror_error_t *error                            = NULL;\n\tlibfsntfs_directory_entry_t *first_directory_entry  = NULL;\n\tlibfsntfs_directory_entry_t *second_directory_entry = NULL;\n\tint result                                          = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &first_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"first_directory_entry\",\n\t first_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &second_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"second_directory_entry\",\n\t second_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_compare_by_file_reference(\n\t          first_directory_entry,\n\t          second_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBCDATA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_compare_by_file_reference(\n\t          NULL,\n\t          second_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_compare_by_file_reference(\n\t          first_directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entry_free(\n\t          &second_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"second_directory_entry\",\n\t second_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_free(\n\t          &first_directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"first_directory_entry\",\n\t first_directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( second_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &second_directory_entry,\n\t\t NULL );\n\t}\n\tif( first_directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &first_directory_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_mft_entry_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_mft_entry_index(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t mft_entry_index = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_mft_entry_index(\n\t          directory_entry,\n\t          &mft_entry_index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_mft_entry_index(\n\t          NULL,\n\t          &mft_entry_index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_mft_entry_index(\n\t          directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_file_reference(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_file_reference(\n\t          directory_entry,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_file_reference(\n\t          NULL,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_file_reference(\n\t          directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_parent_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_parent_file_reference(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tlibcerror_error_t *error       = NULL;\n\tuint64_t parent_file_reference = 0;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO initialize directory_entry with file_name_values\n\tresult = libfsntfs_directory_entry_get_parent_file_reference(\n\t          directory_entry,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_parent_file_reference(\n\t          NULL,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_parent_file_reference(\n\t          directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_utf8_name_size(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf8_name_size(\n\t          directory_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf8_name_size(\n\t          directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_utf8_name(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t          directory_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t          directory_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t          directory_entry,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf8_name(\n\t          directory_entry,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_utf16_name_size(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf16_name_size(\n\t          directory_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf16_name_size(\n\t          directory_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_directory_entry_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_directory_entry_get_utf16_name(\n     libfsntfs_directory_entry_t *directory_entry )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t          directory_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t          directory_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t          directory_entry,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_directory_entry_get_utf16_name(\n\t          directory_entry,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tint result                                   = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entry_initialize\",\n\t fsntfs_test_directory_entry_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entry_free\",\n\t fsntfs_test_directory_entry_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entry_clone\",\n\t fsntfs_test_directory_entry_clone );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_directory_entry_compare_by_file_reference\",\n\t fsntfs_test_directory_entry_compare_by_file_reference );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &( directory_entry->file_name_values ),\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry->file_name_values\",\n\t directory_entry->file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          directory_entry->file_name_values,\n\t          fsntfs_test_directory_entry_data1,\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_mft_entry_index\",\n\t fsntfs_test_directory_entry_get_mft_entry_index,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_file_reference\",\n\t fsntfs_test_directory_entry_get_file_reference,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_parent_file_reference\",\n\t fsntfs_test_directory_entry_get_parent_file_reference,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_utf8_name_size\",\n\t fsntfs_test_directory_entry_get_utf8_name_size,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_utf8_name\",\n\t fsntfs_test_directory_entry_get_utf8_name,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_utf16_name_size\",\n\t fsntfs_test_directory_entry_get_utf16_name_size,\n\t directory_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_directory_entry_get_utf16_name\",\n\t fsntfs_test_directory_entry_get_utf16_name,\n\t directory_entry );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_directory_entry_free(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_error.c",
    "content": "/*\n * Library error functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n/* Tests the libfsntfs_error_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_error_free(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_error_free(\n\t NULL );\n\n\treturn( 1 );\n}\n\n/* Tests the libfsntfs_error_fprint function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_error_fprint(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_error_fprint(\n\t NULL,\n\t NULL );\n\n\treturn( 1 );\n}\n\n/* Tests the libfsntfs_error_sprint function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_error_sprint(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_error_sprint(\n\t NULL,\n\t NULL,\n\t 0 );\n\n\treturn( 1 );\n}\n\n/* Tests the libfsntfs_error_backtrace_fprint function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_error_backtrace_fprint(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_error_backtrace_fprint(\n\t NULL,\n\t NULL );\n\n\treturn( 1 );\n}\n\n/* Tests the libfsntfs_error_backtrace_sprint function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_error_backtrace_sprint(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_error_backtrace_sprint(\n\t NULL,\n\t NULL,\n\t 0 );\n\n\treturn( 1 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_error_free\",\n\t fsntfs_test_error_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_error_fprint\",\n\t fsntfs_test_error_fprint );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_error_sprint\",\n\t fsntfs_test_error_sprint );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_error_backtrace_fprint\",\n\t fsntfs_test_error_backtrace_fprint );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_error_backtrace_sprint\",\n\t fsntfs_test_error_backtrace_sprint );\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_extent.c",
    "content": "/*\n * Library extent type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_extent.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_extent_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_extent_initialize(\n     void )\n{\n\tlibcerror_error_t *error        = NULL;\n\tlibfsntfs_extent_t *extent      = NULL;\n\tint result                      = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests = 1;\n\tint number_of_memset_fail_tests = 1;\n\tint test_number                 = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_extent_initialize(\n\t          &extent,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"extent\",\n\t extent );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_extent_free(\n\t          &extent,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"extent\",\n\t extent );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_extent_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\textent = (libfsntfs_extent_t *) 0x12345678UL;\n\n\tresult = libfsntfs_extent_initialize(\n\t          &extent,\n\t          &error );\n\n\textent = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_extent_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_extent_initialize(\n\t\t          &extent,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( extent != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_extent_free(\n\t\t\t\t &extent,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"extent\",\n\t\t\t extent );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_extent_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_extent_initialize(\n\t\t          &extent,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( extent != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_extent_free(\n\t\t\t\t &extent,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"extent\",\n\t\t\t extent );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( extent != NULL )\n\t{\n\t\tlibfsntfs_extent_free(\n\t\t &extent,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_extent_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_extent_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_extent_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_extent_get_values function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_extent_get_values(\n     void )\n{\n\tlibcerror_error_t *error   = NULL;\n\tlibfsntfs_extent_t *extent = NULL;\n\tsize64_t extent_size       = 0;\n\toff64_t extent_offset      = 0;\n\tuint32_t extent_flags      = 0;\n\tint result                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_extent_initialize(\n\t          &extent,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"extent\",\n\t extent );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_extent_get_values(\n\t          extent,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_extent_get_values(\n\t          NULL,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_extent_get_values(\n\t          extent,\n\t          NULL,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_extent_get_values(\n\t          extent,\n\t          &extent_offset,\n\t          NULL,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_extent_get_values(\n\t          extent,\n\t          &extent_offset,\n\t          &extent_size,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_extent_free(\n\t          &extent,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"extent\",\n\t extent );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_extent_initialize\",\n\t fsntfs_test_extent_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_extent_free\",\n\t fsntfs_test_extent_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_extent_get_values\",\n\t fsntfs_test_extent_get_values );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_file_entry.c",
    "content": "/*\n * Library file_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_SYS_TIME_H )\n#include <sys/time.h>\n#endif\n\n#include <time.h>\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_rwlock.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n#include \"../libfsntfs/libfsntfs_directory_entry.h\"\n#include \"../libfsntfs/libfsntfs_file_entry.h\"\n#include \"../libfsntfs/libfsntfs_file_name_values.h\"\n#include \"../libfsntfs/libfsntfs_file_system.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n\n/* Define to make fsntfs_test_file generate verbose output\n#define FSNTFS_TEST_FILE_ENTRY_VERBOSE\n */\n\n#define FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE\t\t4096\n\nuint8_t fsntfs_test_file_entry_data1[ 16384 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xb7, 0x4e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xfd, 0x4e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x43, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4c, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x80, 0x01, 0xfe, 0x00, 0x22, 0x80, 0x00,\n\t0x7b, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x22, 0x80, 0x01, 0xfe, 0x00, 0x22, 0x80, 0x00, 0x7b, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xc0, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,\n\t0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xa2, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x41, 0x00, 0x74, 0x00,\n\t0x74, 0x00, 0x72, 0x00, 0x44, 0x00, 0x65, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x01, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x39, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x01, 0x00, 0x38, 0x00, 0x03, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01, 0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x44, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0xe4, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0xcc, 0x00, 0x00, 0x00,\n\t0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0xb8, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xff, 0x01, 0x1f, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x18, 0x00,\n\t0x00, 0x00, 0x00, 0x10, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0xff, 0x01, 0x1f, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x14, 0x00, 0x00, 0x00, 0x00, 0x10,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,\n\t0xbf, 0x01, 0x13, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x00,\n\t0x00, 0x0b, 0x14, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xa9, 0x00, 0x12, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x21, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x18, 0x00,\n\t0x00, 0x00, 0x00, 0xa0, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x21, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x04, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x11, 0x01, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x89, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n\t0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x42, 0x00, 0x69, 0x00, 0x74, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x70, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0x7e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0x7e, 0x02, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x4c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x24, 0x00, 0x42, 0x00, 0x6f, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,\n\t0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xcf, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x43, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x02, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xee, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00,\n\t0x02, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x7c, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x01, 0x00, 0x38, 0x00, 0x09, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xfe, 0x32, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x53, 0x00, 0x65, 0x00, 0x63, 0x00, 0x75, 0x00, 0x72, 0x00, 0x65, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x6c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x53, 0x00, 0x11, 0x41, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x70, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x49, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00,\n\t0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xcb, 0xc6, 0x02, 0x00,\n\t0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0xf7, 0xc8, 0x14, 0x34, 0x01, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x19, 0x22, 0x76, 0x20,\n\t0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x00, 0x00, 0x14, 0x38, 0x78, 0x2c, 0x03, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0xda, 0xc7, 0x23, 0x87,\n\t0x04, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x01, 0x00, 0x00, 0xb5, 0x87, 0xd3, 0x23, 0x05, 0x01, 0x00, 0x00, 0x50, 0x03, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x62, 0x9b, 0xa3, 0x0a,\n\t0x06, 0x01, 0x00, 0x00, 0xb0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x01, 0x00, 0x00, 0xf5, 0x06, 0xd3, 0x23, 0x07, 0x01, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00,\n\t0x11, 0x01, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x6c, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0a, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x55, 0x00, 0x70, 0x00, 0x43, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x05, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x69, 0x1b, 0x6b, 0x77, 0x7e, 0xdc, 0xda,\n\t0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x05, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00,\n\t0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0c, 0x69, 0x1b, 0x6b, 0x77, 0x7e, 0xdc, 0xda, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xee, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xe0, 0x50, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x01, 0x00, 0x38, 0x00, 0x03, 0x00, 0x50, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x45, 0x00, 0x78, 0x00, 0x74, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x28, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x24, 0x00, 0x44, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x74, 0x00, 0x65, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x60, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x24, 0x00, 0x4f, 0x00, 0x02, 0x00,\n\t0x6a, 0x00, 0x49, 0x00, 0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x60, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x24, 0x00, 0x51, 0x00, 0x75, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x24, 0x00, 0x52, 0x00, 0x65, 0x00,\n\t0x70, 0x00, 0x61, 0x00, 0x72, 0x00, 0x73, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x24, 0x00, 0x52, 0x00, 0x6d, 0x00, 0x4d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x61, 0x00,\n\t0x64, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x24, 0x00, 0x52, 0x00, 0x6d, 0x00,\n\t0x4d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x61, 0x00, 0x64, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0d, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 };\n\nuint8_t fsntfs_test_file_entry_data2[ 74 ] = {\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_file_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_initialize(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle     = NULL;\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_file_entry_t *file_entry   = NULL;\n\tlibfsntfs_file_system_t *file_system = NULL;\n\tlibfsntfs_io_handle_t *io_handle     = NULL;\n\tint result                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests      = 1;\n\tint number_of_memset_fail_tests      = 1;\n\tint test_number                      = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\tio_handle->mft_entry_size     = 1024;\n\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_file_entry_data1,\n\t          16384,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_initialize(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          io_handle,\n\t          file_io_handle,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          io_handle,\n\t          file_io_handle,\n\t          file_system,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_free(\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_initialize(\n\t          NULL,\n\t          io_handle,\n\t          file_io_handle,\n\t          file_system,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_entry = (libfsntfs_file_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          io_handle,\n\t          file_io_handle,\n\t          file_system,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tfile_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          NULL,\n\t          file_io_handle,\n\t          file_system,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          io_handle,\n\t          file_io_handle,\n\t          NULL,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          io_handle,\n\t          file_io_handle,\n\t          file_system,\n\t          (uint64_t) -1,\n\t          NULL,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_entry_initialize(\n\t\t          &file_entry,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          file_system,\n\t\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t\t          NULL,\n\t\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( file_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_entry_free(\n\t\t\t\t &file_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_entry\",\n\t\t\t file_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_entry_initialize(\n\t\t          &file_entry,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          file_system,\n\t\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t\t          NULL,\n\t\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( file_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_entry_free(\n\t\t\t\t &file_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_entry\",\n\t\t\t file_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_system_free(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\tif( file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t\t &file_system,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_file_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_is_empty function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_is_empty(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_is_empty(\n\t          file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_is_empty(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_is_empty(\n\t          file_entry,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_is_empty with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_is_empty(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_is_empty with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_is_empty(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_is_allocated function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_is_allocated(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          file_entry,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_is_allocated with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_is_allocated with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_is_allocated(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_internal_file_entry_get_attribute_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_file_entry_get_attribute_by_index(\n     libfsntfs_internal_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_attribute_t *attribute = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_file_entry_get_attribute_by_index(\n\t          (libfsntfs_internal_file_entry_t *) file_entry,\n\t          ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_free(\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_file_entry_get_attribute_by_index(\n\t          NULL,\n\t          ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_file_entry_get_attribute_by_index(\n\t          (libfsntfs_internal_file_entry_t *) file_entry,\n\t          NULL,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_file_entry_get_attribute_by_index(\n\t          (libfsntfs_internal_file_entry_t *) file_entry,\n\t          ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry,\n\t          -1,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_file_entry_get_attribute_by_index(\n\t          (libfsntfs_internal_file_entry_t *) file_entry,\n\t          ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_internal_file_entry_get_reparse_point_attribute */\n\n/* TODO: add tests for libfsntfs_internal_file_entry_get_security_descriptor_attribute */\n\n/* TODO: add tests for libfsntfs_internal_file_entry_get_standard_information_attribute */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_file_entry_get_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_file_reference(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          NULL,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_file_reference with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_file_reference with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_file_reference(\n\t          file_entry,\n\t          &file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_base_record_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_base_record_file_reference(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error            = NULL;\n\tuint64_t base_record_file_reference = 0;\n\tint result                          = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          file_entry,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          NULL,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_base_record_file_reference with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          file_entry,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_base_record_file_reference with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_base_record_file_reference(\n\t          file_entry,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_parent_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_parent_file_reference(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error       = NULL;\n\tuint64_t parent_file_reference = 0;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          file_entry,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          NULL,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_parent_file_reference with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          file_entry,\n\t          &parent_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_parent_file_reference with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference(\n\t          file_entry,\n\t          &parent_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_parent_file_reference_by_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_parent_file_reference_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error       = NULL;\n\tuint64_t parent_file_reference = 0;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          NULL,\n\t          1,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          -1,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          0,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_parent_file_reference_by_attribute_index with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &parent_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_parent_file_reference_by_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_parent_file_reference_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &parent_file_reference,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_journal_sequence_number function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_journal_sequence_number(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t journal_sequence_number = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          file_entry,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          NULL,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_journal_sequence_number with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          file_entry,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_journal_sequence_number with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_journal_sequence_number(\n\t          file_entry,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_creation_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_creation_time(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t creation_time   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          NULL,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_creation_time with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_creation_time with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_creation_time(\n\t          file_entry,\n\t          &creation_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_modification_time(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint64_t modification_time = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          NULL,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_modification_time with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_modification_time with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_modification_time(\n\t          file_entry,\n\t          &modification_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_access_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_access_time(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t access_time     = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          NULL,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_access_time with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_access_time with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_access_time(\n\t          file_entry,\n\t          &access_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_entry_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_entry_modification_time(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t entry_modification_time = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          NULL,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_entry_modification_time with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_entry_modification_time with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_entry_modification_time(\n\t          file_entry,\n\t          &entry_modification_time,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_file_attribute_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_file_attribute_flags(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          NULL,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_file_attribute_flags with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_file_attribute_flags with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_file_attribute_flags(\n\t          file_entry,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_name_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size(\n\t          file_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_name(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name(\n\t          file_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_name_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_name_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_name_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size(\n\t          file_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_name(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_name with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_name with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name(\n\t          file_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_name_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_name_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint attribute_index              = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          file_entry,\n\t          &attribute_index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"attribute_index\",\n\t attribute_index,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          NULL,\n\t          &attribute_index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          file_entry,\n\t          &attribute_index,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO implement RW lock support */\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK ) && defined( TODO )\n\n\t/* Test libfsntfs_file_entry_get_name_attribute_index with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          file_entry,\n\t          &attribute_index,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_name_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_name_attribute_index(\n\t          file_entry,\n\t          &attribute_index,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_name_size_by_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          NULL,\n\t          1,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          -1,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          0,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_name_size_by_attribute_index with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_name_size_by_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf8_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_name_by_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          NULL,\n\t          1,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          -1,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          0,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_name_by_attribute_index with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_name_by_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_name_size_by_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_name_size_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          NULL,\n\t          1,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          -1,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          0,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_name_size_by_attribute_index with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_name_size_by_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_size_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          &utf16_name_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_name_by_attribute_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_name_by_attribute_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          NULL,\n\t          1,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          -1,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          0,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_name_by_attribute_index with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_name_by_attribute_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_name_by_attribute_index(\n\t          file_entry,\n\t          1,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_symbolic_link_target_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tsize_t utf8_string_size          = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          NULL,\n\t          &utf8_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a reparse point with a substitute name\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_symbolic_link_target_size with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_symbolic_link_target_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf8_string_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf8_symbolic_link_target function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf8_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t utf8_string[ 16 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          NULL,\n\t          utf8_string,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a reparse point with a substitute name\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf8_symbolic_link_target with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf8_symbolic_link_target with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf8_symbolic_link_target(\n\t          file_entry,\n\t          utf8_string,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_symbolic_link_target_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_symbolic_link_target_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tsize_t utf16_string_size         = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf16_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          NULL,\n\t          &utf16_string_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf16_string_size,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a reparse point with a substitute name\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_symbolic_link_target_size with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf16_string_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_symbolic_link_target_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target_size(\n\t          file_entry,\n\t          &utf16_string_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_utf16_symbolic_link_target function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_utf16_symbolic_link_target(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint16_t utf16_string[ 16 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          NULL,\n\t          utf16_string,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a reparse point with a substitute name\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_utf16_symbolic_link_target with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_utf16_symbolic_link_target with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_utf16_symbolic_link_target(\n\t          file_entry,\n\t          utf16_string,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_security_descriptor_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_security_descriptor_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error        = NULL;\n\tsize_t security_descriptor_size = 0;\n\tint result                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          file_entry,\n\t          &security_descriptor_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"security_descriptor_size\",\n\t security_descriptor_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          NULL,\n\t          &security_descriptor_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a security descriptor\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n/* TODO implement RW lock support */\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK ) && defined( TODO )\n\n\t/* Test libfsntfs_file_entry_get_security_descriptor_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          file_entry,\n\t          &security_descriptor_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_security_descriptor_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_security_descriptor_size(\n\t          file_entry,\n\t          &security_descriptor_size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_security_descriptor function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_security_descriptor(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t security_descriptor[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          security_descriptor,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          NULL,\n\t          security_descriptor,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with file entry that has a security descriptor\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          security_descriptor,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          security_descriptor,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n*/\n\n/* TODO implement RW lock support */\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK ) && defined( TODO )\n\n\t/* Test libfsntfs_file_entry_get_security_descriptor with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          security_descriptor,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_security_descriptor with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_security_descriptor(\n\t          file_entry,\n\t          security_descriptor,\n\t          16,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_number_of_attributes function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_number_of_attributes(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          file_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_attributes\",\n\t number_of_attributes,\n\t 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          NULL,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_number_of_attributes with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          file_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_number_of_attributes with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_attributes(\n\t          file_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_attribute_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_attribute_by_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_attribute_t *attribute = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_free(\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          NULL,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          -1,\n\t          &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tattribute = (libfsntfs_attribute_t *) 0x12345678UL;\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tattribute = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_attribute_by_index with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_attribute_by_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_attribute_by_index(\n\t          file_entry,\n\t          0,\n\t          &attribute,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_has_directory_entries_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_has_directory_entries_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          file_entry,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_has_directory_entries_index with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_has_directory_entries_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_has_directory_entries_index(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_has_default_data_stream function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_has_default_data_stream(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = ( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry;\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = NULL;\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          file_entry,\n\t          &error );\n\n\t( (libfsntfs_internal_file_entry_t *) file_entry )->mft_entry = mft_entry;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_has_default_data_stream with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_has_default_data_stream with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_has_default_data_stream(\n\t          file_entry,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_number_of_alternate_data_streams function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_number_of_alternate_data_streams(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error   = NULL;\n\tint number_of_data_streams = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          file_entry,\n\t          &number_of_data_streams,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_data_streams\",\n\t number_of_data_streams,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          NULL,\n\t          &number_of_data_streams,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_number_of_alternate_data_streams with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          file_entry,\n\t          &number_of_data_streams,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_number_of_alternate_data_streams with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_alternate_data_streams(\n\t          file_entry,\n\t          &number_of_data_streams,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_index */\n\n/* TODO: add tests for libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name */\n\n/* TODO: add tests for libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name */\n\n/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name */\n\n/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name */\n\n/* Tests the libfsntfs_file_entry_get_number_of_sub_file_entries function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_number_of_sub_file_entries(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error   = NULL;\n\tint number_of_file_entries = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          file_entry,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_file_entries\",\n\t number_of_file_entries,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          NULL,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_number_of_sub_file_entries with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          file_entry,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_number_of_sub_file_entries with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_sub_file_entries(\n\t          file_entry,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_index */\n\n/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_utf8_name */\n\n/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_utf16_name */\n\n/* Tests the libfsntfs_data_stream_read_buffer function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_read_buffer(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t buffer[ FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE ];\n\n\tlibcerror_error_t *error     = NULL;\n\ttime_t timestamp             = 0;\n\tsize64_t data_size           = 0;\n\tsize64_t remaining_data_size = 0;\n\tsize_t read_size             = 0;\n\tssize_t read_count           = 0;\n\toff64_t offset               = 0;\n\toff64_t read_offset          = 0;\n\tint number_of_tests          = 1024;\n\tint random_number            = 0;\n\tint result                   = 0;\n\tint test_number              = 0;\n\n\t/* Determine size\n\t */\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_size = FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE;\n\n\tif( data_size < FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE )\n\t{\n\t\tread_size = (size_t) data_size;\n\t}\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) read_size );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tif( data_size > 8 )\n\t{\n\t\t/* Set offset to data_size - 8\n\t\t */\n\t\toffset = libfsntfs_file_entry_seek_offset(\n\t\t          file_entry,\n\t\t          -8,\n\t\t          SEEK_END,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t (int64_t) data_size - 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer on data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_file_entry_read_buffer(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer beyond data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_file_entry_read_buffer(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Stress test read buffer\n\t */\n\ttimestamp = time(\n\t             NULL );\n\n\tsrand(\n\t (unsigned int) timestamp );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tremaining_data_size = data_size;\n\n\tfor( test_number = 0;\n\t     test_number < number_of_tests;\n\t     test_number++ )\n\t{\n\t\trandom_number = rand();\n\n\t\tFSNTFS_TEST_ASSERT_GREATER_THAN_INT(\n\t\t \"random_number\",\n\t\t random_number,\n\t\t -1 );\n\n\t\tread_size = (size_t) random_number % FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE;\n\n#if defined( FSNTFS_TEST_FILE_ENTRY_VERBOSE )\n\t\tfprintf(\n\t\t stdout,\n\t\t \"libfsntfs_file_entry_read_buffer: at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") of size: %\" PRIzd \"\\n\",\n\t\t read_offset,\n\t\t read_offset,\n\t\t read_size );\n#endif\n\t\tread_count = libfsntfs_file_entry_read_buffer(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              read_size,\n\t\t              &error );\n\n\t\tif( read_size > remaining_data_size )\n\t\t{\n\t\t\tread_size = (size_t) remaining_data_size;\n\t\t}\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) read_size );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tread_offset += read_count;\n\n\t\tresult = libfsntfs_file_entry_get_offset(\n\t\t          file_entry,\n\t\t          &offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t read_offset );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tremaining_data_size -= read_count;\n\n\t\tif( remaining_data_size == 0 )\n\t\t{\n\t\t\toffset = libfsntfs_file_entry_seek_offset(\n\t\t\t          file_entry,\n\t\t\t          0,\n\t\t\t          SEEK_SET,\n\t\t\t          &error );\n\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t\t \"offset\",\n\t\t\t offset,\n\t\t\t (int64_t) 0 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tread_offset = 0;\n\n\t\t\tremaining_data_size = data_size;\n\t\t}\n\t}\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              NULL,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              file_entry,\n\t              NULL,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              file_entry,\n\t              buffer,\n\t              (size_t) SSIZE_MAX + 1,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_read_buffer with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_read_buffer with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_file_entry_read_buffer(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_read_buffer_at_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_read_buffer_at_offset(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tuint8_t buffer[ FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE ];\n\n\tlibcerror_error_t *error     = NULL;\n\ttime_t timestamp             = 0;\n\tsize64_t data_size           = 0;\n\tsize64_t remaining_data_size = 0;\n\tsize_t read_size             = 0;\n\tssize_t read_count           = 0;\n\toff64_t offset               = 0;\n\toff64_t read_offset          = 0;\n\tint number_of_tests          = 1024;\n\tint random_number            = 0;\n\tint result                   = 0;\n\tint test_number              = 0;\n\n\t/* Determine size\n\t */\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_size = FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE;\n\n\tif( data_size < FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE )\n\t{\n\t\tread_size = (size_t) data_size;\n\t}\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) read_size );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tif( data_size > 8 )\n\t{\n\t\t/* Read buffer on data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t\t              data_size - 8,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 8 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Read buffer beyond data_size boundary\n\t\t */\n\t\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t\t              data_size + 8,\n\t\t              &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Stress test read buffer\n\t */\n\ttimestamp = time(\n\t             NULL );\n\n\tsrand(\n\t (unsigned int) timestamp );\n\n\tfor( test_number = 0;\n\t     test_number < number_of_tests;\n\t     test_number++ )\n\t{\n\t\trandom_number = rand();\n\n\t\tFSNTFS_TEST_ASSERT_GREATER_THAN_INT(\n\t\t \"random_number\",\n\t\t random_number,\n\t\t -1 );\n\n\t\tif( data_size > 0 )\n\t\t{\n\t\t\tread_offset = (off64_t) random_number % data_size;\n\t\t}\n\t\tread_size = (size_t) random_number % FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE;\n\n#if defined( FSNTFS_TEST_FILE_ENTRY_VERBOSE )\n\t\tfprintf(\n\t\t stdout,\n\t\t \"libfsntfs_file_entry_read_buffer_at_offset: at offset: %\" PRIi64 \" (0x%08\" PRIx64 \") of size: %\" PRIzd \"\\n\",\n\t\t read_offset,\n\t\t read_offset,\n\t\t read_size );\n#endif\n\t\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t\t              file_entry,\n\t\t              buffer,\n\t\t              read_size,\n\t\t              read_offset,\n\t\t              &error );\n\n\t\tremaining_data_size = data_size - read_offset;\n\n\t\tif( read_size > remaining_data_size )\n\t\t{\n\t\t\tread_size = (size_t) remaining_data_size;\n\t\t}\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) read_size );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tread_offset += read_count;\n\n\t\tresult = libfsntfs_file_entry_get_offset(\n\t\t          file_entry,\n\t\t          &offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t offset,\n\t\t read_offset );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              NULL,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              NULL,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              buffer,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              -1,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_read_buffer_at_offset with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_read_buffer_at_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tread_count = libfsntfs_file_entry_read_buffer_at_offset(\n\t              file_entry,\n\t              buffer,\n\t              FSNTFS_TEST_FILE_ENTRY_READ_BUFFER_SIZE,\n\t              0,\n\t              &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t\t \"read_count\",\n\t\t read_count,\n\t\t (ssize_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_seek_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_seek_offset(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t size            = 0;\n\toff64_t offset           = 0;\n\n\t/* Test regular cases\n\t */\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_END,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tsize = (size64_t) offset;\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          1024,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          -512,\n\t          SEEK_CUR,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 512 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          (off64_t) ( size + 512 ),\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) ( size + 512 ) );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Reset offset to 0\n\t */\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          NULL,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          -1,\n\t          SEEK_SET,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          -1,\n\t          SEEK_CUR,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          (off64_t) ( -1 * ( size + 1 ) ),\n\t          SEEK_END,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"offset\",\n\t offset,\n\t (int64_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_seek_offset with pthread_rwlock_wrlock failing in libcthreads_read_write_lock_grab_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = 0;\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t (int64_t) offset,\n\t\t (int64_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_seek_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_write\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\toffset = libfsntfs_file_entry_seek_offset(\n\t          file_entry,\n\t          0,\n\t          SEEK_SET,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t\t \"offset\",\n\t\t (int64_t) offset,\n\t\t (int64_t) -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_offset(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\toff64_t offset           = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_offset(\n\t          file_entry,\n\t          &offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_offset(\n\t          NULL,\n\t          &offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_offset(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_offset with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_offset(\n\t          file_entry,\n\t          &offset,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_offset with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_offset(\n\t          file_entry,\n\t          &offset,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_size(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t size            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          &size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_size(\n\t          NULL,\n\t          &size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_size with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          &size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_size with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_size(\n\t          file_entry,\n\t          &size,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_number_of_extents function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_number_of_extents(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_extents    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          file_entry,\n\t          &number_of_extents,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_extents\",\n\t number_of_extents,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          NULL,\n\t          &number_of_extents,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          file_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_number_of_extents with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          file_entry,\n\t          &number_of_extents,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_number_of_extents with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_number_of_extents(\n\t          file_entry,\n\t          &number_of_extents,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_entry_get_extent_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_entry_get_extent_by_index(\n     libfsntfs_file_entry_t *file_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize64_t extent_size     = 0;\n\toff64_t extent_offset    = 0;\n\tuint32_t extent_flags    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          NULL,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          -1,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          NULL,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          &extent_offset,\n\t          NULL,\n\t          &extent_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\n\t/* Test libfsntfs_file_entry_get_extent_by_index with pthread_rwlock_rdlock failing in libcthreads_read_write_lock_grab_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Test libfsntfs_file_entry_get_extent_by_index with pthread_rwlock_unlock failing in libcthreads_read_write_lock_release_for_read\n\t */\n\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_entry_get_extent_by_index(\n\t          file_entry,\n\t          0,\n\t          &extent_offset,\n\t          &extent_size,\n\t          &extent_flags,\n\t          &error );\n\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibbfio_handle_t *file_io_handle             = NULL;\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_file_entry_t *file_entry           = NULL;\n\tlibfsntfs_file_system_t *file_system         = NULL;\n\tlibfsntfs_io_handle_t *io_handle             = NULL;\n\tint result                                   = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_FILE_ENTRY_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_entry_initialize\",\n\t fsntfs_test_file_entry_initialize );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_entry_free\",\n\t fsntfs_test_file_entry_free );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize data stream for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\tio_handle->mft_entry_size     = 1024;\n\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_file_entry_data1,\n\t          16384,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_initialize(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          io_handle,\n\t          file_io_handle,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_initialize(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &( directory_entry->file_name_values ),\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry->file_name_values\",\n\t directory_entry->file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          directory_entry->file_name_values,\n\t          fsntfs_test_file_entry_data2,\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_initialize(\n\t          &file_entry,\n\t          io_handle,\n\t          file_io_handle,\n\t          file_system,\n\t          LIBFSNTFS_MFT_ENTRY_INDEX_MFT,\n\t\t  directory_entry,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tdirectory_entry = NULL;\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_is_empty\",\n\t fsntfs_test_file_entry_is_empty,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_is_allocated\",\n\t fsntfs_test_file_entry_is_allocated,\n\t file_entry );\n\n\t/* TODO: add tests for libfsntfs_internal_file_entry_get_attribute_by_index */\n\n\t/* TODO: add tests for libfsntfs_internal_file_entry_get_reparse_point_attribute */\n\n\t/* TODO: add tests for libfsntfs_internal_file_entry_get_security_descriptor_attribute */\n\n\t/* TODO: add tests for libfsntfs_internal_file_entry_get_standard_information_attribute */\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_file_reference\",\n\t fsntfs_test_file_entry_get_file_reference,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_base_record_file_reference\",\n\t fsntfs_test_file_entry_get_base_record_file_reference,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_parent_file_reference\",\n\t fsntfs_test_file_entry_get_parent_file_reference,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_parent_file_reference_by_attribute_index\",\n\t fsntfs_test_file_entry_get_parent_file_reference_by_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_journal_sequence_number\",\n\t fsntfs_test_file_entry_get_journal_sequence_number,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_creation_time\",\n\t fsntfs_test_file_entry_get_creation_time,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_modification_time\",\n\t fsntfs_test_file_entry_get_modification_time,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_access_time\",\n\t fsntfs_test_file_entry_get_access_time,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_entry_modification_time\",\n\t fsntfs_test_file_entry_get_entry_modification_time,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_file_atttribute_flags\",\n\t fsntfs_test_file_entry_get_file_attribute_flags,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_name_size\",\n\t fsntfs_test_file_entry_get_utf8_name_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_name\",\n\t fsntfs_test_file_entry_get_utf8_name,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_name_size\",\n\t fsntfs_test_file_entry_get_utf16_name_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_name\",\n\t fsntfs_test_file_entry_get_utf16_name,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_name_attribute_index\",\n\t fsntfs_test_file_entry_get_name_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_name_size_by_attribute_index\",\n\t fsntfs_test_file_entry_get_utf8_name_size_by_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_name_by_attribute_index\",\n\t fsntfs_test_file_entry_get_utf8_name_by_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_name_size_by_attribute_index\",\n\t fsntfs_test_file_entry_get_utf16_name_size_by_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_name_by_attribute_index\",\n\t fsntfs_test_file_entry_get_utf16_name_by_attribute_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_symbolic_link_target_size\",\n\t fsntfs_test_file_entry_get_utf8_symbolic_link_target_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf8_symbolic_link_target\",\n\t fsntfs_test_file_entry_get_utf8_symbolic_link_target,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_symbolic_link_target_size\",\n\t fsntfs_test_file_entry_get_utf16_symbolic_link_target_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_utf16_symbolic_link_target\",\n\t fsntfs_test_file_entry_get_utf16_symbolic_link_target,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_security_descriptor_size\",\n\t fsntfs_test_file_entry_get_security_descriptor_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_security_descriptor\",\n\t fsntfs_test_file_entry_get_security_descriptor,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_number_of_attributes\",\n\t fsntfs_test_file_entry_get_number_of_attributes,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_attribute_by_index\",\n\t fsntfs_test_file_entry_get_attribute_by_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_has_directory_entries_index\",\n\t fsntfs_test_file_entry_has_directory_entries_index,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_has_default_data_stream\",\n\t fsntfs_test_file_entry_has_default_data_stream,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_number_of_alternate_data_streams\",\n\t fsntfs_test_file_entry_get_number_of_alternate_data_streams,\n\t file_entry );\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_index */\n\n\t/* TODO: add tests for libfsntfs_file_entry_has_alternate_data_stream_by_utf8_name */\n\n\t/* TODO: add tests for libfsntfs_file_entry_has_alternate_data_stream_by_utf16_name */\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_utf8_name */\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_alternate_data_stream_by_utf16_name */\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_number_of_sub_file_entries\",\n\t fsntfs_test_file_entry_get_number_of_sub_file_entries,\n\t file_entry );\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_index */\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_utf8_name */\n\n\t/* TODO: add tests for libfsntfs_file_entry_get_sub_file_entry_by_utf16_name */\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_read_buffer\",\n\t fsntfs_test_file_entry_read_buffer,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_read_buffer_at_offset\",\n\t fsntfs_test_file_entry_read_buffer_at_offset,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_seek_offset\",\n\t fsntfs_test_file_entry_seek_offset,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_offset\",\n\t fsntfs_test_file_entry_get_offset,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_size\",\n\t fsntfs_test_file_entry_get_size,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_number_of_extents\",\n\t fsntfs_test_file_entry_get_number_of_extents,\n\t file_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_entry_get_extent_by_index\",\n\t fsntfs_test_file_entry_get_extent_by_index,\n\t file_entry );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_entry_free(\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_free(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t         &file_entry,\n\t         &error );\n\t}\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\tif( file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t         &file_system,\n\t         &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_file_name_attribute.c",
    "content": "/*\n * Library file_name_attributes functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_file_name_attribute.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_file_name_attribute_data1[ 104 ] = {\n\t0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x80, 0xab, 0x8a, 0x57, 0x7c, 0xad, 0xd0, 0x01, 0x80, 0xab, 0x8a, 0x57, 0x7c, 0xad, 0xd0, 0x01,\n\t0x80, 0xab, 0x8a, 0x57, 0x7c, 0xad, 0xd0, 0x01, 0x80, 0xab, 0x8a, 0x57, 0x7c, 0xad, 0xd0, 0x01,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_file_name_attribute_get_parent_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_parent_file_reference(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error       = NULL;\n\tuint64_t parent_file_reference = 0;\n\tuint32_t type                  = 0;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          attribute,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          NULL,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_parent_file_reference(\n\t          attribute,\n\t          &parent_file_reference,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_creation_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_creation_time(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t creation_time   = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          attribute,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          NULL,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_creation_time(\n\t          attribute,\n\t          &creation_time,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_modification_time(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint64_t modification_time = 0;\n\tuint32_t type              = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          attribute,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          NULL,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_modification_time(\n\t          attribute,\n\t          &modification_time,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_access_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_access_time(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t access_time     = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          attribute,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          NULL,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_access_time(\n\t          attribute,\n\t          &access_time,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_entry_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_entry_modification_time(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t entry_modification_time = 0;\n\tuint32_t type                    = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          attribute,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          NULL,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_entry_modification_time(\n\t          attribute,\n\t          &entry_modification_time,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_file_attribute_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_file_attribute_flags(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint32_t file_attribute_flags = 0;\n\tuint32_t type                 = 0;\n\tint result                    = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t          attribute,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t          NULL,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_file_attribute_flags(\n\t          attribute,\n\t          &file_attribute_flags,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_attribute_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_file_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize attribute for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_file_name_attribute_data1,\n\t          104,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_parent_file_reference\",\n\t fsntfs_test_file_name_attribute_get_parent_file_reference,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_creation_time\",\n\t fsntfs_test_file_name_attribute_get_creation_time,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_modification_time\",\n\t fsntfs_test_file_name_attribute_get_modification_time,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_access_time\",\n\t fsntfs_test_file_name_attribute_get_access_time,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_entry_modification_time\",\n\t fsntfs_test_file_name_attribute_get_entry_modification_time,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_file_attribute_flags\",\n\t fsntfs_test_file_name_attribute_get_file_attribute_flags,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_utf8_name_size\",\n\t fsntfs_test_file_name_attribute_get_utf8_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_utf8_name\",\n\t fsntfs_test_file_name_attribute_get_utf8_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_utf16_name_size\",\n\t fsntfs_test_file_name_attribute_get_utf16_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_attribute_get_utf16_name\",\n\t fsntfs_test_file_name_attribute_get_utf16_name,\n\t attribute );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t         (libfsntfs_internal_attribute_t **) &attribute,\n\t         &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t         &mft_attribute,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_file_name_values.c",
    "content": "/*\n * Library file_name_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_file_name_values.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_file_name_values_data1[ 104 ] = {\n\t0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01, 0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01,\n\t0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01, 0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_file_name_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tint result                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                = 1;\n\tint number_of_memset_fail_tests                = 1;\n\tint test_number                                = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_name_values = (libfsntfs_file_name_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tfile_name_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_name_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_name_values_initialize(\n\t\t          &file_name_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( file_name_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_name_values_free(\n\t\t\t\t &file_name_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_name_values\",\n\t\t\t file_name_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_name_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_name_values_initialize(\n\t\t          &file_name_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( file_name_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_name_values_free(\n\t\t\t\t &file_name_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_name_values\",\n\t\t\t file_name_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_clone function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_clone(\n     void )\n{\n\tuint8_t name_utf16_stream[ 10 ] = {\n\t\t't', 0, 'e', 0, 's', 0, 't', 0, 0, 0 };\n\n\tlibcerror_error_t *error                                   = NULL;\n\tlibfsntfs_file_name_values_t *destination_file_name_values = NULL;\n\tlibfsntfs_file_name_values_t *source_file_name_values      = NULL;\n\tint result                                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &source_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"source_file_name_values\",\n\t source_file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_set_name(\n\t          source_file_name_values,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_clone(\n\t          &destination_file_name_values,\n\t          source_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"destination_file_name_values\",\n\t destination_file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_free(\n\t          &destination_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"destination_file_name_values\",\n\t destination_file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_clone(\n\t          &destination_file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"destination_file_name_values\",\n\t destination_file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_clone(\n\t          NULL,\n\t          source_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdestination_file_name_values = (libfsntfs_file_name_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_file_name_values_clone(\n\t          &destination_file_name_values,\n\t          source_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdestination_file_name_values = NULL;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_file_name_values_clone with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_name_values_clone(\n\t          &destination_file_name_values,\n\t          source_file_name_values,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\tif( destination_file_name_values != NULL )\n\t\t{\n\t\t\tlibfsntfs_file_name_values_free(\n\t\t\t &destination_file_name_values,\n\t\t\t NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"destination_file_name_values\",\n\t\t destination_file_name_values );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_file_name_values_clone with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_name_values_clone(\n\t          &destination_file_name_values,\n\t          source_file_name_values,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\n\t\tif( destination_file_name_values != NULL )\n\t\t{\n\t\t\tlibfsntfs_file_name_values_free(\n\t\t\t &destination_file_name_values,\n\t\t\t NULL );\n\t\t}\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"destination_file_name_values\",\n\t\t destination_file_name_values );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &source_file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"source_file_name_values\",\n\t source_file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( destination_file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &destination_file_name_values,\n\t\t NULL );\n\t}\n\tif( source_file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &source_file_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_set_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_set_name(\n     void )\n{\n\tuint8_t name_utf16_stream[ 10 ] = {\n\t\t't', 0, 'e', 0, 's', 0, 't', 0, 0, 0 };\n\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tint result                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_set_name(\n\t          NULL,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          NULL,\n\t          10,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          name_utf16_stream,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_file_name_values_set_name with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_file_name_values_set_name with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_name_values_set_name(\n\t          file_name_values,\n\t          name_utf16_stream,\n\t          10,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tint result                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          NULL,\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_file_name_values_read_data with malloc failing in libfsntfs_file_name_values_set_name\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          74,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tlibfsntfs_io_handle_t *io_handle               = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute       = NULL;\n\tint result                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_file_name_values_data1,\n\t          104,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_read_from_mft_attribute(\n\t          file_name_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_read_from_mft_attribute(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_parent_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_parent_file_reference(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error       = NULL;\n\tuint64_t parent_file_reference = 0;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_parent_file_reference(\n\t          file_name_values,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_parent_file_reference(\n\t          NULL,\n\t          &parent_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_parent_file_reference(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_creation_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_creation_time(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t creation_time   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_creation_time(\n\t          file_name_values,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_creation_time(\n\t          NULL,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_creation_time(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_modification_time(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint64_t modification_time = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_modification_time(\n\t          file_name_values,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_modification_time(\n\t          NULL,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_modification_time(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_access_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_access_time(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t access_time     = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_access_time(\n\t          file_name_values,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_access_time(\n\t          NULL,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_access_time(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_entry_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_entry_modification_time(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t entry_modification_time = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_entry_modification_time(\n\t          file_name_values,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_entry_modification_time(\n\t          NULL,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_entry_modification_time(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_file_attribute_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_file_attribute_flags(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_file_attribute_flags(\n\t          file_name_values,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_file_attribute_flags(\n\t          NULL,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_file_attribute_flags(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_utf8_name_size(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf8_name_size(\n\t          file_name_values,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf8_name_size(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_utf8_name(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf8_name(\n\t          file_name_values,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf8_name(\n\t          file_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf8_name(\n\t          file_name_values,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf8_name(\n\t          file_name_values,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_utf16_name_size(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf16_name_size(\n\t          file_name_values,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf16_name_size(\n\t          file_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_name_values_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_name_values_get_utf16_name(\n     libfsntfs_file_name_values_t *file_name_values )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf16_name(\n\t          file_name_values,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_name_values_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf16_name(\n\t          file_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf16_name(\n\t          file_name_values,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_name_values_get_utf16_name(\n\t          file_name_values,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_file_name_values_t *file_name_values = NULL;\n\tint result                                     = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_initialize\",\n\t fsntfs_test_file_name_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_free\",\n\t fsntfs_test_file_name_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_clone\",\n\t fsntfs_test_file_name_values_clone );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_set_name\",\n\t fsntfs_test_file_name_values_set_name );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_read_data\",\n\t fsntfs_test_file_name_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_name_values_read_from_mft_attribute\",\n\t fsntfs_test_file_name_values_read_from_mft_attribute );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize file_name_values for tests\n\t */\n\tresult = libfsntfs_file_name_values_initialize(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_name_values_read_data(\n\t          file_name_values,\n\t          &( fsntfs_test_file_name_values_data1[ 24 ] ),\n\t          74,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_parent_file_reference\",\n\t fsntfs_test_file_name_values_get_parent_file_reference,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_creation_time\",\n\t fsntfs_test_file_name_values_get_creation_time,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_modification_time\",\n\t fsntfs_test_file_name_values_get_modification_time,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_access_time\",\n\t fsntfs_test_file_name_values_get_access_time,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_entry_modification_time\",\n\t fsntfs_test_file_name_values_get_entry_modification_time,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_file_attribute_flags\",\n\t fsntfs_test_file_name_values_get_file_attribute_flags,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_utf8_name_size\",\n\t fsntfs_test_file_name_values_get_utf8_name_size,\n\t file_name_values )\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_utf8_name\",\n\t fsntfs_test_file_name_values_get_utf8_name,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_utf16_name_size\",\n\t fsntfs_test_file_name_values_get_utf16_name_size,\n\t file_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_file_name_values_get_utf16_name\",\n\t fsntfs_test_file_name_values_get_utf16_name,\n\t file_name_values );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_name_values_free(\n\t          &file_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_name_values\",\n\t file_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_name_values != NULL )\n\t{\n\t\tlibfsntfs_file_name_values_free(\n\t\t &file_name_values,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_file_system.c",
    "content": "/*\n * Library file_system type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_file_system.h\"\n\nuint8_t fsntfs_test_file_system_data1[ 16384 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xb7, 0x4e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xfd, 0x4e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x43, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4c, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x80, 0x01, 0xfe, 0x00, 0x22, 0x80, 0x00,\n\t0x7b, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x22, 0x80, 0x01, 0xfe, 0x00, 0x22, 0x80, 0x00, 0x7b, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xc0, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,\n\t0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xa2, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x41, 0x00, 0x74, 0x00,\n\t0x74, 0x00, 0x72, 0x00, 0x44, 0x00, 0x65, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x01, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x39, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x01, 0x00, 0x38, 0x00, 0x03, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01, 0x80, 0xf8, 0x0d, 0x5e, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x44, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0xe4, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0xcc, 0x00, 0x00, 0x00,\n\t0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0xb8, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xff, 0x01, 0x1f, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x18, 0x00,\n\t0x00, 0x00, 0x00, 0x10, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0xff, 0x01, 0x1f, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x14, 0x00, 0x00, 0x00, 0x00, 0x10,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,\n\t0xbf, 0x01, 0x13, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x00,\n\t0x00, 0x0b, 0x14, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xa9, 0x00, 0x12, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x21, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x18, 0x00,\n\t0x00, 0x00, 0x00, 0xa0, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x21, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x04, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x11, 0x01, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x89, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n\t0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x42, 0x00, 0x69, 0x00, 0x74, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x70, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0x7e, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0x7e, 0x02, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x4c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x24, 0x00, 0x42, 0x00, 0x6f, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,\n\t0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,\n\t0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00,\n\t0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xcf, 0x4f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x43, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x02, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xee, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00,\n\t0x02, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x7c, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x01, 0x00, 0x38, 0x00, 0x09, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xfe, 0x32, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x53, 0x00, 0x65, 0x00, 0x63, 0x00, 0x75, 0x00, 0x72, 0x00, 0x65, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x6c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x53, 0x00, 0x11, 0x41, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x70, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x49, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00,\n\t0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xcb, 0xc6, 0x02, 0x00,\n\t0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0xf7, 0xc8, 0x14, 0x34, 0x01, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x19, 0x22, 0x76, 0x20,\n\t0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x00, 0x00, 0x14, 0x38, 0x78, 0x2c, 0x03, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0xda, 0xc7, 0x23, 0x87,\n\t0x04, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x01, 0x00, 0x00, 0xb5, 0x87, 0xd3, 0x23, 0x05, 0x01, 0x00, 0x00, 0x50, 0x03, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x62, 0x9b, 0xa3, 0x0a,\n\t0x06, 0x01, 0x00, 0x00, 0xb0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x01, 0x00, 0x00, 0xf5, 0x06, 0xd3, 0x23, 0x07, 0x01, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00,\n\t0x11, 0x01, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x6c, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0a, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x55, 0x00, 0x70, 0x00, 0x43, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x05, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x69, 0x1b, 0x6b, 0x77, 0x7e, 0xdc, 0xda,\n\t0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x05, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00,\n\t0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0c, 0x69, 0x1b, 0x6b, 0x77, 0x7e, 0xdc, 0xda, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xee, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0xe0, 0x50, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x01, 0x00, 0x38, 0x00, 0x03, 0x00, 0x50, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x07, 0x03, 0x24, 0x00, 0x45, 0x00, 0x78, 0x00, 0x74, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x28, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x24, 0x00, 0x44, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x74, 0x00, 0x65, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x60, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x24, 0x00, 0x4f, 0x00, 0x02, 0x00,\n\t0x6a, 0x00, 0x49, 0x00, 0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x60, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x24, 0x00, 0x51, 0x00, 0x75, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x24, 0x00, 0x52, 0x00, 0x65, 0x00,\n\t0x70, 0x00, 0x61, 0x00, 0x72, 0x00, 0x73, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x0b, 0x00, 0x24, 0x00, 0x52, 0x00, 0x6d, 0x00, 0x4d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x61, 0x00,\n\t0x64, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x05, 0xbb, 0xa0, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x24, 0x00, 0x52, 0x00, 0x6d, 0x00,\n\t0x4d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x61, 0x00, 0x64, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0d, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01, 0x73, 0xbc, 0x83, 0x5d, 0xeb, 0xa4, 0xd4, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x9f, 0x01, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x9f, 0x01, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 };\n\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_file_system_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_system_initialize(\n     void )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_file_system_t *file_system = NULL;\n\tint result                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests      = 1;\n\tint number_of_memset_fail_tests      = 1;\n\tint test_number                      = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_system_initialize(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_system_free(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_system_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_system = (libfsntfs_file_system_t *) 0x12345678UL;\n\n\tresult = libfsntfs_file_system_initialize(\n\t          &file_system,\n\t          &error );\n\n\tfile_system = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_system_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_system_initialize(\n\t\t          &file_system,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( file_system != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_system_free(\n\t\t\t\t &file_system,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_system\",\n\t\t\t file_system );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_file_system_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_file_system_initialize(\n\t\t          &file_system,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( file_system != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_file_system_free(\n\t\t\t\t &file_system,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"file_system\",\n\t\t\t file_system );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t\t &file_system,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_system_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_system_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_system_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_file_system_read_mft function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_file_system_read_mft(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle     = NULL;\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_file_system_t *file_system = NULL;\n\tlibfsntfs_io_handle_t *io_handle     = NULL;\n\tint result                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\tio_handle->mft_entry_size     = 1024;\n\n\tresult = libfsntfs_file_system_initialize(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_file_system_data1,\n\t          16384,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          io_handle,\n\t          file_io_handle,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_file_system_read_mft(\n\t          NULL,\n\t          io_handle,\n\t          file_io_handle,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_file_system_read_mft(\n\t          file_system,\n\t          io_handle,\n\t          file_io_handle,\n\t          -1,\n\t          LIBFSNTFS_FILE_ENTRY_FLAGS_MFT_ONLY,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_file_system_free(\n\t          &file_system,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_system\",\n\t file_system );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( file_system != NULL )\n\t{\n\t\tlibfsntfs_file_system_free(\n\t\t &file_system,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_system_initialize\",\n\t fsntfs_test_file_system_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_system_free\",\n\t fsntfs_test_file_system_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_file_system_read_mft\",\n\t fsntfs_test_file_system_read_mft );\n\n\t/* TODO add tests for libfsntfs_file_system_read_bitmap */\n\n\t/* TODO add tests for libfsntfs_file_system_read_security_descriptors */\n\n\t/* TODO add tests for libfsntfs_file_system_get_number_of_mft_entries */\n\n\t/* TODO add tests for libfsntfs_file_system_get_mft_entry_by_index */\n\n\t/* TODO add tests for libfsntfs_file_system_get_mft_entry_by_index_no_cache */\n\n\t/* TODO add tests for libfsntfs_file_system_get_security_descriptor_values_by_identifier */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_fixup_values.c",
    "content": "/*\n * Library fix-up values functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_fixup_values.h\"\n\nuint8_t fsntfs_test_fixup_values_data1[ 1024 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x52, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_fixup_values_apply function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_fixup_values_apply(\n     void )\n{\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibcerror_error_t *error = NULL;\n\tvoid *memcpy_result      = NULL;\n\tint result               = 0;\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_fixup_values_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_fixup_values_apply(\n\t          mft_entry_data,\n\t          1024,\n\t          48,\n\t          3,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n/* TODO check if fix-up values have been applied */\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_fixup_values_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\t/* Test error case where fix-up value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( mft_entry_data[ 510 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_fixup_values_apply(\n\t          mft_entry_data,\n\t          1024,\n\t          48,\n\t          3,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( mft_entry_data[ 510 ] ),\n\t 0x0200 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n/* TODO check if fix-up values have been applied */\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_fixup_values_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_fixup_values_apply(\n\t          NULL,\n\t          1024,\n\t          48,\n\t          3,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_fixup_values_apply(\n\t          mft_entry_data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          48,\n\t          3,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_fixup_values_apply(\n\t          mft_entry_data,\n\t          1024,\n\t          0xffff,\n\t          3,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_fixup_values_apply(\n\t          mft_entry_data,\n\t          1024,\n\t          48,\n\t          0xffff,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_fixup_values_apply\",\n\t fsntfs_test_fixup_values_apply );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_functions.c",
    "content": "/*\n * Functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libclocale.h\"\n#include \"fsntfs_test_libuna.h\"\n\n/* Retrieves source as a narrow string\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_get_narrow_source(\n     const system_character_t *source,\n     char *narrow_string,\n     size_t narrow_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function     = \"fsntfs_test_get_narrow_source\";\n\tsize_t narrow_source_size = 0;\n\tsize_t source_length      = 0;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tint result                = 0;\n#endif\n\n\tif( source == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid source.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( narrow_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid narrow string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( narrow_string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid narrow string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsource_length = system_string_length(\n\t                 source );\n\n\tif( source_length > (size_t) ( SSIZE_MAX - 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid source length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tif( libclocale_codepage == 0 )\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf8_string_size_from_utf32(\n\t\t          (libuna_utf32_character_t *) source,\n\t\t          source_length + 1,\n\t\t          &narrow_source_size,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf8_string_size_from_utf16(\n\t\t          (libuna_utf16_character_t *) source,\n\t\t          source_length + 1,\n\t\t          &narrow_source_size,\n\t\t          error );\n#endif\n\t}\n\telse\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_byte_stream_size_from_utf32(\n\t\t          (libuna_utf32_character_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          &narrow_source_size,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_byte_stream_size_from_utf16(\n\t\t          (libuna_utf16_character_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          &narrow_source_size,\n\t\t          error );\n#endif\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t LIBCERROR_CONVERSION_ERROR_GENERIC,\n\t\t \"%s: unable to determine narrow string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#else\n\tnarrow_source_size = source_length + 1;\n\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n\tif( narrow_string_size < narrow_source_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: narrow string too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tif( libclocale_codepage == 0 )\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf8_string_copy_from_utf32(\n\t\t          (libuna_utf8_character_t *) narrow_string,\n\t\t          narrow_string_size,\n\t\t          (libuna_utf32_character_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf8_string_copy_from_utf16(\n\t\t          (libuna_utf8_character_t *) narrow_string,\n\t\t          narrow_string_size,\n\t\t          (libuna_utf16_character_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#endif\n\t}\n\telse\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_byte_stream_copy_from_utf32(\n\t\t          (uint8_t *) narrow_string,\n\t\t          narrow_string_size,\n\t\t          libclocale_codepage,\n\t\t          (libuna_utf32_character_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_byte_stream_copy_from_utf16(\n\t\t          (uint8_t *) narrow_string,\n\t\t          narrow_string_size,\n\t\t          libclocale_codepage,\n\t\t          (libuna_utf16_character_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#endif\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t LIBCERROR_CONVERSION_ERROR_GENERIC,\n\t\t \"%s: unable to set narrow string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#else\n\tif( system_string_copy(\n\t     narrow_string,\n\t     source,\n\t     source_length ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to set narrow string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tnarrow_string[ source_length ] = 0;\n\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n\treturn( 1 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Retrieves source as a wide string\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_get_wide_source(\n     const system_character_t *source,\n     wchar_t *wide_string,\n     size_t wide_string_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function   = \"fsntfs_test_get_wide_source\";\n\tsize_t wide_source_size = 0;\n\tsize_t source_length    = 0;\n\n#if !defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tint result              = 0;\n#endif\n\n\tif( source == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid source.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( wide_string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid wide string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( wide_string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid wide string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tsource_length = system_string_length(\n\t                 source );\n\n\tif( source_length > (size_t) ( SSIZE_MAX - 1 ) )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,\n\t\t \"%s: invalid source length value out of bounds.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\twide_source_size = source_length + 1;\n#else\n\tif( libclocale_codepage == 0 )\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf32_string_size_from_utf8(\n\t\t          (libuna_utf8_character_t *) source,\n\t\t          source_length + 1,\n\t\t          &wide_source_size,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf16_string_size_from_utf8(\n\t\t          (libuna_utf8_character_t *) source,\n\t\t          source_length + 1,\n\t\t          &wide_source_size,\n\t\t          error );\n#endif\n\t}\n\telse\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf32_string_size_from_byte_stream(\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          &wide_source_size,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf16_string_size_from_byte_stream(\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          &wide_source_size,\n\t\t          error );\n#endif\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t LIBCERROR_CONVERSION_ERROR_GENERIC,\n\t\t \"%s: unable to determine wide string size.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n\tif( wide_string_size < wide_source_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,\n\t\t \"%s: wide string too small.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tif( system_string_copy(\n\t     wide_string,\n\t     source,\n\t     source_length ) == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_MEMORY,\n\t\t LIBCERROR_MEMORY_ERROR_COPY_FAILED,\n\t\t \"%s: unable to set wide string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\twide_string[ source_length ] = 0;\n#else\n\tif( libclocale_codepage == 0 )\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf32_string_copy_from_utf8(\n\t\t          (libuna_utf32_character_t *) wide_string,\n\t\t          wide_string_size,\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf16_string_copy_from_utf8(\n\t\t          (libuna_utf16_character_t *) wide_string,\n\t\t          wide_string_size,\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          error );\n#endif\n\t}\n\telse\n\t{\n#if SIZEOF_WCHAR_T == 4\n\t\tresult = libuna_utf32_string_copy_from_byte_stream(\n\t\t          (libuna_utf32_character_t *) wide_string,\n\t\t          wide_string_size,\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          error );\n#elif SIZEOF_WCHAR_T == 2\n\t\tresult = libuna_utf16_string_copy_from_byte_stream(\n\t\t          (libuna_utf16_character_t *) wide_string,\n\t\t          wide_string_size,\n\t\t          (uint8_t *) source,\n\t\t          source_length + 1,\n\t\t          libclocale_codepage,\n\t\t          error );\n#endif\n\t}\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_CONVERSION,\n\t\t LIBCERROR_CONVERSION_ERROR_GENERIC,\n\t\t \"%s: unable to set wide string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\n#endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */\n\n\treturn( 1 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Copies a string of a decimal value to a 64-bit value\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_system_string_copy_from_64_bit_in_decimal(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error )\n{\n\tstatic char *function              = \"fsntfs_test_system_string_copy_from_64_bit_in_decimal\";\n\tsize_t string_index                = 0;\n\tsystem_character_t character_value = 0;\n\tuint8_t maximum_string_index       = 20;\n\tint8_t sign                        = 1;\n\n\tif( string == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid string.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( string_size > (size_t) SSIZE_MAX )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,\n\t\t \"%s: invalid string size value exceeds maximum.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( value_64bit == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid value 64-bit.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\t*value_64bit = 0;\n\n\tif( string[ string_index ] == (system_character_t) '-' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\n\t\tsign = -1;\n\t}\n\telse if( string[ string_index ] == (system_character_t) '+' )\n\t{\n\t\tstring_index++;\n\t\tmaximum_string_index++;\n\t}\n\twhile( string_index < string_size )\n\t{\n\t\tif( string[ string_index ] == 0 )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tif( string_index > (size_t) maximum_string_index )\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t\t LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE,\n\t\t\t \"%s: string too large.\",\n\t\t\t function );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*value_64bit *= 10;\n\n\t\tif( ( string[ string_index ] >= (system_character_t) '0' )\n\t\t && ( string[ string_index ] <= (system_character_t) '9' ) )\n\t\t{\n\t\t\tcharacter_value = (system_character_t) ( string[ string_index ] - (system_character_t) '0' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlibcerror_error_set(\n\t\t\t error,\n\t\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t\t LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,\n\t\t\t \"%s: unsupported character value: %\" PRIc_SYSTEM \" at index: %d.\",\n\t\t\t function,\n\t\t\t string[ string_index ],\n\t\t\t string_index );\n\n\t\t\treturn( -1 );\n\t\t}\n\t\t*value_64bit += character_value;\n\n\t\tstring_index++;\n\t}\n\tif( sign == -1 )\n\t{\n\t\t*value_64bit *= (uint64_t) -1;\n\t}\n\treturn( 1 );\n}\n\n/* Creates a file IO handle for test data\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_open_file_io_handle(\n     libbfio_handle_t **file_io_handle,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_open_file_io_handle\";\n\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_memory_range_initialize(\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to create file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_memory_range_set(\n\t     *file_io_handle,\n\t     data,\n\t     data_size,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_SET_FAILED,\n\t\t \"%s: unable to set memory range of file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tif( libbfio_handle_open(\n\t     *file_io_handle,\n\t     LIBBFIO_OPEN_READ,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open file IO handle.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t file_io_handle,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Closes a file IO handle for test data\n * Returns 0 if successful or -1 on error\n */\nint fsntfs_test_close_file_io_handle(\n     libbfio_handle_t **file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_close_file_io_handle\";\n\tint result            = 0;\n\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libbfio_handle_close(\n\t     *file_io_handle,\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t \"%s: unable to close file IO handle.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\tif( libbfio_handle_free(\n\t     file_io_handle,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free file IO handle.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\treturn( result );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_functions.h",
    "content": "/*\n * Functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_FUNCTIONS_H )\n#define _FSNTFS_TEST_FUNCTIONS_H\n\n#include <common.h>\n#include <types.h>\n\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\nint fsntfs_test_get_narrow_source(\n     const system_character_t *source,\n     char *narrow_string,\n     size_t narrow_string_size,\n     libcerror_error_t **error );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\nint fsntfs_test_get_wide_source(\n     const system_character_t *source,\n     wchar_t *wide_string,\n     size_t wide_string_size,\n     libcerror_error_t **error );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\nint fsntfs_test_system_string_copy_from_64_bit_in_decimal(\n     const system_character_t *string,\n     size_t string_size,\n     uint64_t *value_64bit,\n     libcerror_error_t **error );\n\nint fsntfs_test_open_file_io_handle(\n     libbfio_handle_t **file_io_handle,\n     uint8_t *data,\n     size_t data_size,\n     libcerror_error_t **error );\n\nint fsntfs_test_close_file_io_handle(\n     libbfio_handle_t **file_io_handle,\n     libcerror_error_t **error );\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_TEST_FUNCTIONS_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_getopt.c",
    "content": "/*\n * GetOpt functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_getopt.h\"\n#include \"fsntfs_test_libcnotify.h\"\n\n#if !defined( HAVE_GETOPT )\n\n/* The option index\n * Start with argument 1 (argument 0 is the program name)\n */\nint optind = 1;\n\n/* The current option argument\n */\nsystem_character_t *optarg = NULL;\n\n/* Value to indicate the current option\n */\nsystem_integer_t optopt = 0;\n\n/* The next option in a group\n */\nsystem_character_t *next_option = NULL;\n\n/* Get the program options\n * Function for platforms that do not have the getopt function\n * Returns the option character processed, or -1 on error,\n * ? if the option was not in the options string, : if the option argument was missing\n */\nsystem_integer_t fsntfs_test_getopt(\n                  int argument_count,\n                  system_character_t * const argument_values[],\n                  const system_character_t *options_string )\n{\n\tsystem_character_t *argument_value = NULL;\n\tsystem_character_t *option_value   = NULL;\n\tstatic char *function              = \"fsntfs_test_getopt\";\n\tsize_t options_string_length       = 0;\n\n\tif( next_option != NULL )\n\t{\n\t\targument_value = next_option;\n\t\tnext_option    = NULL;\n\t}\n\telse if( optind >= argument_count )\n\t{\n\t\treturn( (system_integer_t) -1 );\n\t}\n\telse\n\t{\n\t\targument_value = argument_values[ optind ];\n\n\t\t/* Check if the argument value is not an empty string\n\t\t */\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t\t/* Check if the first character is a option marker '-'\n\t\t */\n\t\tif( *argument_value != (system_character_t) '-' )\n\t\t{\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t\targument_value++;\n\n\t\t/* Check if long options are provided '--'\n\t\t */\n\t\tif( *argument_value == (system_character_t) '-' )\n\t\t{\n\t\t\toptind++;\n\n\t\t\treturn( (system_integer_t) -1 );\n\t\t}\n\t}\n\toptions_string_length = system_string_length(\n\t                         options_string );\n\n\toptopt       = *argument_value;\n\toption_value = system_string_search_character(\n\t                options_string,\n\t                optopt,\n\t                options_string_length );\n\n\targument_value++;\n\n\t/* Check if an argument was specified or that the option was not found\n\t * in the option string\n\t */\n\tif( ( optopt == (system_integer_t) ':' )\n\t || ( option_value == NULL ) )\n\t{\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\toptind++;\n\t\t}\n\t\tif( ( *options_string != (system_character_t) ':' )\n\t\t && ( optopt != (system_integer_t) '?' ) )\n\t\t{\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: no such option: %\" PRIc_SYSTEM \".\\n\",\n\t\t\t function,\n\t\t\t optopt );\n\t\t}\n\t\treturn( (system_integer_t) '?' );\n\t}\n\toption_value++;\n\n\t/* Check if no option argument is required\n\t */\n\tif( *option_value != (system_character_t) ':' )\n\t{\n\t\toptarg = NULL;\n\n\t\tif( *argument_value == (system_character_t) '\\0' )\n\t\t{\n\t\t\toptind++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Multiple options are grouped\n\t\t\t */\n\t\t\tnext_option = argument_value;\n\t\t}\n\t}\n\t/* Check if the argument is right after the option flag with no space in between\n\t */\n\telse if( *argument_value != (system_character_t) '\\0' )\n\t{\n\t\toptarg = argument_value;\n\n\t\toptind++;\n\t}\n\telse\n\t{\n\t\toptind++;\n\n\t\t/* Check if the argument was provided as the next argument value\n\t\t */\n\t\tif( argument_count <= optind )\n\t\t{\n\t\t\tif( *option_value == ':' )\n\t\t\t{\n\t\t\t\treturn( (system_integer_t) ':' );\n\t\t\t}\n\t\t\tlibcnotify_printf(\n\t\t\t \"%s: option: %\" PRIc_SYSTEM \" requires an argument.\\n\",\n\t\t\t function,\n\t\t\t optopt );\n\n\t\t\treturn( (system_integer_t) '?' );\n\t\t}\n\t\toptarg = argument_values[ optind ];\n\n\t\toptind++;\n\t}\n\treturn( optopt );\n}\n\n#endif /* !defined( HAVE_GETOPT ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_getopt.h",
    "content": "/*\n * GetOpt functions\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_GETOPT_H )\n#define _FSNTFS_TEST_GETOPT_H\n\n#include <common.h>\n#include <types.h>\n\n/* unistd.h is included here to export getopt, optarg, optind and optopt\n */\n#if defined( HAVE_UNISTD_H )\n#include <unistd.h>\n#endif\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_GETOPT )\n#define fsntfs_test_getopt( argument_count, argument_values, options_string ) \\\n\tgetopt( argument_count, argument_values, options_string )\n\n#else\n\n#if !defined( __CYGWIN__ )\nextern int optind;\nextern system_character_t *optarg;\nextern system_integer_t optopt;\n\n#else\nint optind;\nsystem_character_t *optarg;\nsystem_integer_t optopt;\n\n#endif /* !defined( __CYGWIN__ ) */\n\nsystem_integer_t fsntfs_test_getopt(\n                  int argument_count,\n                  system_character_t * const argument_values[],\n                  const system_character_t *options_string );\n\n#endif /* defined( HAVE_GETOPT ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_TEST_GETOPT_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_index.c",
    "content": "/*\n * Library index type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_index_data1[ 88 ] = {\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x01, 0x00, 0x06, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x49, 0x00, 0x33, 0x00, 0x30, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_initialize(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_index_t *index         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tint result                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests  = 3;\n\tint number_of_memset_fail_tests  = 1;\n\tint test_number                  = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          io_handle,\n\t          (uint8_t *) \"$I30\",\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index\",\n\t index );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_free(\n\t          &index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index\",\n\t index );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_initialize(\n\t          NULL,\n\t          io_handle,\n\t          (uint8_t *) \"$I30\",\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex = (libfsntfs_index_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          io_handle,\n\t          (uint8_t *) \"$I30\",\n\t          5,\n\t          &error );\n\n\tindex = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          NULL,\n\t          (uint8_t *) \"$I30\",\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          io_handle,\n\t          NULL,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          io_handle,\n\t          (uint8_t *) \"$I30\",\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_initialize(\n\t\t          &index,\n\t\t          io_handle,\n\t\t          (uint8_t *) \"$I30\",\n\t\t          5,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_free(\n\t\t\t\t &index,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index\",\n\t\t\t index );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_initialize(\n\t\t          &index,\n\t\t          io_handle,\n\t\t          (uint8_t *) \"$I30\",\n\t\t          5,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_free(\n\t\t\t\t &index,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index\",\n\t\t\t index );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_index_initialize with memcpy failing\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tresult = libfsntfs_index_initialize(\n\t          &index,\n\t          io_handle,\n\t          (uint8_t *) \"$I30\",\n\t          5,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"index\",\n\t\t index );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index != NULL )\n\t{\n\t\tlibfsntfs_index_free(\n\t\t &index,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_initialize\",\n\t fsntfs_test_index_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_free\",\n\t fsntfs_test_index_free );\n\n\t/* TODO: add tests for libfsntfs_index_read */\n\n\t/* TODO: add tests for libfsntfs_index_read_root */\n\n\t/* TODO: add tests for libfsntfs_index_read_bitmap */\n\n\t/* TODO: add tests for libfsntfs_index_get_index_entry_size */\n\n\t/* TODO: add tests for libfsntfs_index_get_attribute_type */\n\n\t/* TODO: add tests for libfsntfs_index_get_collation_type */\n\n\t/* TODO: add tests for libfsntfs_index_get_sub_node */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_entry.c",
    "content": "/*\n * Library index_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_entry.h\"\n\nuint8_t fsntfs_test_index_entry_data1[ 4096 ] = {\n\t0x49, 0x4e, 0x44, 0x58, 0x28, 0x00, 0x09, 0x00, 0x39, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x0a, 0x00, 0x00,\n\t0xe8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0xd5, 0x01,\n\t0x6c, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x41, 0x00, 0x74, 0x00,\n\t0x74, 0x00, 0x72, 0x00, 0x44, 0x00, 0x65, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x43, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x42, 0x00, 0x69, 0x00,\n\t0x74, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,\n\t0x60, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x24, 0x00, 0x42, 0x00, 0x6f, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x45, 0x00, 0x78, 0x00,\n\t0x74, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x4c, 0x00, 0x6f, 0x00,\n\t0x67, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x53, 0x00, 0x65, 0x00,\n\t0x63, 0x00, 0x75, 0x00, 0x72, 0x00, 0x65, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x55, 0x00, 0x70, 0x00,\n\t0x43, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x56, 0x00, 0x6f, 0x00,\n\t0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x58, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x63, 0x09, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x63, 0x09, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x0e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00,\n\t0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x61, 0x00, 0x64, 0x00, 0x73, 0x00, 0x31, 0x00, 0x74, 0x00,\n\t0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x03, 0x00, 0x00, 0xa0,\n\t0x13, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00,\n\t0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x6a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x74, 0x00,\n\t0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0x0a, 0x00,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x0c, 0x00, 0x10, 0x0c, 0x00, 0x00, 0xa0, 0x17, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x73, 0x00,\n\t0x79, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x6c, 0x00,\n\t0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x70, 0x00,\n\t0x74, 0x00, 0x79, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x5f, 0x00, 0x61, 0x00, 0x64, 0x00,\n\t0x73, 0x00, 0x31, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x70, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xb4, 0x6c, 0xad, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x5f, 0x00, 0x68, 0x00, 0x61, 0x00, 0x72, 0x00, 0x64, 0x00, 0x6c, 0x00, 0x69, 0x00,\n\t0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x78, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xa0, 0x12, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x5f, 0x00, 0x73, 0x00, 0x79, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x0a, 0x00,\n\t0x69, 0x00, 0x63, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x20, 0x00,\n\t0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa8, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x2a, 0x00, 0x4d, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00,\n\t0x2c, 0x00, 0x20, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00,\n\t0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x20, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00,\n\t0x20, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x73, 0x00,\n\t0x6f, 0x00, 0x20, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00,\n\t0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00, 0xd5, 0x01, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x88, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00,\n\t0x74, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x20, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x6d, 0x00, 0x65, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00,\n\t0x6d, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x74, 0x00, 0x65, 0x00, 0x0a, 0x00,\n\t0x74, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_initialize(\n     void )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_index_entry_t *index_entry = NULL;\n\tint result                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests      = 1;\n\tint number_of_memset_fail_tests      = 1;\n\tint test_number                      = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_initialize(\n\t          &index_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry\",\n\t index_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_entry_free(\n\t          &index_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry\",\n\t index_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_entry = (libfsntfs_index_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_entry_initialize(\n\t          &index_entry,\n\t          &error );\n\n\tindex_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_initialize(\n\t\t          &index_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_entry_free(\n\t\t\t\t &index_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry\",\n\t\t\t index_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_initialize(\n\t\t          &index_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_entry_free(\n\t\t\t\t &index_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry\",\n\t\t\t index_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_entry != NULL )\n\t{\n\t\tlibfsntfs_index_entry_free(\n\t\t &index_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_read_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_read_file_io_handle(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle     = NULL;\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_index_entry_t *index_entry = NULL;\n\tint result                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_entry_initialize(\n\t          &index_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry\",\n\t index_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_index_entry_data1,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          index_entry,\n\t          file_io_handle,\n\t          0,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          index_entry,\n\t          NULL,\n\t          0,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          index_entry,\n\t          file_io_handle,\n\t          -1,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data too small\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_index_entry_data1,\n\t          8,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          index_entry,\n\t          file_io_handle,\n\t          0,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data invalid\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_index_entry_data1,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t fsntfs_test_index_entry_data1,\n\t 0xffffffffUL );\n\n\tresult = libfsntfs_index_entry_read_file_io_handle(\n\t          index_entry,\n\t          file_io_handle,\n\t          0,\n\t          4096,\n\t          0,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t fsntfs_test_index_entry_data1,\n\t 0x58444e49UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_entry_free(\n\t          &index_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry\",\n\t index_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( index_entry != NULL )\n\t{\n\t\tlibfsntfs_index_entry_free(\n\t\t &index_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_initialize\",\n\t fsntfs_test_index_entry_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_free\",\n\t fsntfs_test_index_entry_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_read_file_io_handle\",\n\t fsntfs_test_index_entry_read_file_io_handle );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_entry_header.c",
    "content": "/*\n * Library index_entry_header type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_entry_header.h\"\n\nuint8_t fsntfs_test_index_entry_header_data1[ 24 ] = {\n\t0x49, 0x4e, 0x44, 0x58, 0x28, 0x00, 0x09, 0x00, 0xc1, 0xa9, 0x1b, 0x19, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_entry_header_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_header_initialize(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_index_entry_header_t *index_entry_header = NULL;\n\tint result                                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                    = 1;\n\tint number_of_memset_fail_tests                    = 1;\n\tint test_number                                    = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_header_initialize(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_entry_header_free(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_header_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_entry_header = (libfsntfs_index_entry_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_entry_header_initialize(\n\t          &index_entry_header,\n\t          &error );\n\n\tindex_entry_header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_header_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_header_initialize(\n\t\t          &index_entry_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_entry_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_entry_header_free(\n\t\t\t\t &index_entry_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry_header\",\n\t\t\t index_entry_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_header_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_header_initialize(\n\t\t          &index_entry_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_entry_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_entry_header_free(\n\t\t\t\t &index_entry_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry_header\",\n\t\t\t index_entry_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_entry_header != NULL )\n\t{\n\t\tlibfsntfs_index_entry_header_free(\n\t\t &index_entry_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_header_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_header_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_header_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_header_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_header_read_data(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_index_entry_header_t *index_entry_header = NULL;\n\tint result                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_entry_header_initialize(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          index_entry_header,\n\t          fsntfs_test_index_entry_header_data1,\n\t          24,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          NULL,\n\t          fsntfs_test_index_entry_header_data1,\n\t          24,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          index_entry_header,\n\t          NULL,\n\t          24,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          index_entry_header,\n\t          fsntfs_test_index_entry_header_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          index_entry_header,\n\t          fsntfs_test_index_entry_header_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_entry_header_free(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_entry_header != NULL )\n\t{\n\t\tlibfsntfs_index_entry_header_free(\n\t\t &index_entry_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_header_get_fixup_values_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_header_get_fixup_values_offset(\n     libfsntfs_index_entry_header_t *index_entry_header )\n{\n\tlibcerror_error_t *error     = NULL;\n\tuint16_t fixup_values_offset = 0;\n\tint result                   = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_header_get_fixup_values_offset(\n\t          index_entry_header,\n\t          &fixup_values_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"fixup_values_offset\",\n\t fixup_values_offset,\n\t 40 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_header_get_fixup_values_offset(\n\t          NULL,\n\t          &fixup_values_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_header_get_fixup_values_offset(\n\t          index_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_header_get_number_of_fixup_values function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_header_get_number_of_fixup_values(\n     libfsntfs_index_entry_header_t *index_entry_header )\n{\n\tlibcerror_error_t *error        = NULL;\n\tuint16_t number_of_fixup_values = 0;\n\tint result                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_header_get_number_of_fixup_values(\n\t          index_entry_header,\n\t          &number_of_fixup_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"number_of_fixup_values\",\n\t number_of_fixup_values,\n\t 9 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_header_get_number_of_fixup_values(\n\t          NULL,\n\t          &number_of_fixup_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_header_get_number_of_fixup_values(\n\t          index_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_index_entry_header_t *index_entry_header = NULL;\n\tint result                                         = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_header_initialize\",\n\t fsntfs_test_index_entry_header_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_header_free\",\n\t fsntfs_test_index_entry_header_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_header_read_data\",\n\t fsntfs_test_index_entry_header_read_data );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_entry_header_initialize(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_entry_header_read_data(\n\t          index_entry_header,\n\t          fsntfs_test_index_entry_header_data1,\n\t          24,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_entry_header_get_fixup_values_offset\",\n\t fsntfs_test_index_entry_header_get_fixup_values_offset,\n\t index_entry_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_entry_header_get_number_of_fixup_values\",\n\t fsntfs_test_index_entry_header_get_number_of_fixup_values,\n\t index_entry_header );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_entry_header_free(\n\t          &index_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry_header\",\n\t index_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_entry_header != NULL )\n\t{\n\t\tlibfsntfs_index_entry_header_free(\n\t\t &index_entry_header,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_entry_vector.c",
    "content": "/*\n * Library index_entry_vector type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfcache.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_entry_vector.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_index_entry_vector_data1[ 72 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_index_entry_vector_data2[ 8192 ] = {\n\t0x49, 0x4e, 0x44, 0x58, 0x28, 0x00, 0x09, 0x00, 0x39, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x0a, 0x00, 0x00,\n\t0xe8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0xd5, 0x01,\n\t0x6c, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x41, 0x00, 0x74, 0x00,\n\t0x74, 0x00, 0x72, 0x00, 0x44, 0x00, 0x65, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x42, 0x00, 0x61, 0x00, 0x64, 0x00, 0x43, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x42, 0x00, 0x69, 0x00,\n\t0x74, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,\n\t0x60, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x24, 0x00, 0x42, 0x00, 0x6f, 0x00,\n\t0x6f, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x45, 0x00, 0x78, 0x00,\n\t0x74, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x24, 0x00, 0x4c, 0x00, 0x6f, 0x00,\n\t0x67, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x53, 0x00, 0x65, 0x00,\n\t0x63, 0x00, 0x75, 0x00, 0x72, 0x00, 0x65, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x55, 0x00, 0x70, 0x00,\n\t0x43, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x60, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x24, 0x00, 0x56, 0x00, 0x6f, 0x00,\n\t0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x58, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x51, 0x72, 0x11, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x63, 0x09, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x63, 0x09, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x0e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00,\n\t0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x61, 0x00, 0x64, 0x00, 0x73, 0x00, 0x31, 0x00, 0x74, 0x00,\n\t0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x03, 0x00, 0x00, 0xa0,\n\t0x13, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00,\n\t0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x6a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x74, 0x00,\n\t0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0x0a, 0x00,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x0c, 0x00, 0x10, 0x0c, 0x00, 0x00, 0xa0, 0x17, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x73, 0x00,\n\t0x79, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x6c, 0x00,\n\t0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x70, 0x00,\n\t0x74, 0x00, 0x79, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xa7, 0xbf, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x5f, 0x00, 0x61, 0x00, 0x64, 0x00,\n\t0x73, 0x00, 0x31, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x70, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xb4, 0x6c, 0xad, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x5f, 0x00, 0x68, 0x00, 0x61, 0x00, 0x72, 0x00, 0x64, 0x00, 0x6c, 0x00, 0x69, 0x00,\n\t0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x78, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2f, 0x4e, 0xde, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xa0, 0x12, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x5f, 0x00, 0x73, 0x00, 0x79, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x0a, 0x00,\n\t0x69, 0x00, 0x63, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, 0x31, 0x00, 0x20, 0x00,\n\t0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa8, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x2a, 0x00, 0x4d, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00,\n\t0x2c, 0x00, 0x20, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00,\n\t0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x20, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00,\n\t0x20, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x73, 0x00,\n\t0x6f, 0x00, 0x20, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00,\n\t0x6f, 0x00, 0x6e, 0x00, 0x67, 0x00, 0xd5, 0x01, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x88, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xe0, 0x72, 0x6b, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x06, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00,\n\t0x74, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x20, 0x00, 0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00,\n\t0x6d, 0x00, 0x65, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00,\n\t0x6d, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x2a, 0xa0, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,\n\t0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xc1, 0x7d, 0xe0, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x74, 0x00, 0x65, 0x00, 0x0a, 0x00,\n\t0x74, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,\n\t0x49, 0x4e, 0x44, 0x58, 0x28, 0x00, 0x09, 0x00, 0x37, 0x75, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xf8, 0x02, 0x00, 0x00,\n\t0xe8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x19, 0xa4, 0xcb, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x07, 0xdd, 0xd2, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x07, 0xdd, 0xd2, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x07, 0xdd, 0xd2, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xd6, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x17, 0x00, 0x00, 0x80,\n\t0x17, 0x00, 0x6c, 0x00, 0x7a, 0x00, 0x78, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,\n\t0x73, 0x00, 0x31, 0x00, 0x36, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00,\n\t0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x31, 0x00,\n\t0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb7, 0x57, 0xae, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xbb, 0x00, 0xc1, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0xbb, 0x00, 0xc1, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xbb, 0x00, 0xc1, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xd6, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x17, 0x00, 0x00, 0x80,\n\t0x16, 0x00, 0x6c, 0x00, 0x7a, 0x00, 0x78, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,\n\t0x73, 0x00, 0x34, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00,\n\t0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x31, 0x00, 0x01, 0x00,\n\t0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe8, 0xeb, 0xc1, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x19, 0xa4, 0xcb, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x19, 0xa4, 0xcb, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x19, 0xa4, 0xcb, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xd6, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x17, 0x00, 0x00, 0x80,\n\t0x16, 0x00, 0x6c, 0x00, 0x7a, 0x00, 0x78, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,\n\t0x73, 0x00, 0x38, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00,\n\t0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x31, 0x00, 0x01, 0x00,\n\t0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x93, 0x63, 0xd4, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0xd6, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x17, 0x00, 0x00, 0x80,\n\t0x0f, 0x00, 0x6c, 0x00, 0x7a, 0x00, 0x78, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00,\n\t0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x31, 0x00,\n\t0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xe5, 0xae, 0xac, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x5b, 0x14, 0xdd, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0xb4, 0x6c, 0xad, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00,\n\t0x65, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x68, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0xb4, 0x6c, 0xad, 0x59, 0x4e, 0xa1, 0xd5, 0x01, 0x39, 0x6b, 0x96, 0x51, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x39, 0x6b, 0x96, 0x51, 0x4e, 0xa1, 0xd5, 0x01, 0xb4, 0x6c, 0xad, 0x59, 0x4e, 0xa1, 0xd5, 0x01,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,\n\t0x74, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_entry_vector_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_vector_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfdata_vector_t *index_entry_vector    = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\tio_handle->index_entry_size   = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_index_entry_vector_data1,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry_vector\",\n\t index_entry_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &index_entry_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry_vector\",\n\t index_entry_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          NULL,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_entry_vector = (libfdata_vector_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tindex_entry_vector = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tio_handle->cluster_block_size = 0;\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          NULL,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          NULL,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO test with LIBFSNTFS_ATTRIBUTE_FLAG_COMPRESSION_MASK set */\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_vector_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_vector_initialize(\n\t\t          &index_entry_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          4096,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_entry_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &index_entry_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry_vector\",\n\t\t\t index_entry_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_entry_vector_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_entry_vector_initialize(\n\t\t          &index_entry_vector,\n\t\t          io_handle,\n\t\t          mft_attribute,\n\t\t          4096,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_entry_vector != NULL )\n\t\t\t{\n\t\t\t\tlibfdata_vector_free(\n\t\t\t\t &index_entry_vector,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_entry_vector\",\n\t\t\t index_entry_vector );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_entry_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &index_entry_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_entry_vector_read_element_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_entry_vector_read_element_data(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle         = NULL;\n\tlibcerror_error_t *error                 = NULL;\n\tlibfcache_cache_t *cache                 = NULL;\n\tlibfdata_vector_t *index_entry_vector    = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\tio_handle->index_entry_size   = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_index_entry_vector_data1,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_entry_vector_initialize(\n\t          &index_entry_vector,\n\t          io_handle,\n\t          mft_attribute,\n\t          4096,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_entry_vector\",\n\t index_entry_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfcache_cache_initialize(\n\t          &cache,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_index_entry_vector_data2,\n\t          8192,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          index_entry_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          index_entry_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          0,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          index_entry_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          (size64_t) SSIZE_MAX + 1,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          NULL,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO implement read from file IO handle failing */\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_index_entry_vector_read_element_data with malloc failing in libfsntfs_index_entry_initialize\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          index_entry_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_index_entry_vector_read_element_data with memset failing in libfsntfs_index_entry_clear\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tresult = libfsntfs_index_entry_vector_read_element_data(\n\t          NULL,\n\t          file_io_handle,\n\t          index_entry_vector,\n\t          (libfdata_cache_t *) cache,\n\t          0,\n\t          0,\n\t          0,\n\t          4096,\n\t          0,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfcache_cache_free(\n\t          &cache,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"cache\",\n\t cache );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_vector_free(\n\t          &index_entry_vector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_entry_vector\",\n\t index_entry_vector );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( cache != NULL )\n\t{\n\t\tlibfcache_cache_free(\n\t\t &cache,\n\t\t NULL );\n\t}\n\tif( index_entry_vector != NULL )\n\t{\n\t\tlibfdata_vector_free(\n\t\t &index_entry_vector,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_vector_initialize\",\n\t fsntfs_test_index_entry_vector_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_entry_vector_read_element_data\",\n\t fsntfs_test_index_entry_vector_read_element_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_node.c",
    "content": "/*\n * Library index_node type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_node.h\"\n\nuint8_t fsntfs_test_index_node_data1[ 40 ] = {\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_node_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_initialize(\n     void )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_index_node_t *index_node = NULL;\n\tint result                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests    = 1;\n\tint number_of_memset_fail_tests    = 1;\n\tint test_number                    = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_initialize(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_node_free(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_node = (libfsntfs_index_node_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_node_initialize(\n\t          &index_node,\n\t          &error );\n\n\tindex_node = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_node_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_node_initialize(\n\t\t          &index_node,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_node != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_node_free(\n\t\t\t\t &index_node,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_node\",\n\t\t\t index_node );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_node_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_node_initialize(\n\t\t          &index_node,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_node != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_node_free(\n\t\t\t\t &index_node,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_node\",\n\t\t\t index_node );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &index_node,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_read_header function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_read_header(\n     void )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_index_node_t *index_node = NULL;\n\tint result                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_node_initialize(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_read_header(\n\t          NULL,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          NULL,\n\t          40,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          fsntfs_test_index_node_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_node_free(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &index_node,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_read_values function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_read_values(\n     void )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_index_node_t *index_node = NULL;\n\tint result                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_node_initialize(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_read_values(\n\t          index_node,\n\t          0,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_read_values(\n\t          NULL,\n\t          0,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_values(\n\t          index_node,\n\t          0,\n\t          NULL,\n\t          40,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_values(\n\t          index_node,\n\t          0,\n\t          fsntfs_test_index_node_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_read_values(\n\t          index_node,\n\t          0,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_node_free(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &index_node,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_get_number_of_values function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_get_number_of_values(\n     libfsntfs_index_node_t *index_node )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_values     = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_get_number_of_values(\n\t          index_node,\n\t          &number_of_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_values\",\n\t number_of_values,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_get_number_of_values(\n\t          NULL,\n\t          &number_of_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_get_number_of_values(\n\t          index_node,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_index_node_t *index_node = NULL;\n\tint result                         = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_initialize\",\n\t fsntfs_test_index_node_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_free\",\n\t fsntfs_test_index_node_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_read_header\",\n\t fsntfs_test_index_node_read_header );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_read_values\",\n\t fsntfs_test_index_node_read_values );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_node_initialize(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_node_read_header(\n\t          index_node,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_node_read_values(\n\t          index_node,\n\t          0,\n\t          fsntfs_test_index_node_data1,\n\t          40,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_node_get_number_of_values\",\n\t fsntfs_test_index_node_get_number_of_values,\n\t index_node );\n\n\t/* TODO add tests for libfsntfs_index_node_get_value_by_index */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_node_free(\n\t          &index_node,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node\",\n\t index_node );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node != NULL )\n\t{\n\t\tlibfsntfs_index_node_free(\n\t\t &index_node,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_node_header.c",
    "content": "/*\n * Library index_node_header type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_node_header.h\"\n\nuint8_t fsntfs_test_index_node_header_data1[ 16 ] = {\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_node_header_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_header_initialize(\n     void )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_index_node_header_t *index_node_header = NULL;\n\tint result                                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                  = 1;\n\tint number_of_memset_fail_tests                  = 1;\n\tint test_number                                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_header_initialize(\n\t          &index_node_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node_header\",\n\t index_node_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_node_header_free(\n\t          &index_node_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node_header\",\n\t index_node_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_header_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_node_header = (libfsntfs_index_node_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_node_header_initialize(\n\t          &index_node_header,\n\t          &error );\n\n\tindex_node_header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_node_header_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_node_header_initialize(\n\t\t          &index_node_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_node_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_node_header_free(\n\t\t\t\t &index_node_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_node_header\",\n\t\t\t index_node_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_node_header_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_node_header_initialize(\n\t\t          &index_node_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_node_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_node_header_free(\n\t\t\t\t &index_node_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_node_header\",\n\t\t\t index_node_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node_header != NULL )\n\t{\n\t\tlibfsntfs_index_node_header_free(\n\t\t &index_node_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_header_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_header_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_header_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_node_header_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_node_header_read_data(\n     void )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_index_node_header_t *index_node_header = NULL;\n\tint result                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_node_header_initialize(\n\t          &index_node_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_node_header\",\n\t index_node_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_node_header_read_data(\n\t          index_node_header,\n\t          fsntfs_test_index_node_header_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_node_header_read_data(\n\t          NULL,\n\t          fsntfs_test_index_node_header_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_header_read_data(\n\t          index_node_header,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_node_header_read_data(\n\t          index_node_header,\n\t          fsntfs_test_index_node_header_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_node_header_free(\n\t          &index_node_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_node_header\",\n\t index_node_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_node_header != NULL )\n\t{\n\t\tlibfsntfs_index_node_header_free(\n\t\t &index_node_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_header_initialize\",\n\t fsntfs_test_index_node_header_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_header_free\",\n\t fsntfs_test_index_node_header_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_node_header_read_data\",\n\t fsntfs_test_index_node_header_read_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_root_header.c",
    "content": "/*\n * Library index_root_header type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_root_header.h\"\n\nuint8_t fsntfs_test_index_root_header_data1[ 16 ] = {\n\t0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_root_header_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_initialize(\n     void )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_index_root_header_t *index_root_header = NULL;\n\tint result                                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                  = 1;\n\tint number_of_memset_fail_tests                  = 1;\n\tint test_number                                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_root_header_initialize(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_root_header_free(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_root_header = (libfsntfs_index_root_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_root_header_initialize(\n\t          &index_root_header,\n\t          &error );\n\n\tindex_root_header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_root_header_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_root_header_initialize(\n\t\t          &index_root_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_root_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_root_header_free(\n\t\t\t\t &index_root_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_root_header\",\n\t\t\t index_root_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_root_header_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_root_header_initialize(\n\t\t          &index_root_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_root_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_root_header_free(\n\t\t\t\t &index_root_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_root_header\",\n\t\t\t index_root_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_root_header != NULL )\n\t{\n\t\tlibfsntfs_index_root_header_free(\n\t\t &index_root_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_root_header_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_root_header_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_read_data(\n     void )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_index_root_header_t *index_root_header = NULL;\n\tint result                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_root_header_initialize(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_root_header_read_data(\n\t          index_root_header,\n\t          fsntfs_test_index_root_header_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_read_data(\n\t          NULL,\n\t          fsntfs_test_index_root_header_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_read_data(\n\t          index_root_header,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_read_data(\n\t          index_root_header,\n\t          fsntfs_test_index_root_header_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_read_data(\n\t          index_root_header,\n\t          fsntfs_test_index_root_header_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_root_header_free(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_root_header != NULL )\n\t{\n\t\tlibfsntfs_index_root_header_free(\n\t\t &index_root_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_root_header_get_index_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_get_index_entry_size(\n     libfsntfs_index_root_header_t *index_root_header )\n{\n\tlibcerror_error_t *error  = NULL;\n\tuint32_t index_entry_size = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_root_header_get_index_entry_size(\n\t          index_root_header,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"index_entry_size\",\n\t index_entry_size,\n\t 4096 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_get_index_entry_size(\n\t          NULL,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_get_index_entry_size(\n\t          index_root_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_root_header_get_attribute_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_get_attribute_type(\n     libfsntfs_index_root_header_t *index_root_header )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t attribute_type  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_root_header_get_attribute_type(\n\t          index_root_header,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"attribute_type\",\n\t attribute_type,\n\t (uint32_t) 0x00000030UL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_get_attribute_type(\n\t          NULL,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_get_attribute_type(\n\t          index_root_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_root_header_get_collation_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_root_header_get_collation_type(\n     libfsntfs_index_root_header_t *index_root_header )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t collation_type  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_root_header_get_collation_type(\n\t          index_root_header,\n\t          &collation_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"collation_type\",\n\t collation_type,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_root_header_get_collation_type(\n\t          NULL,\n\t          &collation_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_index_root_header_get_collation_type(\n\t          index_root_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_index_root_header_t *index_root_header = NULL;\n\tint result                                       = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_root_header_initialize\",\n\t fsntfs_test_index_root_header_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_root_header_free\",\n\t fsntfs_test_index_root_header_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_root_header_read_data\",\n\t fsntfs_test_index_root_header_read_data );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_root_header_initialize(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_root_header_read_data(\n\t          index_root_header,\n\t          fsntfs_test_index_root_header_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_root_header_get_index_entry_size\",\n\t fsntfs_test_index_root_header_get_index_entry_size,\n\t index_root_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_root_header_get_attribute_type\",\n\t fsntfs_test_index_root_header_get_attribute_type,\n\t index_root_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_index_root_header_get_collation_type\",\n\t fsntfs_test_index_root_header_get_collation_type,\n\t index_root_header );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_root_header_free(\n\t          &index_root_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_root_header\",\n\t index_root_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_root_header != NULL )\n\t{\n\t\tlibfsntfs_index_root_header_free(\n\t\t &index_root_header,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_index_value.c",
    "content": "/*\n * Library index_value type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_index_value.h\"\n\nuint8_t fsntfs_test_index_value_data1[ 24 ] = {\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_index_value_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_value_initialize(\n     void )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_index_value_t *index_value = NULL;\n\tint result                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests      = 1;\n\tint number_of_memset_fail_tests      = 1;\n\tint test_number                      = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_index_value_initialize(\n\t          &index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_value\",\n\t index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_index_value_free(\n\t          &index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_value\",\n\t index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_value_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tindex_value = (libfsntfs_index_value_t *) 0x12345678UL;\n\n\tresult = libfsntfs_index_value_initialize(\n\t          &index_value,\n\t          &error );\n\n\tindex_value = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_value_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_value_initialize(\n\t\t          &index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_value_free(\n\t\t\t\t &index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_value\",\n\t\t\t index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_index_value_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_index_value_initialize(\n\t\t          &index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_index_value_free(\n\t\t\t\t &index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"index_value\",\n\t\t\t index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_value != NULL )\n\t{\n\t\tlibfsntfs_index_value_free(\n\t\t &index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_value_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_value_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_index_value_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_index_index_value_read function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_index_value_read(\n     void )\n{\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_index_value_t *index_value = NULL;\n\tssize_t read_count                   = 0;\n\tint index_value_entry                = 0;\n\tint result                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_index_value_initialize(\n\t          &index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"index_value\",\n\t index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tread_count = libfsntfs_index_value_read(\n\t              index_value,\n\t              0,\n\t              &index_value_entry,\n\t              fsntfs_test_index_value_data1,\n\t              24,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) 24 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tread_count = libfsntfs_index_value_read(\n\t              NULL,\n\t              0,\n\t              &index_value_entry,\n\t              fsntfs_test_index_value_data1,\n\t              24,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_index_value_read(\n\t              index_value,\n\t              0,\n\t              &index_value_entry,\n\t              NULL,\n\t              24,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tread_count = libfsntfs_index_value_read(\n\t              index_value,\n\t              0,\n\t              &index_value_entry,\n\t              fsntfs_test_index_value_data1,\n\t              (size_t) SSIZE_MAX + 1,\n\t              0,\n\t              &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SSIZE(\n\t \"read_count\",\n\t read_count,\n\t (ssize_t) -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_index_value_free(\n\t          &index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"index_value\",\n\t index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( index_value != NULL )\n\t{\n\t\tlibfsntfs_index_value_free(\n\t\t &index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_value_initialize\",\n\t fsntfs_test_index_value_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_value_free\",\n\t fsntfs_test_index_value_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_index_value_read\",\n\t fsntfs_test_index_value_read );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_io_handle.c",
    "content": "/*\n * Library io_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_io_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_io_handle_initialize(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tint result                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests  = 1;\n\tint number_of_memset_fail_tests  = 1;\n\tint test_number                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tio_handle = (libfsntfs_io_handle_t *) 0x12345678UL;\n\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tio_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_io_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_io_handle_initialize(\n\t\t          &io_handle,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( io_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_io_handle_free(\n\t\t\t\t &io_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"io_handle\",\n\t\t\t io_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_io_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_io_handle_initialize(\n\t\t          &io_handle,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( io_handle != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_io_handle_free(\n\t\t\t\t &io_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"io_handle\",\n\t\t\t io_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_io_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_io_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_io_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_io_handle_clear function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_io_handle_clear(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_io_handle_clear(\n\t          io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_io_handle_clear(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_io_handle_clear with memset failing\n\t */\n\tfsntfs_test_memset_attempts_before_fail = 0;\n\n\tresult = libfsntfs_io_handle_clear(\n\t          io_handle,\n\t          &error );\n\n\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_io_handle_initialize\",\n\t fsntfs_test_io_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_io_handle_free\",\n\t fsntfs_test_io_handle_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_io_handle_clear\",\n\t fsntfs_test_io_handle_clear );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_libbfio.h",
    "content": "/*\n * The libbfio header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBBFIO_H )\n#define _FSNTFS_TEST_LIBBFIO_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBBFIO for local use of libbfio\n */\n#if defined( HAVE_LOCAL_LIBBFIO )\n\n#include <libbfio_definitions.h>\n#include <libbfio_file.h>\n#include <libbfio_file_pool.h>\n#include <libbfio_file_range.h>\n#include <libbfio_handle.h>\n#include <libbfio_memory_range.h>\n#include <libbfio_pool.h>\n#include <libbfio_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT\n * before including libbfio.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBBFIO_DLL_IMPORT\n#endif\n\n#include <libbfio.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT )\n#error Multi-threading support requires libbfio with multi-threading support\n#endif\n\n#endif /* defined( HAVE_LOCAL_LIBBFIO ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBBFIO_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libcdata.h",
    "content": "/*\n * The libcdata header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCDATA_H )\n#define _FSNTFS_TEST_LIBCDATA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCDATA for local use of libcdata\n */\n#if defined( HAVE_LOCAL_LIBCDATA )\n\n#include <libcdata_array.h>\n#include <libcdata_btree.h>\n#include <libcdata_definitions.h>\n#include <libcdata_list.h>\n#include <libcdata_list_element.h>\n#include <libcdata_range_list.h>\n#include <libcdata_tree_node.h>\n#include <libcdata_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT\n * before including libcdata.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCDATA_DLL_IMPORT\n#endif\n\n#include <libcdata.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCDATA ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBCDATA_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libcerror.h",
    "content": "/*\n * The libcerror header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCERROR_H )\n#define _FSNTFS_TEST_LIBCERROR_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCERROR for local use of libcerror\n */\n#if defined( HAVE_LOCAL_LIBCERROR )\n\n#include <libcerror_definitions.h>\n#include <libcerror_error.h>\n#include <libcerror_system.h>\n#include <libcerror_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT\n * before including libcerror.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCERROR_DLL_IMPORT\n#endif\n\n#include <libcerror.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCERROR ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBCERROR_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libclocale.h",
    "content": "/*\n * The libclocale header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCLOCALE_H )\n#define _FSNTFS_TEST_LIBCLOCALE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale\n */\n#if defined( HAVE_LOCAL_LIBCLOCALE )\n\n#include <libclocale_codepage.h>\n#include <libclocale_definitions.h>\n#include <libclocale_locale.h>\n#include <libclocale_support.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT\n * before including libclocale.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCLOCALE_DLL_IMPORT\n#endif\n\n#include <libclocale.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBCLOCALE_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libcnotify.h",
    "content": "/*\n * The libcnotify header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCNOTIFY_H )\n#define _FSNTFS_TEST_LIBCNOTIFY_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify\n */\n#if defined( HAVE_LOCAL_LIBCNOTIFY )\n\n#include <libcnotify_definitions.h>\n#include <libcnotify_print.h>\n#include <libcnotify_stream.h>\n#include <libcnotify_verbose.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT\n * before including libcnotify.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCNOTIFY_DLL_IMPORT\n#endif\n\n#include <libcnotify.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBCNOTIFY_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libcpath.h",
    "content": "/*\n * The libcpath header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCPATH_H )\n#define _FSNTFS_TEST_LIBCPATH_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBCPATH for local use of libcpath\n */\n#if defined( HAVE_LOCAL_LIBCPATH )\n\n#include <libcpath_definitions.h>\n#include <libcpath_path.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT\n * before including libcpath.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCPATH_DLL_IMPORT\n#endif\n\n#include <libcpath.h>\n\n#endif /* defined( HAVE_LOCAL_LIBCPATH ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBCPATH_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libcthreads.h",
    "content": "/*\n * The internal libcthreads header\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBCTHREADS_H )\n#define _FSNTFS_TEST_LIBCTHREADS_H\n\n#include <common.h>\n\n#if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBFSNTFS )\n\n/* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads\n */\n#if defined( HAVE_LOCAL_LIBCTHREADS )\n\n#include <libcthreads_condition.h>\n#include <libcthreads_definitions.h>\n#include <libcthreads_lock.h>\n#include <libcthreads_mutex.h>\n#include <libcthreads_read_write_lock.h>\n#include <libcthreads_queue.h>\n#include <libcthreads_thread.h>\n#include <libcthreads_thread_attributes.h>\n#include <libcthreads_thread_pool.h>\n#include <libcthreads_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBCTHREADS_DLL_IMPORT\n * before including libcthreads.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBCTHREADS_DLL_IMPORT\n#endif\n\n#include <libcthreads.h>\n\n#endif\n\n#endif /* defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBFSNTFS ) */\n\n#endif\n\n"
  },
  {
    "path": "tests/fsntfs_test_libfcache.h",
    "content": "/*\n * The libfcache header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBFCACHE_H )\n#define _FSNTFS_TEST_LIBFCACHE_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache\n */\n#if defined( HAVE_LOCAL_LIBFCACHE )\n\n#include <libfcache_cache.h>\n#include <libfcache_date_time.h>\n#include <libfcache_definitions.h>\n#include <libfcache_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT\n * before including libfcache.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFCACHE_DLL_IMPORT\n#endif\n\n#include <libfcache.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFCACHE ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBFCACHE_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libfdata.h",
    "content": "/*\n * The libfdata header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBFDATA_H )\n#define _FSNTFS_TEST_LIBFDATA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBFDATA for local use of libfdata\n */\n#if defined( HAVE_LOCAL_LIBFDATA )\n\n#include <libfdata_area.h>\n#include <libfdata_definitions.h>\n#include <libfdata_list.h>\n#include <libfdata_list_element.h>\n#include <libfdata_range_list.h>\n#include <libfdata_stream.h>\n#include <libfdata_types.h>\n#include <libfdata_vector.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBFDATA_DLL_IMPORT\n * before including libfdata.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBFDATA_DLL_IMPORT\n#endif\n\n#include <libfdata.h>\n\n#endif /* defined( HAVE_LOCAL_LIBFDATA ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBFDATA_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libfsntfs.h",
    "content": "/*\n * The libfsntfs header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBFSNTFS_H )\n#define _FSNTFS_TEST_LIBFSNTFS_H\n\n#include <common.h>\n\n#include <libfsntfs.h>\n\n#endif /* !defined( _FSNTFS_TEST_LIBFSNTFS_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_libuna.h",
    "content": "/*\n * The libuna header wrapper\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_LIBUNA_H )\n#define _FSNTFS_TEST_LIBUNA_H\n\n#include <common.h>\n\n/* Define HAVE_LOCAL_LIBUNA for local use of libuna\n */\n#if defined( HAVE_LOCAL_LIBUNA )\n\n#include <libuna_base16_stream.h>\n#include <libuna_base32_stream.h>\n#include <libuna_base64_stream.h>\n#include <libuna_byte_stream.h>\n#include <libuna_unicode_character.h>\n#include <libuna_url_stream.h>\n#include <libuna_utf16_stream.h>\n#include <libuna_utf16_string.h>\n#include <libuna_utf32_stream.h>\n#include <libuna_utf32_string.h>\n#include <libuna_utf7_stream.h>\n#include <libuna_utf8_stream.h>\n#include <libuna_utf8_string.h>\n#include <libuna_types.h>\n\n#else\n\n/* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT\n * before including libuna.h\n */\n#if defined( _WIN32 ) && defined( DLL_IMPORT )\n#define LIBUNA_DLL_IMPORT\n#endif\n\n#include <libuna.h>\n\n#endif /* defined( HAVE_LOCAL_LIBUNA ) */\n\n#endif /* !defined( _FSNTFS_TEST_LIBUNA_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_logged_utility_stream_values.c",
    "content": "/*\n * Library logged_utility_stream_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_logged_utility_stream_values.h\"\n\n/* TODO replace by non TxF data logged utility stream\n */\nuint8_t fsntfs_test_logged_utility_stream_values_data1[ 104 ] = {\n\t0x00, 0x01, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x09, 0x18, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x54, 0x00, 0x58, 0x00, 0x46, 0x00,\n\t0x5f, 0x00, 0x44, 0x00, 0x41, 0x00, 0x54, 0x00, 0x41, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_logged_utility_stream_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_logged_utility_stream_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_logged_utility_stream_values_t *logged_utility_stream_values = NULL;\n\tint result                                                             = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                        = 1;\n\tint number_of_memset_fail_tests                                        = 1;\n\tint test_number                                                        = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_logged_utility_stream_values_free(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tlogged_utility_stream_values = (libfsntfs_logged_utility_stream_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tlogged_utility_stream_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_logged_utility_stream_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t\t          &logged_utility_stream_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( logged_utility_stream_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_logged_utility_stream_values_free(\n\t\t\t\t &logged_utility_stream_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"logged_utility_stream_values\",\n\t\t\t logged_utility_stream_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_logged_utility_stream_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t\t          &logged_utility_stream_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( logged_utility_stream_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_logged_utility_stream_values_free(\n\t\t\t\t &logged_utility_stream_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"logged_utility_stream_values\",\n\t\t\t logged_utility_stream_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( logged_utility_stream_values != NULL )\n\t{\n\t\tlibfsntfs_logged_utility_stream_values_free(\n\t\t &logged_utility_stream_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_logged_utility_stream_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_logged_utility_stream_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_logged_utility_stream_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_logged_utility_stream_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_logged_utility_stream_values_t *logged_utility_stream_values = NULL;\n\tint result                                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_read_data(\n\t          logged_utility_stream_values,\n\t          &( fsntfs_test_logged_utility_stream_values_data1[ 42 ] ),\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_logged_utility_stream_values_data1[ 42 ] ),\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_logged_utility_stream_values_read_data(\n\t          logged_utility_stream_values,\n\t          NULL,\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_logged_utility_stream_values_read_data(\n\t          logged_utility_stream_values,\n\t          &( fsntfs_test_logged_utility_stream_values_data1[ 42 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_logged_utility_stream_values_read_data(\n\t          logged_utility_stream_values,\n\t          &( fsntfs_test_logged_utility_stream_values_data1[ 42 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_free(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( logged_utility_stream_values != NULL )\n\t{\n\t\tlibfsntfs_logged_utility_stream_values_free(\n\t\t &logged_utility_stream_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_logged_utility_stream_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_logged_utility_stream_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                                               = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                       = NULL;\n\tlibfsntfs_logged_utility_stream_values_t *logged_utility_stream_values = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                               = NULL;\n\tint result                                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_logged_utility_stream_values_data1,\n\t          104,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_logged_utility_stream_values_initialize(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n\t          logged_utility_stream_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_logged_utility_stream_values_read_from_mft_attribute(\n\t          logged_utility_stream_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_logged_utility_stream_values_free(\n\t          &logged_utility_stream_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"logged_utility_stream_values\",\n\t logged_utility_stream_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( logged_utility_stream_values != NULL )\n\t{\n\t\tlibfsntfs_logged_utility_stream_values_free(\n\t\t &logged_utility_stream_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_logged_utility_stream_values_initialize\",\n\t fsntfs_test_logged_utility_stream_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_logged_utility_stream_values_free\",\n\t fsntfs_test_logged_utility_stream_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_logged_utility_stream_values_read_data\",\n\t fsntfs_test_logged_utility_stream_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_logged_utility_stream_values_read_from_mft_attribute\",\n\t fsntfs_test_logged_utility_stream_values_read_from_mft_attribute );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_macros.h",
    "content": "/*\n * Macros for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_MACROS_H )\n#define _FSNTFS_TEST_MACROS_H\n\n#include <common.h>\n#include <file_stream.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INT( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%d) != %d\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INT( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%d) == %d\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_GREATER_THAN_INT( name, value, expected_value ) \\\n\tif( value <= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%d) <= %d\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_LESS_THAN_INT( name, value, expected_value ) \\\n\tif( value >= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%d) >= %d\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INTPTR( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (0x%08x\" PRIjx \") != 0x%08x\" PRIjx \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INTPTR( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (0x%08x\" PRIjx \") == 0x%08x\" PRIjx \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_FLOAT( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%f) != %f\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_FLOAT( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%f) == %f\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_SIZE( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIzd \") != %\" PRIzd \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_SSIZE( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIzd \") != %\" PRIzd \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_SSIZE( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIzd \") == %\" PRIzd \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INT8( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi8 \") != %\" PRIi8 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INT8( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi8 \") == %\" PRIi8 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_UINT8( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi8 \") != %\" PRIu8 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_LESS_THAN_UINT8( name, value, expected_value ) \\\n\tif( value >= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi8 \") >= %\" PRIu8 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INT16( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi16 \") != %\" PRIi16 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INT16( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi16 \") == %\" PRIi16 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_UINT16( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi16 \") != %\" PRIu16 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_LESS_THAN_UINT16( name, value, expected_value ) \\\n\tif( value >= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi16 \") >= %\" PRIu16 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INT32( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi32 \") != %\" PRIi32 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INT32( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi32 \") == %\" PRIi32 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_UINT32( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIu32 \") != %\" PRIu32 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_LESS_THAN_UINT32( name, value, expected_value ) \\\n\tif( value >= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIu32 \") >= %\" PRIu32 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_INT64( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi64 \") != %\" PRIi64 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_NOT_EQUAL_INT64( name, value, expected_value ) \\\n\tif( value == expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIi64 \") == %\" PRIi64 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_EQUAL_UINT64( name, value, expected_value ) \\\n\tif( value != expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIu64 \") != %\" PRIu64 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_LESS_THAN_UINT64( name, value, expected_value ) \\\n\tif( value >= expected_value ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s (%\" PRIu64 \") >= %\" PRIu64 \"\\n\", __FILE__, __LINE__, name, value, expected_value ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_IS_NOT_NULL( name, value ) \\\n\tif( value == NULL ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s == NULL\\n\", __FILE__, __LINE__, name ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_ASSERT_IS_NULL( name, value ) \\\n\tif( value != NULL ) \\\n\t{ \\\n\t\tfprintf( stdout, \"%s:%d %s != NULL\\n\", __FILE__, __LINE__, name ); \\\n\t\tgoto on_error; \\\n\t}\n\n#define FSNTFS_TEST_RUN( name, function ) \\\n\tif( function() != 1 ) \\\n\t{ \\\n\t\tfprintf( stdout, \"Unable to run test: %s\\n\", name ); \\\n\t\tgoto on_error; \\\n\t}\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n#define FSNTFS_TEST_RUN_WITH_ARGS( name, function, ... ) \\\n\tif( function( __VA_ARGS__ ) != 1 ) \\\n\t{ \\\n\t\tfprintf( stdout, \"Unable to run test: %s\\n\", name ); \\\n\t\tgoto on_error; \\\n\t}\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#define FSNTFS_TEST_FPRINT_ERROR( error ) \\\n\tlibcerror_error_backtrace_fprint( error, stdout );\n\n#endif /* !defined( _FSNTFS_TEST_MACROS_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_memory.c",
    "content": "/*\n * Memory allocation functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ )\n#define __USE_GNU\n#include <dlfcn.h>\n#undef __USE_GNU\n#endif\n\n#include \"fsntfs_test_memory.h\"\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\nstatic void *(*fsntfs_test_real_malloc)(size_t)                       = NULL;\nstatic void *(*fsntfs_test_real_memcpy)(void *, const void *, size_t) = NULL;\nstatic void *(*fsntfs_test_real_memset)(void *, int, size_t)          = NULL;\nstatic void *(*fsntfs_test_real_realloc)(void *, size_t)              = NULL;\n\nint fsntfs_test_malloc_attempts_before_fail                           = -1;\nint fsntfs_test_memcpy_attempts_before_fail                           = -1;\nint fsntfs_test_memset_attempts_before_fail                           = -1;\nint fsntfs_test_realloc_attempts_before_fail                          = -1;\n\n/* Custom malloc for testing memory error cases\n * Note this function might fail if compiled with optimation\n * Returns a pointer to newly allocated data or NULL\n */\nvoid *malloc(\n       size_t size )\n{\n\tvoid *ptr = NULL;\n\n\tif( fsntfs_test_real_malloc == NULL )\n\t{\n\t\tfsntfs_test_real_malloc = dlsym(\n\t\t                           RTLD_NEXT,\n\t\t                           \"malloc\" );\n\t}\n\tif( fsntfs_test_malloc_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\treturn( NULL );\n\t}\n\telse if( fsntfs_test_malloc_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail--;\n\t}\n\tptr = fsntfs_test_real_malloc(\n\t       size );\n\n\treturn( ptr );\n}\n\n/* Custom memcpy for testing memory error cases\n * Note this function might fail if compiled with optimation and as a shared libary\n * Returns a pointer to newly allocated data or NULL\n */\nvoid *memcpy(\n       void *destination,\n       const void *source,\n       size_t size )\n{\n\tif( fsntfs_test_real_memcpy == NULL )\n\t{\n\t\tfsntfs_test_real_memcpy = dlsym(\n\t\t                           RTLD_NEXT,\n\t\t                           \"memcpy\" );\n\t}\n\tif( fsntfs_test_memcpy_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\n\t\treturn( NULL );\n\t}\n\telse if( fsntfs_test_memcpy_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail--;\n\t}\n\tdestination = fsntfs_test_real_memcpy(\n\t               destination,\n\t               source,\n\t               size );\n\n\treturn( destination );\n}\n\n/* Custom memset for testing memory error cases\n * Note this function might fail if compiled with optimation and as a shared libary\n * Returns a pointer to newly allocated data or NULL\n */\nvoid *memset(\n       void *ptr,\n       int constant,\n       size_t size )\n{\n\tif( fsntfs_test_real_memset == NULL )\n\t{\n\t\tfsntfs_test_real_memset = dlsym(\n\t\t                           RTLD_NEXT,\n\t\t                           \"memset\" );\n\t}\n\tif( fsntfs_test_memset_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\treturn( NULL );\n\t}\n\telse if( fsntfs_test_memset_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_memset_attempts_before_fail--;\n\t}\n\tptr = fsntfs_test_real_memset(\n\t       ptr,\n\t       constant,\n\t       size );\n\n\treturn( ptr );\n}\n\n/* Custom realloc for testing memory error cases\n * Note this function might fail if compiled with optimation\n * Returns a pointer to reallocated data or NULL\n */\nvoid *realloc(\n       void *ptr,\n       size_t size )\n{\n\tif( fsntfs_test_real_realloc == NULL )\n\t{\n\t\tfsntfs_test_real_realloc = dlsym(\n\t\t                            RTLD_NEXT,\n\t\t                            \"realloc\" );\n\t}\n\tif( fsntfs_test_realloc_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_realloc_attempts_before_fail = -1;\n\n\t\treturn( NULL );\n\t}\n\telse if( fsntfs_test_realloc_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_realloc_attempts_before_fail--;\n\t}\n\tptr = fsntfs_test_real_realloc(\n\t       ptr,\n\t       size );\n\n\treturn( ptr );\n}\n\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_memory.h",
    "content": "/*\n * Memory allocation functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_MEMORY_H )\n#define _FSNTFS_TEST_MEMORY_H\n\n#include <common.h>\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __loongarch__ ) && !defined( __mips__ ) && !defined( __riscv ) && !defined( __sparc__ ) && !defined( HAVE_ASAN )\n#define HAVE_FSNTFS_TEST_MEMORY\t\t1\n#endif\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\nextern int fsntfs_test_malloc_attempts_before_fail;\n\nextern int fsntfs_test_memcpy_attempts_before_fail;\n\nextern int fsntfs_test_memset_attempts_before_fail;\n\nextern int fsntfs_test_realloc_attempts_before_fail;\n\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_TEST_MEMORY_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft.c",
    "content": "/*\n * Library mft type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_initialize(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tlibfsntfs_mft_t *mft             = NULL;\n\tint result                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests  = 3;\n\tint number_of_memset_fail_tests  = 1;\n\tint test_number                  = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_initialize(\n\t          &mft,\n\t          io_handle,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft\",\n\t mft );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_free(\n\t          &mft,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft\",\n\t mft );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_initialize(\n\t          NULL,\n\t          io_handle,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft = (libfsntfs_mft_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_initialize(\n\t          &mft,\n\t          io_handle,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tmft = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_initialize(\n\t          &mft,\n\t          NULL,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_initialize(\n\t\t          &mft,\n\t\t          io_handle,\n\t\t          1024,\n\t\t          0,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_free(\n\t\t\t\t &mft,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft\",\n\t\t\t mft );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_initialize(\n\t\t          &mft,\n\t\t          io_handle,\n\t\t          1024,\n\t\t          0,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_free(\n\t\t\t\t &mft,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft\",\n\t\t\t mft );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft != NULL )\n\t{\n\t\tlibfsntfs_mft_free(\n\t\t &mft,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_mft_read_mft_entry */\n\n/* Tests the libfsntfs_mft_get_number_of_entries function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_get_number_of_entries(\n     libfsntfs_mft_t *mft )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint64_t number_of_entries = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_get_number_of_entries(\n\t          mft,\n\t          &number_of_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"number_of_entries\",\n\t number_of_entries,\n\t (uint64_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_get_number_of_entries(\n\t          NULL,\n\t          &number_of_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_get_number_of_entries(\n\t          mft,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tlibfsntfs_mft_t *mft             = NULL;\n\tint result                       = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_initialize\",\n\t fsntfs_test_mft_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_free\",\n\t fsntfs_test_mft_free );\n\n\t/* TODO: add tests for libfsntfs_mft_read_mft_entry */\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize MFT for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_initialize(\n\t          &mft,\n\t          io_handle,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft\",\n\t mft );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_get_number_of_entries\",\n\t fsntfs_test_mft_get_number_of_entries,\n\t mft );\n\n\t/* TODO: add tests for libfsntfs_mft_get_mft_entry_by_index */\n\n\t/* TODO: add tests for libfsntfs_mft_get_mft_entry_by_index_no_cache */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_free(\n\t          &mft,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft\",\n\t mft );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft != NULL )\n\t{\n\t\tlibfsntfs_mft_free(\n\t         &mft,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_attribute.c",
    "content": "/*\n * Library mft_attribute type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcdata.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_data_run.h\"\n#include \"../libfsntfs/libfsntfs_extent.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\nuint8_t fsntfs_test_mft_attribute_data1[ 88 ] = {\n\t0x90, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x11, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x48, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_mft_attribute_data2[ 72 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0a, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0xa8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0a, 0x00, 0x00, 0x00, 0x00,\n\t0x33, 0x80, 0xaa, 0x00, 0x00, 0x00, 0x0c, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_attribute_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_attribute = (libfsntfs_mft_attribute_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tmft_attribute = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_attribute_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_attribute_initialize(\n\t\t          &mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft_attribute != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_attribute_free(\n\t\t\t\t &mft_attribute,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_attribute\",\n\t\t\t mft_attribute );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_attribute_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_attribute_initialize(\n\t\t          &mft_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft_attribute != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_attribute_free(\n\t\t\t\t &mft_attribute,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_attribute\",\n\t\t\t mft_attribute );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_read_data(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          NULL,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_attribute->name = (uint8_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tmft_attribute->name = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          NULL,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where resident data is missing\n\t */\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where non-resident data is missing\n\t */\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 34 ] ),\n\t 0x0001 );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          48,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 34 ] ),\n\t 0x0000 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_mft_attribute_read_data with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_mft_attribute_read_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Test error case where size value is invalid\n\t */\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 4 ] ),\n\t 0xffffffffUL );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 4 ] ),\n\t 0x00000058UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where compression flags (in data flags) value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 12 ] ),\n\t 0x00ff );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 12 ] ),\n\t 0x0000 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where non-resident valid data size value is invalid\n\t */\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 56 ] ),\n\t 0xffffffffffffffffULL );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          72,\n\t          &error );\n\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 56 ] ),\n\t 0x000000000000a0a8ULL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where name offset value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 10 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 10 ] ),\n\t 0x0018 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where name size value is invalid\n\t */\n\tfsntfs_test_mft_attribute_data1[ 9 ] = 0xff;\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tfsntfs_test_mft_attribute_data1[ 9 ] = 0x04;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where resident data offset value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 20 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data1[ 20 ] ),\n\t 0x0020 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where non-resident data runs offset value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 32 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          72,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_data2[ 32 ] ),\n\t 0x0040 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_data_is_resident function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_data_is_resident(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_data_is_resident(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_type(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_type(\n\t          mft_attribute,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"type\",\n\t type,\n\t (uint32_t) 0x00000090UL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_type(\n\t          NULL,\n\t          &type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_type(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_data_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_data_flags(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint16_t data_flags      = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_flags(\n\t          mft_attribute,\n\t          &data_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"data_flags\",\n\t data_flags,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_flags(\n\t          NULL,\n\t          &data_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_data_flags(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_utf8_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf8_name_size(\n\t          mft_attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name_size(\n\t          mft_attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name_size(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name_size(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_utf8_name(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          mft_attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          mft_attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          mft_attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          mft_attribute,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf8_name(\n\t          mft_attribute,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_utf16_name_size(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf16_name_size(\n\t          mft_attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name_size(\n\t          mft_attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name_size(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name_size(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_utf16_name(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          mft_attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute->name;\n\n\tmft_attribute->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          mft_attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tmft_attribute->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          mft_attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          mft_attribute,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_utf16_name(\n\t          mft_attribute,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_compare_name_with_utf8_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint8_t utf8_name1[ 5 ]  = { '$', 'S', 'D', 'H', 0 };\n\tuint8_t utf8_name2[ 6 ]  = { 'b', 'o', 'g', 'u', 's', 0 };\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t          mft_attribute,\n\t          utf8_name1,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t          mft_attribute,\n\t          utf8_name2,\n\t          6,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t          NULL,\n\t          utf8_name1,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t          mft_attribute,\n\t          NULL,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf8_string(\n\t          mft_attribute,\n\t          utf8_name1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_compare_name_with_utf16_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tuint16_t utf16_name1[ 5 ] = { '$', 'S', 'D', 'H', 0 };\n\tuint16_t utf16_name2[ 6 ] = { 'b', 'o', 'g', 'u', 's', 0 };\n\tlibcerror_error_t *error  = NULL;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t          mft_attribute,\n\t          utf16_name1,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t          mft_attribute,\n\t          utf16_name2,\n\t          6,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t          NULL,\n\t          utf16_name1,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t          mft_attribute,\n\t          NULL,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_compare_name_with_utf16_string(\n\t          mft_attribute,\n\t          utf16_name1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_compression_unit_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_compression_unit_size(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error     = NULL;\n\tsize_t compression_unit_size = 0;\n\tint result                   = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_compression_unit_size(\n\t          mft_attribute,\n\t          &compression_unit_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"compression_unit_size\",\n\t compression_unit_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_compression_unit_size(\n\t          NULL,\n\t          &compression_unit_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_compression_unit_size(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_resident_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_resident_data(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *data            = NULL;\n\tsize_t data_size         = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_resident_data(\n\t          mft_attribute,\n\t          &data,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data\",\n\t data );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"data_size\",\n\t data_size,\n\t (size_t) 56 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_resident_data(\n\t          NULL,\n\t          &data,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_resident_data(\n\t          mft_attribute,\n\t          NULL,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_resident_data(\n\t          mft_attribute,\n\t          &data,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_number_of_data_runs function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_number_of_data_runs(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_data_runs  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_number_of_data_runs(\n\t          mft_attribute,\n\t          &number_of_data_runs,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_data_runs\",\n\t number_of_data_runs,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_number_of_data_runs(\n\t          NULL,\n\t          &number_of_data_runs,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_number_of_data_runs(\n\t          mft_attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_data_run_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_data_run_by_index(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcerror_error_t *error       = NULL;\n\tlibfsntfs_data_run_t *data_run = NULL;\n\tint result                     = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_run_by_index(\n\t          mft_attribute,\n\t          0,\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_run\",\n\t data_run );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_run_by_index(\n\t          NULL,\n\t          0,\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_data_run_by_index(\n\t          mft_attribute,\n\t          -1,\n\t          &data_run,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_data_run_by_index(\n\t          mft_attribute,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_get_data_extents_array function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_get_data_extents_array(\n     libfsntfs_mft_attribute_t *mft_attribute )\n{\n\tlibcdata_array_t *data_extents_array = NULL;\n\tlibcerror_error_t *error             = NULL;\n\tlibfsntfs_io_handle_t *io_handle     = NULL;\n\tint number_of_data_extents           = 0;\n\tint result                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_extents_array(\n\t          mft_attribute,\n\t          io_handle,\n\t          &data_extents_array,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_extents_array\",\n\t data_extents_array );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libcdata_array_get_number_of_entries(\n\t          data_extents_array,\n\t          &number_of_data_extents,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_data_extents\",\n\t number_of_data_extents,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libcdata_array_free(\n\t          &data_extents_array,\n\t          (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_extents_array\",\n\t data_extents_array );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_get_data_extents_array(\n\t          NULL,\n\t          io_handle,\n\t          &data_extents_array,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_data_extents_array(\n\t          mft_attribute,\n\t          NULL,\n\t          &data_extents_array,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_get_data_extents_array(\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( data_extents_array != NULL )\n\t{\n\t\tlibcdata_array_free(\n\t\t &data_extents_array,\n\t\t (int (*)(intptr_t **, libcerror_error_t **)) &libfsntfs_extent_free,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                  = NULL;\n\tlibfsntfs_io_handle_t *io_handle          = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute1 = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute2 = NULL;\n\tint result                                = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_initialize\",\n\t fsntfs_test_mft_attribute_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_free\",\n\t fsntfs_test_mft_attribute_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_read_data\",\n\t fsntfs_test_mft_attribute_read_data );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute1\",\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute1,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute2,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute2\",\n\t mft_attribute2 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute2,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_data2,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_data_is_resident\",\n\t fsntfs_test_mft_attribute_data_is_resident,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_type\",\n\t fsntfs_test_mft_attribute_get_type,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_data_flags\",\n\t fsntfs_test_mft_attribute_get_data_flags,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_utf8_name_size\",\n\t fsntfs_test_mft_attribute_get_utf8_name_size,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_utf8_name\",\n\t fsntfs_test_mft_attribute_get_utf8_name,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_utf16_name_size\",\n\t fsntfs_test_mft_attribute_get_utf16_name_size,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_utf16_name\",\n\t fsntfs_test_mft_attribute_get_utf16_name,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_compare_name_with_utf8_string\",\n\t fsntfs_test_mft_attribute_compare_name_with_utf8_string,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_compare_name_with_utf16_string\",\n\t fsntfs_test_mft_attribute_compare_name_with_utf16_string,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_compression_unit_size\",\n\t fsntfs_test_mft_attribute_get_compression_unit_size,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_resident_data\",\n\t fsntfs_test_mft_attribute_get_resident_data,\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_number_of_data_runs\",\n\t fsntfs_test_mft_attribute_get_number_of_data_runs,\n\t mft_attribute2 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_data_run_by_index\",\n\t fsntfs_test_mft_attribute_get_data_run_by_index,\n\t mft_attribute2 );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_get_data_extents_array\",\n\t fsntfs_test_mft_attribute_get_data_extents_array,\n\t mft_attribute2 );\n\n\t/* TODO add tests for libfsntfs_mft_attribute_get_next_attribute */\n\n\t/* TODO add tests for libfsntfs_mft_attribute_append_to_chain */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute2,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute2\",\n\t mft_attribute2 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute1\",\n\t mft_attribute1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute2 != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute2,\n\t\t NULL );\n\t}\n\tif( mft_attribute1 != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute1,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_attribute_list.c",
    "content": "/*\n * Library attribute_list type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcdata.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute_list.h\"\n\nuint8_t fsntfs_test_mft_attribute_list_data1[ 368 ] = {\n\t0x20, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,\n\t0x58, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x00, 0x00, 0x44, 0x43, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x11, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x10, 0x00, 0x24, 0x00, 0x53, 0x00, 0x49, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xa0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x04, 0x00, 0x24, 0x00, 0x53, 0x00, 0x49, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x06, 0x00, 0x24, 0x00, 0x53, 0x00, 0x49, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_attribute_list_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_read_data(\n     void )\n{\n\tlibcerror_error_t *error                   = NULL;\n\tlibfsntfs_mft_attribute_list_t *attribute_list = NULL;\n\tint result                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_list_initialize(\n\t          &attribute_list,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute_list\",\n\t attribute_list );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_read_data(\n\t          attribute_list,\n\t          &( fsntfs_test_mft_attribute_list_data1[ 24 ] ),\n\t          344,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_read_data(\n\t          NULL,\n\t          &( fsntfs_test_mft_attribute_list_data1[ 24 ] ),\n\t          344,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_read_data(\n\t          attribute_list,\n\t          NULL,\n\t          344,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_read_data(\n\t          attribute_list,\n\t          &( fsntfs_test_mft_attribute_list_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_mft_attribute_list_read_data with malloc failing in libfsntfs_mft_attribute_list_entry_initialize\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_attribute_list_read_data(\n\t          attribute_list,\n\t          &( fsntfs_test_mft_attribute_list_data1[ 24 ] ),\n\t          344,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_free(\n\t          &attribute_list,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute_list\",\n\t attribute_list );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &attribute_list,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_read_from_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_read_from_attribute(\n     void )\n{\n\tlibcerror_error_t *error                   = NULL;\n\tlibfsntfs_mft_attribute_list_t *attribute_list = NULL;\n\tlibfsntfs_io_handle_t *io_handle           = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute   = NULL;\n\tint result                                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_mft_attribute_list_data1,\n\t          368,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_initialize(\n\t          &attribute_list,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute_list\",\n\t attribute_list );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_read_from_attribute(\n\t          attribute_list,\n\t          io_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_read_from_attribute(\n\t          NULL,\n\t          io_handle,\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_read_from_attribute(\n\t          attribute_list,\n\t          io_handle,\n\t          NULL,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_free(\n\t          &attribute_list,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute_list\",\n\t attribute_list );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute_list != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_free(\n\t\t &attribute_list,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* TODO add tests for libfsntfs_mft_attribute_list_initialize */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_free */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_file_reference_free */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_list_read_data\",\n\t fsntfs_test_mft_attribute_list_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_list_read_from_attribute\",\n\t fsntfs_test_mft_attribute_list_read_from_attribute );\n\n/* TODO add tests for libfsntfs_mft_attribute_list_get_number_of_entries */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_get_entry_by_index */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_compare_by_base_record_file_reference */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_get_number_of_file_references */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_get_file_reference_by_index */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_compare_file_reference */\n\n/* TODO add tests for libfsntfs_mft_attribute_list_insert_file_reference */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_attribute_list_entry.c",
    "content": "/*\n * Library mft_attribute_list_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcdata.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_mft_attribute_list_entry.h\"\n\nuint8_t fsntfs_test_mft_attribute_list_entry_data1[ 40 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x28, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x53, 0x00, 0x44, 0x00,\n\t0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_attribute_list_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                = 1;\n\tint number_of_memset_fail_tests                                = 1;\n\tint test_number                                                = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_attribute_list_entry = (libfsntfs_mft_attribute_list_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tmft_attribute_list_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_attribute_list_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t\t          &mft_attribute_list_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft_attribute_list_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t\t\t &mft_attribute_list_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_attribute_list_entry\",\n\t\t\t mft_attribute_list_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_attribute_list_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t\t          &mft_attribute_list_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft_attribute_list_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t\t\t &mft_attribute_list_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_attribute_list_entry\",\n\t\t\t mft_attribute_list_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          NULL,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_attribute_list_entry->name = (uint8_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_mft_attribute_list_entry_read_data with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_mft_attribute_list_entry_read_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Test error case where size value is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_list_entry_data1[ 4 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_mft_attribute_list_entry_data1[ 4 ] ),\n\t 0x0028 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where name offset value is invalid\n\t */\n\tfsntfs_test_mft_attribute_list_entry_data1[ 7 ] = 0xff;\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tfsntfs_test_mft_attribute_list_entry_data1[ 7 ] = 0x1a;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where name size value is invalid\n\t */\n\tfsntfs_test_mft_attribute_list_entry_data1[ 6 ] = 0xff;\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tfsntfs_test_mft_attribute_list_entry_data1[ 6 ] = 0x04;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_attribute_type function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_attribute_type(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t attribute_type  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_attribute_type(\n\t          mft_attribute_list_entry,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"attribute_type\",\n\t attribute_type,\n\t (uint32_t) 0x00000080UL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_attribute_type(\n\t          NULL,\n\t          &attribute_type,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_attribute_type(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_file_reference(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_file_reference(\n\t          mft_attribute_list_entry,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_file_reference(\n\t          NULL,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_file_reference(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_utf8_name_size(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t          mft_attribute_list_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t          mft_attribute_list_entry,\n\t          &utf8_name_size,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name_size(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_utf8_name(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          mft_attribute_list_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          mft_attribute_list_entry,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          mft_attribute_list_entry,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf8_name(\n\t          mft_attribute_list_entry,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_utf16_name_size(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t          mft_attribute_list_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 5 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t          mft_attribute_list_entry,\n\t          &utf16_name_size,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name_size(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_get_utf16_name(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tuint8_t *name            = NULL;\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          mft_attribute_list_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          mft_attribute_list_entry,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          mft_attribute_list_entry,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_get_utf16_name(\n\t          mft_attribute_list_entry,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_compare_name_with_utf8_string(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint8_t utf8_name1[ 5 ]  = { '$', 'S', 'D', 'S', 0 };\n\tuint8_t utf8_name2[ 6 ]  = { 'b', 'o', 'g', 'u', 's', 0 };\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *name            = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          mft_attribute_list_entry,\n\t          utf8_name1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          mft_attribute_list_entry,\n\t          utf8_name2,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          mft_attribute_list_entry,\n\t          utf8_name1,\n\t          4,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          NULL,\n\t          utf8_name1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string(\n\t          mft_attribute_list_entry,\n\t          utf8_name1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_attribute_list_entry_compare_name_with_utf16_string(\n     libfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry )\n{\n\tuint16_t utf16_name1[ 5 ] = { '$', 'S', 'D', 'S', 0 };\n\tuint16_t utf16_name2[ 6 ] = { 'b', 'o', 'g', 'u', 's', 0 };\n\tlibcerror_error_t *error  = NULL;\n\tuint8_t *name             = NULL;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          mft_attribute_list_entry,\n\t          utf16_name1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          mft_attribute_list_entry,\n\t          utf16_name2,\n\t          5,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tname = mft_attribute_list_entry->name;\n\n\tmft_attribute_list_entry->name = NULL;\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          mft_attribute_list_entry,\n\t          utf16_name1,\n\t          4,\n\t          &error );\n\n\tmft_attribute_list_entry->name = name;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          NULL,\n\t          utf16_name1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          mft_attribute_list_entry,\n\t          NULL,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string(\n\t          mft_attribute_list_entry,\n\t          utf16_name1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_mft_attribute_list_entry_t *mft_attribute_list_entry = NULL;\n\tint result                                                     = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_list_entry_initialize\",\n\t fsntfs_test_mft_attribute_list_entry_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_list_entry_free\",\n\t fsntfs_test_mft_attribute_list_entry_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_attribute_list_entry_read_data\",\n\t fsntfs_test_mft_attribute_list_entry_read_data );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_initialize(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_list_entry_read_data(\n\t          mft_attribute_list_entry,\n\t          fsntfs_test_mft_attribute_list_entry_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_attribute_type\",\n\t fsntfs_test_mft_attribute_list_entry_get_attribute_type,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_file_reference\",\n\t fsntfs_test_mft_attribute_list_entry_get_file_reference,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_utf8_name_size\",\n\t fsntfs_test_mft_attribute_list_entry_get_utf8_name_size,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_utf8_name\",\n\t fsntfs_test_mft_attribute_list_entry_get_utf8_name,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_utf16_name_size\",\n\t fsntfs_test_mft_attribute_list_entry_get_utf16_name_size,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_get_utf16_name\",\n\t fsntfs_test_mft_attribute_list_entry_get_utf16_name,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_compare_name_with_utf8_string\",\n\t fsntfs_test_mft_attribute_list_entry_compare_name_with_utf8_string,\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_attribute_list_entry_compare_name_with_utf16_string\",\n\t fsntfs_test_mft_attribute_list_entry_compare_name_with_utf16_string,\n\t mft_attribute_list_entry );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_list_entry_free(\n\t          &mft_attribute_list_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute_list_entry\",\n\t mft_attribute_list_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_attribute_list_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_list_entry_free(\n\t\t &mft_attribute_list_entry,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_entry.c",
    "content": "/*\n * Library mft_entry type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_definitions.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_mft_entry.h\"\n#include \"../libfsntfs/libfsntfs_mft_entry_header.h\"\n\n/* Define to make fsntfs_test_file generate verbose output\n#define FSNTFS_TEST_MFT_ENTRY_VERBOSE\n */\n\nuint8_t fsntfs_test_mft_entry_data1[ 1024 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x52, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01,\n\t0x96, 0xd5, 0x86, 0xa0, 0x08, 0x60, 0xd5, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0xfa, 0x00, 0x21, 0x3c, 0x85, 0x01,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x01, 0xf9, 0x00, 0x21, 0x01, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 };\n\nuint8_t fsntfs_test_mft_entry_data2[ 1024 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x2a, 0x00, 0x03, 0x00, 0x96, 0x53, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x30, 0x00, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01,\n\t0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01, 0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01,\n\t0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01,\n\t0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01, 0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01,\n\t0xf6, 0x6e, 0xb6, 0x6b, 0xe8, 0xb3, 0xcb, 0x01, 0x00, 0xcc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xcc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x03, 0x24, 0x00, 0x4d, 0x00, 0x46, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x68, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x80, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x07, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xe0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x31, 0x20, 0x21, 0x19, 0x03, 0x12, 0xc6, 0x07, 0x21, 0x21, 0x7a, 0x8a, 0x09, 0x12, 0x40, 0x01,\n\t0x7e, 0x22, 0x60, 0x02, 0x77, 0x06, 0x00, 0xc1, 0xb0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x41, 0x19, 0x03, 0x00, 0x0d, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_entry_check_for_empty_block function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_check_for_empty_block(\n     void )\n{\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibcerror_error_t *error = NULL;\n\tvoid *memset_result      = NULL;\n\tint result               = 0;\n\n\t/* Initialize test\n\t */\n\tmemset_result = memory_set(\n\t                 mft_entry_data,\n\t                 0,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tmft_entry_data[ 1023 ] = 0xff;\n\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          &( mft_entry_data[ 1 ] ),\n\t          1024 - 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          fsntfs_test_mft_entry_data1,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          NULL,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_check_for_empty_block(\n\t          mft_entry_data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_initialize(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tint result                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests  = 5;\n\tint number_of_memset_fail_tests  = 1;\n\tint test_number                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry = (libfsntfs_mft_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tmft_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_entry_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_entry_initialize(\n\t\t          &mft_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_entry_free(\n\t\t\t\t &mft_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_entry\",\n\t\t\t mft_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_entry_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_entry_initialize(\n\t\t          &mft_entry,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft_entry != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_entry_free(\n\t\t\t\t &mft_entry,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_entry\",\n\t\t\t mft_entry );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_read_data(\n     void )\n{\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tvoid *memcpy_result              = NULL;\n\tvoid *memset_result              = NULL;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tmemset_result = memory_set(\n\t                 mft_entry_data,\n\t                 0,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular case where MFT entry is empty\n\t */\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular case where signature is \"BAAD\"\n\t */\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( mft_entry_data[ 0 ] ),\n\t 0x44414142UL );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( mft_entry_data[ 0 ] ),\n\t 0x454c4946UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data2,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test where signature is invalid\n\t */\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( mft_entry_data[ 0 ] ),\n\t 0xffffffffUL );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( mft_entry_data[ 0 ] ),\n\t 0x454c4946UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_read_data(\n\t          NULL,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry->header = (libfsntfs_mft_entry_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tmft_entry->header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          NULL,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          0,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_mft_entry_read_data with malloc failing in libfsntfs_mft_entry_header_initialize\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_read_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_read_file_io_handle(\n     void )\n{\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tvoid *memcpy_result              = NULL;\n\tvoid *memset_result              = NULL;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tmemset_result = memory_set(\n\t                 mft_entry_data,\n\t                 0,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          NULL,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          -1,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test MFT entry size too small\n\t */\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          8,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_mft_entry_read_file_io_handle with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data too small\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_mft_entry_data1,\n\t          8,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_read_file_io_handle(\n\t          mft_entry,\n\t          file_io_handle,\n\t          0,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_read_attributes_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_read_attributes_data(\n     void )\n{\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tvoid *memcpy_result              = NULL;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          mft_entry,\n\t          io_handle,\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          NULL,\n\t          io_handle,\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          mft_entry,\n\t          io_handle,\n\t          NULL,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          mft_entry,\n\t          io_handle,\n\t          mft_entry_data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          mft_entry,\n\t          io_handle,\n\t          mft_entry_data,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_mft_entry_read_attributes */\n\n/* TODO: add tests for libfsntfs_mft_entry_read_attributes_from_attribute_list */\n\n/* Tests the libfsntfs_mft_entry_is_empty function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_is_empty(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_is_empty(\n\t          mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_is_empty(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_is_allocated function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_is_allocated(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_is_allocated(\n\t          mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_is_allocated(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_file_reference(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t file_reference  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_file_reference(\n\t          mft_entry,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_file_reference(\n\t          NULL,\n\t          &file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_file_reference(\n\t          mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_base_record_file_reference function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_base_record_file_reference(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error            = NULL;\n\tuint64_t base_record_file_reference = 0;\n\tint result                          = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t          mft_entry,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t          NULL,\n\t          &base_record_file_reference,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_base_record_file_reference(\n\t          mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_journal_sequence_number function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_journal_sequence_number(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t journal_sequence_number = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_journal_sequence_number(\n\t          mft_entry,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_journal_sequence_number(\n\t          NULL,\n\t          &journal_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_journal_sequence_number(\n\t          mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_number_of_attributes function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_number_of_attributes(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_number_of_attributes(\n\t          mft_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_attributes\",\n\t number_of_attributes,\n\t 4 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_number_of_attributes(\n\t          NULL,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_number_of_attributes(\n\t          mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_attribute_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_attribute_by_index(\n\t          mft_entry,\n\t          0,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_attribute_by_index(\n\t          NULL,\n\t          0,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_attribute_by_index(\n\t          mft_entry,\n\t          -1,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_attribute_by_index(\n\t          mft_entry,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_number_of_alternate_data_attributes function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_number_of_alternate_data_attributes(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error = NULL;\n\tint number_of_attributes = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n\t          mft_entry,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"number_of_attributes\",\n\t number_of_attributes,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n\t          NULL,\n\t          &number_of_attributes,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_number_of_alternate_data_attributes(\n\t          mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_get_alternate_data_attribute_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_get_alternate_data_attribute_by_index(\n     libfsntfs_mft_entry_t *mft_entry )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n\n\t/* Test regular cases\n\t */\n/* TODO change test data and enable test\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n\t          mft_entry,\n\t          0,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n*/\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n\t          NULL,\n\t          0,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n\t          mft_entry,\n\t          -1,\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_get_alternate_data_attribute_by_index(\n\t          mft_entry,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n/* TODO: add tests for libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name */\n\n/* TODO: add tests for libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name */\n\n/* TODO: add tests for libfsntfs_mft_entry_set_attribute_helper_values */\n\n/* TODO: add tests for libfsntfs_mft_entry_set_data_attribute_helper_values */\n\n/* TODO: add tests for libfsntfs_mft_entry_get_data_attribute_by_utf8_name */\n\n/* TODO: add tests for libfsntfs_mft_entry_has_directory_entries_index */\n\n/* TODO: add tests for libfsntfs_mft_entry_read_element_data */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tuint8_t mft_entry_data[ 1024 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_io_handle_t *io_handle = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry = NULL;\n\tvoid *memcpy_result              = NULL;\n\tint result                       = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_MFT_ENTRY_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_check_for_empty_block\",\n\t fsntfs_test_mft_entry_check_for_empty_block );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_initialize\",\n\t fsntfs_test_mft_entry_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_free\",\n\t fsntfs_test_mft_entry_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_read_data\",\n\t fsntfs_test_mft_entry_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_read_file_io_handle\",\n\t fsntfs_test_mft_entry_read_file_io_handle );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_read_attributes_data\",\n\t fsntfs_test_mft_entry_read_attributes_data );\n\n\t/* TODO: add tests for libfsntfs_mft_entry_read_attributes */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_read_attributes_from_attribute_list */\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tmemcpy_result = memory_copy(\n\t                 mft_entry_data,\n\t                 fsntfs_test_mft_entry_data1,\n\t                 sizeof( uint8_t ) * 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memcpy_result\",\n\t memcpy_result );\n\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_entry_initialize(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_read_data(\n\t          mft_entry,\n\t          mft_entry_data,\n\t          1024,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_read_attributes_data(\n\t          mft_entry,\n\t          io_handle,\n\t          mft_entry_data,\n\t          1024,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_is_empty\",\n\t fsntfs_test_mft_entry_is_empty,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_is_allocated\",\n\t fsntfs_test_mft_entry_is_allocated,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_file_reference\",\n\t fsntfs_test_mft_entry_get_file_reference,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_base_record_file_reference\",\n\t fsntfs_test_mft_entry_get_base_record_file_reference,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_journal_sequence_number\",\n\t fsntfs_test_mft_entry_get_journal_sequence_number,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_number_of_attributes\",\n\t fsntfs_test_mft_entry_get_number_of_attributes,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_attribute_by_index\",\n\t fsntfs_test_mft_entry_get_attribute_by_index,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_number_of_alternate_data_attributes\",\n\t fsntfs_test_mft_entry_get_number_of_alternate_data_attributes,\n\t mft_entry );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_get_alternate_data_attribute_by_index\",\n\t fsntfs_test_mft_entry_get_alternate_data_attribute_by_index,\n\t mft_entry );\n\n\t/* TODO: add tests for libfsntfs_mft_entry_get_alternate_data_attribute_by_utf8_name */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_get_alternate_data_attribute_by_utf16_name */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_set_attribute_helper_values */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_set_data_attribute_helper_values */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_get_data_attribute_by_utf8_name */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_has_directory_entries_index */\n\n\t/* TODO: add tests for libfsntfs_mft_entry_read_element_data */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_free(\n\t          &mft_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_free(\n\t\t &mft_entry,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_entry_header.c",
    "content": "/*\n * Library mft_entry_header type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_mft_entry_header.h\"\n\nuint8_t fsntfs_test_mft_entry_header_data1[ 48 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\nuint8_t fsntfs_test_mft_entry_header_data2[ 42 ] = {\n\t0x46, 0x49, 0x4c, 0x45, 0x2a, 0x00, 0x03, 0x00, 0x96, 0x53, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x01, 0x00, 0x30, 0x00, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_mft_entry_header_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_initialize(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_mft_entry_header_t *mft_entry_header = NULL;\n\tint result                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                = 1;\n\tint number_of_memset_fail_tests                = 1;\n\tint test_number                                = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_initialize(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_header_free(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_entry_header = (libfsntfs_mft_entry_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_entry_header_initialize(\n\t          &mft_entry_header,\n\t          &error );\n\n\tmft_entry_header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_entry_header_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_entry_header_initialize(\n\t\t          &mft_entry_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft_entry_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_entry_header_free(\n\t\t\t\t &mft_entry_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_entry_header\",\n\t\t\t mft_entry_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_entry_header_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_entry_header_initialize(\n\t\t          &mft_entry_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft_entry_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_entry_header_free(\n\t\t\t\t &mft_entry_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_entry_header\",\n\t\t\t mft_entry_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry_header != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_header_free(\n\t\t &mft_entry_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_read_data(\n     void )\n{\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_mft_entry_header_t *mft_entry_header = NULL;\n\tint result                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_entry_header_initialize(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"mft_entry_header->is_bad\",\n\t mft_entry_header->is_bad,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data2,\n\t          42,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"mft_entry_header->is_bad\",\n\t mft_entry_header->is_bad,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular case where signature is \"BAAD\"\n\t */\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_entry_header_data1[ 0 ] ),\n\t 0x44414142UL );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          48,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_entry_header_data1[ 0 ] ),\n\t 0x454c4946UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"mft_entry_header->is_bad\",\n\t mft_entry_header->is_bad,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          NULL,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          NULL,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where signature is invalid\n\t */\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_entry_header_data1[ 0 ] ),\n\t 0xffffffffUL );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          48,\n\t          &error );\n\n\tbyte_stream_copy_from_uint32_little_endian(\n\t &( fsntfs_test_mft_entry_header_data1[ 0 ] ),\n\t 0x454c4946UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_header_free(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry_header != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_header_free(\n\t\t &mft_entry_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_get_fixup_values_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_get_fixup_values_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header )\n{\n\tlibcerror_error_t *error     = NULL;\n\tuint16_t fixup_values_offset = 0;\n\tint result                   = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_fixup_values_offset(\n\t          mft_entry_header,\n\t          &fixup_values_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"fixup_values_offset\",\n\t fixup_values_offset,\n\t 48 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_fixup_values_offset(\n\t          NULL,\n\t          &fixup_values_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_get_fixup_values_offset(\n\t          mft_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_get_number_of_fixup_values function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_get_number_of_fixup_values(\n     libfsntfs_mft_entry_header_t *mft_entry_header )\n{\n\tlibcerror_error_t *error        = NULL;\n\tuint16_t number_of_fixup_values = 0;\n\tint result                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_number_of_fixup_values(\n\t          mft_entry_header,\n\t          &number_of_fixup_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"number_of_fixup_values\",\n\t number_of_fixup_values,\n\t 3 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_number_of_fixup_values(\n\t          NULL,\n\t          &number_of_fixup_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_get_number_of_fixup_values(\n\t          mft_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_get_attributes_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_get_attributes_offset(\n     libfsntfs_mft_entry_header_t *mft_entry_header )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint16_t attributes_offset = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_attributes_offset(\n\t          mft_entry_header,\n\t          &attributes_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"attributes_offset\",\n\t attributes_offset,\n\t 56 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_attributes_offset(\n\t          NULL,\n\t          &attributes_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_get_attributes_offset(\n\t          mft_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_get_used_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_get_used_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t used_entry_size = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_used_entry_size(\n\t          mft_entry_header,\n\t          &used_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"used_entry_size\",\n\t used_entry_size,\n\t 408 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_used_entry_size(\n\t          NULL,\n\t          &used_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_get_used_entry_size(\n\t          mft_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_entry_header_get_total_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_entry_header_get_total_entry_size(\n     libfsntfs_mft_entry_header_t *mft_entry_header )\n{\n\tlibcerror_error_t *error  = NULL;\n\tuint32_t total_entry_size = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_total_entry_size(\n\t          mft_entry_header,\n\t          &total_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"total_entry_size\",\n\t total_entry_size,\n\t 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_entry_header_get_total_entry_size(\n\t          NULL,\n\t          &total_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_mft_entry_header_get_total_entry_size(\n\t          mft_entry_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                       = NULL;\n\tlibfsntfs_mft_entry_header_t *mft_entry_header = NULL;\n\tint result                                     = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_header_initialize\",\n\t fsntfs_test_mft_entry_header_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_header_free\",\n\t fsntfs_test_mft_entry_header_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_entry_header_read_data\",\n\t fsntfs_test_mft_entry_header_read_data );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_entry_header_initialize(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_entry_header_read_data(\n\t          mft_entry_header,\n\t          fsntfs_test_mft_entry_header_data1,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_header_get_fixup_values_offset\",\n\t fsntfs_test_mft_entry_header_get_fixup_values_offset,\n\t mft_entry_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_header_get_number_of_fixup_values\",\n\t fsntfs_test_mft_entry_header_get_number_of_fixup_values,\n\t mft_entry_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_header_get_attributes_offset\",\n\t fsntfs_test_mft_entry_header_get_attributes_offset,\n\t mft_entry_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_header_get_used_entry_size\",\n\t fsntfs_test_mft_entry_header_get_used_entry_size,\n\t mft_entry_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_mft_entry_header_get_total_entry_size\",\n\t fsntfs_test_mft_entry_header_get_total_entry_size,\n\t mft_entry_header );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_entry_header_free(\n\t          &mft_entry_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_entry_header\",\n\t mft_entry_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_entry_header != NULL )\n\t{\n\t\tlibfsntfs_mft_entry_header_free(\n\t\t &mft_entry_header,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_mft_metadata_file.c",
    "content": "/*\n * Library mft_metadata_file type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_getopt.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libclocale.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_libuna.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n\n#include \"../libfsntfs/libfsntfs_mft_metadata_file.h\"\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4\n#error Unsupported size of wchar_t\n#endif\n\n/* Define to make fsntfs_test_mft_metadata_file generate verbose output\n#define FSNTFS_TEST_MFT_METADATA_FILE_VERBOSE\n */\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Creates and opens a source MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_mft_metadata_file_open_source(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_mft_metadata_file_open_source\";\n\tint result            = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_metadata_file_initialize(\n\t     mft_metadata_file,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize MFT metadata file.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_mft_metadata_file_open_file_io_handle(\n\t          *mft_metadata_file,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          error );\n\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open MFT metadata file.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t mft_metadata_file,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Closes and frees a source MFT metadata file\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_mft_metadata_file_close_source(\n     libfsntfs_mft_metadata_file_t **mft_metadata_file,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_mft_metadata_file_close_source\";\n\tint result            = 0;\n\n\tif( mft_metadata_file == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid MFT metadata file.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_mft_metadata_file_close(\n\t     *mft_metadata_file,\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t \"%s: unable to close MFT metadata file.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\tif( libfsntfs_mft_metadata_file_free(\n\t     mft_metadata_file,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free MFT metadata file.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\treturn( result );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_initialize(\n     void )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\tint result                                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                  = 1;\n\tint number_of_memset_fail_tests                  = 1;\n\tint test_number                                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_metadata_file_free(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tmft_metadata_file = (libfsntfs_mft_metadata_file_t *) 0x12345678UL;\n\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tmft_metadata_file = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_metadata_file_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_metadata_file_initialize(\n\t\t          &mft_metadata_file,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( mft_metadata_file != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_metadata_file_free(\n\t\t\t\t &mft_metadata_file,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_metadata_file\",\n\t\t\t mft_metadata_file );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_mft_metadata_file_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_mft_metadata_file_initialize(\n\t\t          &mft_metadata_file,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( mft_metadata_file != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_mft_metadata_file_free(\n\t\t\t\t &mft_metadata_file,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"mft_metadata_file\",\n\t\t\t mft_metadata_file );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t &mft_metadata_file,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_open function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_open(\n     const system_character_t *source )\n{\n\tchar narrow_source[ 256 ];\n\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\tint result                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = fsntfs_test_get_narrow_source(\n\t          source,\n\t          narrow_source,\n\t          256,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open\n\t */\n\tresult = libfsntfs_mft_metadata_file_open(\n\t          mft_metadata_file,\n\t          narrow_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_open(\n\t          mft_metadata_file,\n\t          narrow_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_metadata_file_free(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t &mft_metadata_file,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Tests the libfsntfs_mft_metadata_file_open_wide function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_open_wide(\n     const system_character_t *source )\n{\n\twchar_t wide_source[ 256 ];\n\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\tint result                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = fsntfs_test_get_wide_source(\n\t          source,\n\t          wide_source,\n\t          256,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open\n\t */\n\tresult = libfsntfs_mft_metadata_file_open_wide(\n\t          mft_metadata_file,\n\t          wide_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_open_wide(\n\t          mft_metadata_file,\n\t          wide_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_metadata_file_free(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t &mft_metadata_file,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Tests the libfsntfs_mft_metadata_file_close function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_close(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_close(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_open and libfsntfs_mft_metadata_file_close functions\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_open_close(\n     const system_character_t *source )\n{\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\tint result                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_mft_metadata_file_initialize(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open and close\n\t */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_mft_metadata_file_open_wide(\n\t          mft_metadata_file,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#else\n\tresult = libfsntfs_mft_metadata_file_open(\n\t          mft_metadata_file,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#endif\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_metadata_file_close(\n\t          mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open and close a second time to validate clean up on close\n\t */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_mft_metadata_file_open_wide(\n\t          mft_metadata_file,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#else\n\tresult = libfsntfs_mft_metadata_file_open(\n\t          mft_metadata_file,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#endif\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_metadata_file_close(\n\t          mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_metadata_file_free(\n\t          &mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_metadata_file\",\n\t mft_metadata_file );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_metadata_file != NULL )\n\t{\n\t\tlibfsntfs_mft_metadata_file_free(\n\t\t &mft_metadata_file,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_signal_abort function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_signal_abort(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_signal_abort(\n\t          mft_metadata_file,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_signal_abort(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_get_utf8_volume_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_get_utf8_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tlibcerror_error_t *error         = NULL;\n\tsize_t utf8_volume_name_size     = 0;\n\tint result                       = 0;\n\tint utf8_volume_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n\t          mft_metadata_file,\n\t          &utf8_volume_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_volume_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n\t          NULL,\n\t          &utf8_volume_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_volume_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name_size(\n\t\t          mft_metadata_file,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_get_utf8_volume_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_get_utf8_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tuint8_t utf8_volume_name[ 512 ];\n\n\tlibcerror_error_t *error    = NULL;\n\tint result                  = 0;\n\tint utf8_volume_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t          mft_metadata_file,\n\t          utf8_volume_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_volume_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t          NULL,\n\t          utf8_volume_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_volume_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t\t          mft_metadata_file,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t\t          mft_metadata_file,\n\t\t          utf8_volume_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_mft_metadata_file_get_utf8_volume_name(\n\t\t          mft_metadata_file,\n\t\t          utf8_volume_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_get_utf16_volume_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_get_utf16_volume_name_size(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tlibcerror_error_t *error          = NULL;\n\tsize_t utf16_volume_name_size     = 0;\n\tint result                        = 0;\n\tint utf16_volume_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n\t          mft_metadata_file,\n\t          &utf16_volume_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_volume_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n\t          NULL,\n\t          &utf16_volume_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_volume_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name_size(\n\t\t          mft_metadata_file,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_get_utf16_volume_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_get_utf16_volume_name(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tuint16_t utf16_volume_name[ 512 ];\n\n\tlibcerror_error_t *error     = NULL;\n\tint result                   = 0;\n\tint utf16_volume_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t          mft_metadata_file,\n\t          utf16_volume_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_volume_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t          NULL,\n\t          utf16_volume_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_volume_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t\t          mft_metadata_file,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t\t          mft_metadata_file,\n\t\t          utf16_volume_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_mft_metadata_file_get_utf16_volume_name(\n\t\t          mft_metadata_file,\n\t\t          utf16_volume_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_mft_metadata_file_get_number_of_file_entries function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_mft_metadata_file_get_number_of_file_entries(\n     libfsntfs_mft_metadata_file_t *mft_metadata_file )\n{\n\tlibcerror_error_t *error          = NULL;\n\tuint64_t number_of_file_entries   = 0;\n\tint number_of_file_entries_is_set = 0;\n\tint result                        = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t          mft_metadata_file,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tnumber_of_file_entries_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t          NULL,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( number_of_file_entries_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_mft_metadata_file_get_number_of_file_entries(\n\t\t          mft_metadata_file,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc,\n     wchar_t * const argv[] )\n#else\nint main(\n     int argc,\n     char * const argv[] )\n#endif\n{\n\tlibbfio_handle_t *file_io_handle                 = NULL;\n\tlibcerror_error_t *error                         = NULL;\n\tlibfsntfs_mft_metadata_file_t *mft_metadata_file = NULL;\n\tsystem_character_t *option_offset                = NULL;\n\tsystem_character_t *source                       = NULL;\n\tsystem_integer_t option                          = 0;\n\tsize_t string_length                             = 0;\n\toff64_t mft_metadata_file_offset                 = 0;\n\tint result                                       = 0;\n\n\twhile( ( option = fsntfs_test_getopt(\n\t                   argc,\n\t                   argv,\n\t                   _SYSTEM_STRING( \"o:\" ) ) ) != (system_integer_t) -1 )\n\t{\n\t\tswitch( option )\n\t\t{\n\t\t\tcase (system_integer_t) '?':\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Invalid argument: %\" PRIs_SYSTEM \".\\n\",\n\t\t\t\t argv[ optind - 1 ] );\n\n\t\t\t\treturn( EXIT_FAILURE );\n\n\t\t\tcase (system_integer_t) 'o':\n\t\t\t\toption_offset = optarg;\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif( optind < argc )\n\t{\n\t\tsource = argv[ optind ];\n\t}\n\tif( option_offset != NULL )\n\t{\n\t\tstring_length = system_string_length(\n\t\t                 option_offset );\n\n\t\tresult = fsntfs_test_system_string_copy_from_64_bit_in_decimal(\n\t\t          option_offset,\n\t\t          string_length + 1,\n\t\t          (uint64_t *) &mft_metadata_file_offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_MFT_METADATA_FILE_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_metadata_file_initialize\",\n\t fsntfs_test_mft_metadata_file_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_mft_metadata_file_free\",\n\t fsntfs_test_mft_metadata_file_free );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\tif( source != NULL )\n\t{\n\t\tresult = libbfio_file_range_initialize(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t         \"file_io_handle\",\n\t         file_io_handle );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tstring_length = system_string_length(\n\t\t                 source );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libbfio_file_range_set_name_wide(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          string_length,\n\t\t          &error );\n#else\n\t\tresult = libbfio_file_range_set_name(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          string_length,\n\t\t          &error );\n#endif\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tresult = libbfio_file_range_set(\n\t\t          file_io_handle,\n\t\t          mft_metadata_file_offset,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tresult = libfsntfs_check_mft_metadata_file_signature_file_io_handle(\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\tif( ( result != 0 )\n\t && ( mft_metadata_file_offset == 0 ) )\n\t{\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_open\",\n\t\t fsntfs_test_mft_metadata_file_open,\n\t\t source );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_open_wide\",\n\t\t fsntfs_test_mft_metadata_file_open_wide,\n\t\t source );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n#if defined( LIBFSNTFS_HAVE_BFIO )\n\n\t\t/* TODO add test for libfsntfs_mft_metadata_file_open_file_io_handle */\n\n#endif /* defined( LIBFSNTFS_HAVE_BFIO ) */\n\n\t\tFSNTFS_TEST_RUN(\n\t\t \"libfsntfs_mft_metadata_file_close\",\n\t\t fsntfs_test_mft_metadata_file_close );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_open_close\",\n\t\t fsntfs_test_mft_metadata_file_open_close,\n\t\t source );\n\t}\n\tif( result != 0 )\n\t{\n\t\t/* Initialize test\n\t\t */\n\t\tresult = fsntfs_test_mft_metadata_file_open_source(\n\t\t          &mft_metadata_file,\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"mft_metadata_file\",\n\t\t mft_metadata_file );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_signal_abort\",\n\t\t fsntfs_test_mft_metadata_file_signal_abort,\n\t\t mft_metadata_file );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\t\t/* TODO: add tests for libfsntfs_mft_metadata_file_open_read */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_get_utf8_volume_name_size\",\n\t\t fsntfs_test_mft_metadata_file_get_utf8_volume_name_size,\n\t\t mft_metadata_file );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_get_utf8_volume_name\",\n\t\t fsntfs_test_mft_metadata_file_get_utf8_volume_name,\n\t\t mft_metadata_file );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_get_utf16_volume_name_size\",\n\t\t fsntfs_test_mft_metadata_file_get_utf16_volume_name_size,\n\t\t mft_metadata_file );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_get_utf16_volume_name\",\n\t\t fsntfs_test_mft_metadata_file_get_utf16_volume_name,\n\t\t mft_metadata_file );\n\n\t\t/* TODO: add tests for libfsntfs_mft_metadata_file_get_volume_version */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_mft_metadata_file_get_number_of_file_entries\",\n\t\t fsntfs_test_mft_metadata_file_get_number_of_file_entries,\n\t\t mft_metadata_file );\n\n\t\t/* TODO: add tests for libfsntfs_mft_metadata_file_get_file_entry_by_index */\n\n\t\t/* Clean up\n\t\t */\n\t\tresult = fsntfs_test_mft_metadata_file_close_source(\n\t\t          &mft_metadata_file,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"mft_metadata_file\",\n\t\t mft_metadata_file );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tresult = libbfio_handle_free(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"file_io_handle\",\n\t         file_io_handle );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\t}\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( mft_metadata_file != NULL )\n\t{\n\t\tfsntfs_test_mft_metadata_file_close_source(\n\t\t &mft_metadata_file,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_name.c",
    "content": "/*\n * Library name functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_libuna.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_name.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_name_compare function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_name_compare(\n     void )\n{\n        uint8_t utf16_stream_equal[ 12 ]       = { 'e', 0, 'q', 0, 'u', 0, 'a', 0, 'l', 0, 0 };\n        uint8_t utf16_stream_equal_upper[ 12 ] = { 'E', 0, 'Q', 0, 'U', 0, 'A', 0, 'L', 0, 0 };\n        uint8_t utf16_stream_great[ 12 ]       = { 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't', 0, 0, 0 };\n        uint8_t utf16_stream_greater[ 16 ]     = { 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't', 0, 'e', 0, 'r', 0, 0, 0 };\n        uint8_t utf16_stream_less[ 10 ]        = { 'l', 0, 'e', 0, 's', 0, 's', 0, 0, 0 };\n        uint8_t utf16_stream_lesser[ 14 ]      = { 'l', 0, 'e', 0, 's', 0, 's', 0, 'e', 0, 'r', 0, 0, 0 };\n        uint8_t utf16_stream_more[ 10 ]        = { 'm', 0, 'o', 0, 'r', 0, 'e', 0, 0, 0 };\n\tlibcerror_error_t *error               = NULL;\n\tint result                             = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_stream_equal,\n\t          12,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_stream_equal,\n\t          12,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_stream_equal_upper,\n\t          12,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_great,\n\t          12,\n\t          utf16_stream_greater,\n\t          16,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_less,\n\t          10,\n\t          utf16_stream_more,\n\t          10,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_more,\n\t          10,\n\t          utf16_stream_less,\n\t          10,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_lesser,\n\t          14,\n\t          utf16_stream_less,\n\t          10,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_name_compare(\n\t          NULL,\n\t          12,\n\t          utf16_stream_equal,\n\t          12,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          utf16_stream_equal,\n\t          12,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          12,\n\t          NULL,\n\t          12,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_stream_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_name_compare_short function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_name_compare_short(\n     void )\n{\n        uint8_t utf16_stream_long1[ 46 ] = {\n\t\t'D', 0, 'o', 0, 'c', 0, 'u', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0,\n\t\t's', 0, ' ', 0, 'a', 0, 'n', 0, 'd', 0, ' ', 0, 'S', 0, 'e', 0,\n\t\t't', 0, 't', 0, 'i', 0, 'n', 0, 'g', 0, 's', 0, 0, 0 };\n\n        uint8_t utf16_stream_long2[ 98 ] = {\n\t\t'B', 0, 'C', 0, 'D', 0, '{', 0, '3', 0, 'e', 0, '8', 0, '0', 0,\n\t\t'4', 0, '9', 0, '5', 0, '9', 0, '-', 0, 'e', 0, 'b', 0, '0', 0,\n\t\t'4', 0, '-', 0, '1', 0, '1', 0, 'e', 0, '4', 0, '-', 0, '8', 0,\n\t\t'0', 0, 'c', 0, '4', 0, '-', 0, '0', 0, '0', 0, '2', 0, '6', 0,\n\t\t'b', 0, '9', 0, '4', 0, 'a', 0, '1', 0, '7', 0, '7', 0, '3', 0,\n\t\t'}', 0, '.', 0, 'T', 0, 'M', 0, '.', 0, 'b', 0, 'l', 0, 'f', 0,\n\t\t0, 0 };\n\n        uint8_t utf16_stream_long3[ 8 ] = {\n\t\t'B', 0, 'C', 0, 'D', 0, 0, 0 };\n\n        uint8_t utf16_stream_long4[ 18 ] = {\n\t\t'B', 0, 'C', 0, 'D', 0, '.', 0, 'L', 0, 'O', 0, 'G', 0, '2', 0,\n\t\t 0, 0 };\n\n        uint8_t utf16_stream_long5[ 14 ] = {\n\t\t'O', 0, 'l', 0, 'e', 0, ' ', 0, 'D', 0, 'B', 0, 0, 0 };\n\n        uint8_t utf16_stream_long6[ 18 ] = {\n\t\t'f', 0, '[', 0, '1', 0, ']', 0, '.', 0, 't', 0, 'x', 0, 't', 0,\n\t\t0, 0 };\n\n        uint8_t utf16_stream_long7[ 52 ] = {\n\t\t'6', 0, '.', 0, '1', 0, '.', 0, '0', 0, '.', 0, '0', 0, '_', 0,\n\t\t'_', 0, '3', 0, '1', 0, 'b', 0, 'f', 0, '3', 0, '8', 0, '5', 0,\n\t\t'6', 0, 'a', 0, 'd', 0, '3', 0, '6', 0, '4', 0, 'e', 0, '3', 0,\n\t\t'5', 0, 0, 0 };\n\n        uint8_t utf16_stream_long8[ 14 ] = {\n\t\t'v', 0, '2', 0, '.', 0, '0', 0, '.', 0, '6', 0, 0, 0 };\n\n        uint8_t utf16_stream_long9[ 28 ] = {\n\t\t'.', 0, 'N', 0, 'E', 0, 'T', 0, ' ', 0, 'C', 0, 'L', 0, 'R', 0,\n\t\t' ', 0, 'D', 0, 'a', 0, 't', 0, 'a', 0, 0, 0 };\n\n        uint8_t utf16_stream_long10[ 36 ] = {\n\t\t'a', 0, 'u', 0, 'd', 0, 'i', 0, 'o', 0, 'e', 0, 'n', 0, 'd', 0,\n\t\t'p', 0, 'o', 0, 'i', 0, 'n', 0, 't', 0, '.', 0, 'P', 0, 'N', 0,\n\t\t'F', 0, 0, 0 };\n\n        uint8_t utf16_stream_short1[ 18 ] = {\n\t\t'D', 0, 'O', 0, 'C', 0, 'U', 0, 'M', 0, 'E', 0, '~', 0, '1', 0,\n\t\t0, 0 };\n\n        uint8_t utf16_stream_short2[ 26 ] = {\n\t\t'B', 0, 'C', 0, 'D', 0, '{', 0, '3', 0, 'E', 0, '~', 0, '1', 0,\n\t\t'.', 0, 'B', 0, 'L', 0, 'F', 0, 0, 0 };\n\n        uint8_t utf16_stream_short4[ 20 ] = {\n\t\t'B', 0, 'C', 0, 'D', 0, '~', 0, '2', 0, '.', 0, 'L', 0, 'O', 0,\n\t\t'G', 0, 0, 0 };\n\n        uint8_t utf16_stream_short5[ 16 ] = {\n\t\t'O', 0, 'L', 0, 'E', 0, 'D', 0, 'B', 0, '~', 0, '1', 0, 0, 0 };\n\n        uint8_t utf16_stream_short6[ 22 ] = {\n\t\t'F', 0, '_', 0, '1', 0, '_', 0, '~', 0, '1', 0, '.', 0, 'T', 0,\n\t\t'X', 0, 'T', 0, 0, 0 };\n\n        uint8_t utf16_stream_short7[ 20 ] = {\n\t\t'6', 0, '1', 0, '0', 0, '~', 0, '1', 0, '.', 0, '0', 0, '_', 0,\n\t\t'_', 0, 0, 0 };\n\n        uint8_t utf16_stream_short8[ 16 ] = {\n\t\t'V', 0, '2', 0, '0', 0, '~', 0, '1', 0, '.', 0, '6', 0, 0, 0 };\n\n        uint8_t utf16_stream_short9[ 18 ] = {\n\t\t'N', 0, 'E', 0, 'T', 0, 'C', 0, 'L', 0, 'R', 0, '~', 0, '1', 0,\n\t\t0, 0 };\n\n        uint8_t utf16_stream_short10[ 26 ] = {\n\t\t'A', 0, 'U', 0, 'D', 0, 'I', 0, 'O', 0, 'E', 0, '~', 0, '1', 0,\n\t\t'.', 0, 'P', 0, 'N', 0, 'F', 0, 0, 0 };\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long1,\n\t          26,\n\t          utf16_stream_short1,\n\t          18,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long2,\n\t          96,\n\t          utf16_stream_short2,\n\t          26,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long3,\n\t          8,\n\t          utf16_stream_short2,\n\t          26,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long4,\n\t          18,\n\t          utf16_stream_short2,\n\t          26,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long4,\n\t          18,\n\t          utf16_stream_short4,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long5,\n\t          14,\n\t          utf16_stream_short5,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long6,\n\t          18,\n\t          utf16_stream_short6,\n\t          22,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long7,\n\t          52,\n\t          utf16_stream_short7,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long8,\n\t          14,\n\t          utf16_stream_short8,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long9,\n\t          28,\n\t          utf16_stream_short9,\n\t          18,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long10,\n\t          36,\n\t          utf16_stream_short10,\n\t          26,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_name_compare_short(\n\t          NULL,\n\t          26,\n\t          utf16_stream_short1,\n\t          18,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          utf16_stream_short1,\n\t          18,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long1,\n\t          26,\n\t          NULL,\n\t          18,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_short(\n\t          utf16_stream_long1,\n\t          26,\n\t          utf16_stream_short1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_name_compare_with_utf8_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_name_compare_with_utf8_string(\n     void )\n{\n        uint8_t utf16_stream_equal[ 12 ]     = { 'e', 0, 'q', 0, 'u', 0, 'a', 0, 'l', 0, 0 };\n        uint8_t utf16_stream_great[ 12 ]     = { 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't', 0, 0, 0 };\n        uint8_t utf16_stream_less[ 10 ]      = { 'l', 0, 'e', 0, 's', 0, 's', 0, 0, 0 };\n        uint8_t utf16_stream_lesser[ 14 ]    = { 'l', 0, 'e', 0, 's', 0, 's', 0, 'e', 0, 'r', 0, 0, 0 };\n        uint8_t utf16_stream_more[ 10 ]      = { 'm', 0, 'o', 0, 'r', 0, 'e', 0, 0, 0 };\n        uint8_t utf8_string_equal[ 6 ]       = { 'e', 'q', 'u', 'a', 'l', 0 };\n        uint8_t utf8_string_equal_upper[ 6 ] = { 'E', 'Q', 'U', 'A', 'L', 0 };\n        uint8_t utf8_string_greater[ 7 ]     = { 'g', 'r', 'e', 'a', 't', 'e', 'r' };\n        uint8_t utf8_string_less[ 4 ]        = { 'l', 'e', 's', 's' };\n        uint8_t utf8_string_more[ 4 ]        = { 'm', 'o', 'r', 'e' };\n\tlibcerror_error_t *error             = NULL;\n\tint result                           = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf8_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf8_string_equal,\n\t          6,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf8_string_equal_upper,\n\t          5,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_great,\n\t          12,\n\t          utf8_string_greater,\n\t          7,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_less,\n\t          10,\n\t          utf8_string_more,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_more,\n\t          10,\n\t          utf8_string_less,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_lesser,\n\t          14,\n\t          utf8_string_less,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          NULL,\n\t          12,\n\t          utf8_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          utf8_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          NULL,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf8_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf8_string_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_name_compare_with_utf16_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_name_compare_with_utf16_string(\n     void )\n{\n        uint8_t utf16_stream_equal[ 12 ]       = { 'e', 0, 'q', 0, 'u', 0, 'a', 0, 'l', 0, 0 };\n        uint8_t utf16_stream_great[ 12 ]       = { 'g', 0, 'r', 0, 'e', 0, 'a', 0, 't', 0, 0, 0 };\n        uint8_t utf16_stream_less[ 10 ]        = { 'l', 0, 'e', 0, 's', 0, 's', 0, 0, 0 };\n        uint8_t utf16_stream_lesser[ 14 ]      = { 'l', 0, 'e', 0, 's', 0, 's', 0, 'e', 0, 'r', 0, 0, 0 };\n        uint8_t utf16_stream_more[ 10 ]        = { 'm', 0, 'o', 0, 'r', 0, 'e', 0, 0, 0 };\n        uint16_t utf16_string_equal[ 6 ]       = { 'e', 'q', 'u', 'a', 'l', 0 };\n        uint16_t utf16_string_equal_upper[ 6 ] = { 'E', 'Q', 'U', 'A', 'L', 0 };\n        uint16_t utf16_string_greater[ 7 ]     = { 'g', 'r', 'e', 'a', 't', 'e', 'r' };\n        uint16_t utf16_string_less[ 4 ]        = { 'l', 'e', 's', 's' };\n        uint16_t utf16_string_more[ 4 ]        = { 'm', 'o', 'r', 'e' };\n\tlibcerror_error_t *error               = NULL;\n\tint result                             = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_string_equal,\n\t          6,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_string_equal_upper,\n\t          5,\n\t          1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_great,\n\t          12,\n\t          utf16_string_greater,\n\t          7,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_less,\n\t          10,\n\t          utf16_string_more,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_more,\n\t          10,\n\t          utf16_string_less,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_lesser,\n\t          14,\n\t          utf16_string_less,\n\t          4,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBUNA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          NULL,\n\t          12,\n\t          utf16_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          utf16_string_equal,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          NULL,\n\t          5,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_name_compare_with_utf16_string(\n\t          utf16_stream_equal,\n\t          12,\n\t          utf16_string_equal,\n\t          (size_t) SSIZE_MAX + 1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_name_compare\",\n\t fsntfs_test_name_compare );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_name_compare_short\",\n\t fsntfs_test_name_compare_short );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_name_compare_with_utf8_string\",\n\t fsntfs_test_name_compare_with_utf8_string );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_name_compare_with_utf16_string\",\n\t fsntfs_test_name_compare_with_utf16_string );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_notify.c",
    "content": "/*\n * Library notification functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n/* Tests the libfsntfs_notify_set_verbose function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_notify_set_verbose(\n     void )\n{\n\t/* Test invocation of function only\n\t */\n\tlibfsntfs_notify_set_verbose(\n\t 0 );\n\n\treturn( 1 );\n}\n\n/* Tests the libfsntfs_notify_set_stream function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_notify_set_stream(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_notify_set_stream(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n/* TODO test libcnotify_stream_set failure */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_notify_stream_open function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_notify_stream_open(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_notify_stream_open(\n\t          \"notify_stream.log\",\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_notify_stream_open(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_notify_stream_close(\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_notify_stream_close function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_notify_stream_close(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_notify_stream_close(\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n/* TODO test libcnotify_stream_close failure */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_notify_set_verbose\",\n\t fsntfs_test_notify_set_verbose )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_notify_set_stream\",\n\t fsntfs_test_notify_set_stream )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_notify_stream_open\",\n\t fsntfs_test_notify_stream_open )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_notify_stream_close\",\n\t fsntfs_test_notify_stream_close )\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_object_identifier_values.c",
    "content": "/*\n * Library object_identifier_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_object_identifier_values.h\"\n\nuint8_t fsntfs_test_object_identifier_values_data1[ 40 ] = {\n\t0x40, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcc, 0xed, 0x85, 0x47, 0x32, 0xbf, 0x83, 0x4c,\n\t0xb7, 0x65, 0x55, 0xef, 0x93, 0x4d, 0x21, 0x45 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_object_identifier_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_object_identifier_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tint result                                                     = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                = 1;\n\tint number_of_memset_fail_tests                                = 1;\n\tint test_number                                                = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_object_identifier_values_initialize(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_object_identifier_values_free(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_object_identifier_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tobject_identifier_values = (libfsntfs_object_identifier_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_object_identifier_values_initialize(\n\t          &object_identifier_values,\n\t          &error );\n\n\tobject_identifier_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_object_identifier_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_object_identifier_values_initialize(\n\t\t          &object_identifier_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( object_identifier_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_object_identifier_values_free(\n\t\t\t\t &object_identifier_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"object_identifier_values\",\n\t\t\t object_identifier_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_object_identifier_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_object_identifier_values_initialize(\n\t\t          &object_identifier_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( object_identifier_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_object_identifier_values_free(\n\t\t\t\t &object_identifier_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"object_identifier_values\",\n\t\t\t object_identifier_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( object_identifier_values != NULL )\n\t{\n\t\tlibfsntfs_object_identifier_values_free(\n\t\t &object_identifier_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_object_identifier_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_object_identifier_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_object_identifier_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_object_identifier_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_object_identifier_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tint result                                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_object_identifier_values_initialize(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_object_identifier_values_read_data(\n\t          object_identifier_values,\n\t          &( fsntfs_test_object_identifier_values_data1[ 24 ] ),\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_object_identifier_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_object_identifier_values_data1[ 24 ] ),\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_object_identifier_values_read_data(\n\t          object_identifier_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_object_identifier_values_read_data(\n\t          object_identifier_values,\n\t          &( fsntfs_test_object_identifier_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_object_identifier_values_free(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( object_identifier_values != NULL )\n\t{\n\t\tlibfsntfs_object_identifier_values_free(\n\t\t &object_identifier_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_object_identifier_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_object_identifier_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                                       = NULL;\n\tlibfsntfs_io_handle_t *io_handle                               = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                       = NULL;\n\tlibfsntfs_object_identifier_values_t *object_identifier_values = NULL;\n\tint result                                                     = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_object_identifier_values_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_object_identifier_values_initialize(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_object_identifier_values_read_from_mft_attribute(\n\t          object_identifier_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_object_identifier_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_object_identifier_values_read_from_mft_attribute(\n\t          object_identifier_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_object_identifier_values_free(\n\t          &object_identifier_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"object_identifier_values\",\n\t object_identifier_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( object_identifier_values != NULL )\n\t{\n\t\tlibfsntfs_object_identifier_values_free(\n\t\t &object_identifier_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_object_identifier_values_initialize\",\n\t fsntfs_test_object_identifier_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_object_identifier_values_free\",\n\t fsntfs_test_object_identifier_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_object_identifier_values_read_data\",\n\t fsntfs_test_object_identifier_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_object_identifier_values_read_from_mft_attribute\",\n\t fsntfs_test_object_identifier_values_read_from_mft_attribute );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_path_hint.c",
    "content": "/*\n * Library path_hint type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_path_hint.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_path_hint_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_path_hint_initialize(\n     void )\n{\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_path_hint_t *path_hint = NULL;\n\tint result                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests  = 1;\n\tint number_of_memset_fail_tests  = 1;\n\tint test_number                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_path_hint_initialize(\n\t          &path_hint,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path_hint\",\n\t path_hint );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_path_hint_free(\n\t          &path_hint,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"path_hint\",\n\t path_hint );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_path_hint_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tpath_hint = (libfsntfs_path_hint_t *) 0x12345678UL;\n\n\tresult = libfsntfs_path_hint_initialize(\n\t          &path_hint,\n\t          &error );\n\n\tpath_hint = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_path_hint_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_path_hint_initialize(\n\t\t          &path_hint,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( path_hint != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_path_hint_free(\n\t\t\t\t &path_hint,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"path_hint\",\n\t\t\t path_hint );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_path_hint_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_path_hint_initialize(\n\t\t          &path_hint,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( path_hint != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_path_hint_free(\n\t\t\t\t &path_hint,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"path_hint\",\n\t\t\t path_hint );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( path_hint != NULL )\n\t{\n\t\tlibfsntfs_path_hint_free(\n\t\t &path_hint,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_path_hint_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_path_hint_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_path_hint_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_path_hint_initialize\",\n\t fsntfs_test_path_hint_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_path_hint_free\",\n\t fsntfs_test_path_hint_free );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_profiler.c",
    "content": "/*\n * Library profiler type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_profiler.h\"\n\n#if defined( HAVE_PROFILER )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_profiler_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_profiler_initialize(\n     void )\n{\n\tlibcerror_error_t *error        = NULL;\n\tlibfsntfs_profiler_t *profiler  = NULL;\n\tint result                      = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests = 1;\n\tint number_of_memset_fail_tests = 1;\n\tint test_number                 = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_profiler_initialize(\n\t          &profiler,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"profiler\",\n\t profiler );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_profiler_free(\n\t          &profiler,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"profiler\",\n\t profiler );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_profiler_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tprofiler = (libfsntfs_profiler_t *) 0x12345678UL;\n\n\tresult = libfsntfs_profiler_initialize(\n\t          &profiler,\n\t          &error );\n\n\tprofiler = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_profiler_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_profiler_initialize(\n\t\t          &profiler,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( profiler != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_profiler_free(\n\t\t\t\t &profiler,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"profiler\",\n\t\t\t profiler );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_profiler_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_profiler_initialize(\n\t\t          &profiler,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( profiler != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_profiler_free(\n\t\t\t\t &profiler,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"profiler\",\n\t\t\t profiler );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( profiler != NULL )\n\t{\n\t\tlibfsntfs_profiler_free(\n\t\t &profiler,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_profiler_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_profiler_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_profiler_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_profiler_close function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_profiler_close(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_profiler_close(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n#endif /* defined( HAVE_PROFILER ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( HAVE_PROFILER )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_profiler_initialize\",\n\t fsntfs_test_profiler_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_profiler_free\",\n\t fsntfs_test_profiler_free );\n\n\t/* TODO: add tests for libfsntfs_profiler_open */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_profiler_close\",\n\t fsntfs_test_profiler_close );\n\n\t/* TODO: add tests for libfsntfs_profiler_start_timing */\n\n\t/* TODO: add tests for libfsntfs_profiler_stop_timing */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n#endif /* defined( HAVE_PROFILER ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( HAVE_PROFILER )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n#endif /* defined( HAVE_PROFILER ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_reparse_point_attribute.c",
    "content": "/*\n * Library reparse_point_attributes functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n#include \"../libfsntfs/libfsntfs_reparse_point_attribute.h\"\n#endif\n\nuint8_t fsntfs_test_reparse_point_attribute_data1[ 88 ] = {\n\t0xc0, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x34, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x5c, 0x00,\n\t0x43, 0x00, 0x3a, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00,\n\t0x00, 0x00, 0x43, 0x00, 0x3a, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_reparse_point_attribute_get_tag function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_tag(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint32_t tag             = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t          attribute,\n\t          &tag,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t          NULL,\n\t          &tag,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_reparse_point_attribute_get_tag(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf8_substitute_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error             = NULL;\n\tsize_t utf8_substitute_name_size     = 0;\n\tint result                           = 0;\n\tint utf8_substitute_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t          attribute,\n\t          &utf8_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_substitute_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t          NULL,\n\t          &utf8_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_substitute_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf8_substitute_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf8_substitute_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint8_t utf8_substitute_name[ 512 ];\n\n\tlibcerror_error_t *error        = NULL;\n\tint result                      = 0;\n\tint utf8_substitute_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t          attribute,\n\t          utf8_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_substitute_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t          NULL,\n\t          utf8_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_substitute_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t          attribute,\n\t\t          utf8_substitute_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_substitute_name(\n\t\t          attribute,\n\t\t          utf8_substitute_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf16_substitute_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error              = NULL;\n\tsize_t utf16_substitute_name_size     = 0;\n\tint result                            = 0;\n\tint utf16_substitute_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n\t          attribute,\n\t          &utf16_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_substitute_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n\t          NULL,\n\t          &utf16_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_substitute_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf16_substitute_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf16_substitute_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint16_t utf16_substitute_name[ 512 ];\n\n\tlibcerror_error_t *error         = NULL;\n\tint result                       = 0;\n\tint utf16_substitute_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t          attribute,\n\t          utf16_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_substitute_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t          NULL,\n\t          utf16_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_substitute_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t\t          attribute,\n\t\t          utf16_substitute_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_substitute_name(\n\t\t          attribute,\n\t\t          utf16_substitute_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf8_print_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf8_print_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error        = NULL;\n\tsize_t utf8_print_name_size     = 0;\n\tint result                      = 0;\n\tint utf8_print_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n\t          attribute,\n\t          &utf8_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_print_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n\t          NULL,\n\t          &utf8_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_print_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name_size(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf8_print_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf8_print_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint8_t utf8_print_name[ 512 ];\n\n\tlibcerror_error_t *error   = NULL;\n\tint result                 = 0;\n\tint utf8_print_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t          attribute,\n\t          utf8_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_print_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t          NULL,\n\t          utf8_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_print_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t\t          attribute,\n\t\t          utf8_print_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf8_print_name(\n\t\t          attribute,\n\t\t          utf8_print_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf16_print_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf16_print_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error         = NULL;\n\tsize_t utf16_print_name_size     = 0;\n\tint result                       = 0;\n\tint utf16_print_name_size_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n\t          attribute,\n\t          &utf16_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_print_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n\t          NULL,\n\t          &utf16_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_print_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name_size(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_attribute_get_utf16_print_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_attribute_get_utf16_print_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint16_t utf16_print_name[ 512 ];\n\n\tlibcerror_error_t *error    = NULL;\n\tint result                  = 0;\n\tint utf16_print_name_is_set = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t          attribute,\n\t          utf16_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_print_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t          NULL,\n\t          utf16_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_print_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t\t          attribute,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t\t          attribute,\n\t\t          utf16_print_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_attribute_get_utf16_print_name(\n\t\t          attribute,\n\t\t          utf16_print_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize attribute for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_reparse_point_attribute_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_tag\",\n\t fsntfs_test_reparse_point_attribute_get_tag,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf8_substitute_name_size\",\n\t fsntfs_test_reparse_point_attribute_get_utf8_substitute_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf8_substitute_name\",\n\t fsntfs_test_reparse_point_attribute_get_utf8_substitute_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf16_substitute_name_size\",\n\t fsntfs_test_reparse_point_attribute_get_utf16_substitute_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf16_substitute_name\",\n\t fsntfs_test_reparse_point_attribute_get_utf16_substitute_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf8_print_name_size\",\n\t fsntfs_test_reparse_point_attribute_get_utf8_print_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf8_print_name\",\n\t fsntfs_test_reparse_point_attribute_get_utf8_print_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf16_print_name_size\",\n\t fsntfs_test_reparse_point_attribute_get_utf16_print_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_reparse_point_attribute_get_utf16_print_name\",\n\t fsntfs_test_reparse_point_attribute_get_utf16_print_name,\n\t attribute );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t         (libfsntfs_internal_attribute_t **) &attribute,\n\t         &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t         &mft_attribute,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_reparse_point_values.c",
    "content": "/*\n * Library reparse_point_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_reparse_point_values.h\"\n\nuint8_t fsntfs_test_reparse_point_values_data1[ 88 ] = {\n\t0xc0, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x34, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x5c, 0x00,\n\t0x43, 0x00, 0x3a, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00,\n\t0x00, 0x00, 0x43, 0x00, 0x3a, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00,\n\t0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_reparse_point_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                        = 1;\n\tint number_of_memset_fail_tests                        = 1;\n\tint test_number                                        = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treparse_point_values = (libfsntfs_reparse_point_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\treparse_point_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_reparse_point_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_reparse_point_values_initialize(\n\t\t          &reparse_point_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( reparse_point_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_reparse_point_values_free(\n\t\t\t\t &reparse_point_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"reparse_point_values\",\n\t\t\t reparse_point_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_reparse_point_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_reparse_point_values_initialize(\n\t\t          &reparse_point_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( reparse_point_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_reparse_point_values_free(\n\t\t\t\t &reparse_point_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"reparse_point_values\",\n\t\t\t reparse_point_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_read_data(\n\t          reparse_point_values,\n\t          &( fsntfs_test_reparse_point_values_data1[ 24 ] ),\n\t          60,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_reparse_point_values_data1[ 24 ] ),\n\t          60,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_reparse_point_values_read_data(\n\t          reparse_point_values,\n\t          NULL,\n\t          60,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_reparse_point_values_read_data(\n\t          reparse_point_values,\n\t          &( fsntfs_test_reparse_point_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_io_handle_t *io_handle                       = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_reparse_point_values_data1,\n\t          88,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_read_from_mft_attribute(\n\t          reparse_point_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_reparse_point_values_read_from_mft_attribute(\n\t          reparse_point_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_tag function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_tag(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tuint32_t tag                                           = 0;\n\tint result                                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_tag(\n\t          reparse_point_values,\n\t          &tag,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_tag(\n\t          NULL,\n\t          &tag,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_reparse_point_values_get_tag(\n\t          reparse_point_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf8_substitute_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf8_substitute_name_size(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tsize_t utf8_substitute_name_size                       = 0;\n\tint result                                             = 0;\n\tint utf8_substitute_name_size_is_set                   = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n\t          reparse_point_values,\n\t          &utf8_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_substitute_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n\t          NULL,\n\t          &utf8_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_substitute_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name_size(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf8_substitute_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf8_substitute_name(\n     void )\n{\n\tuint8_t utf8_substitute_name[ 512 ];\n\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\tint utf8_substitute_name_is_set                        = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t          reparse_point_values,\n\t          utf8_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_substitute_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t          NULL,\n\t          utf8_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_substitute_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t\t          reparse_point_values,\n\t\t          utf8_substitute_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_substitute_name(\n\t\t          reparse_point_values,\n\t\t          utf8_substitute_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf16_substitute_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf16_substitute_name_size(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tsize_t utf16_substitute_name_size                      = 0;\n\tint result                                             = 0;\n\tint utf16_substitute_name_size_is_set                  = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n\t          reparse_point_values,\n\t          &utf16_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_substitute_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n\t          NULL,\n\t          &utf16_substitute_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_substitute_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name_size(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf16_substitute_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf16_substitute_name(\n     void )\n{\n\tuint16_t utf16_substitute_name[ 512 ];\n\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\tint utf16_substitute_name_is_set                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t          reparse_point_values,\n\t          utf16_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_substitute_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t          NULL,\n\t          utf16_substitute_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_substitute_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t\t          reparse_point_values,\n\t\t          utf16_substitute_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_substitute_name(\n\t\t          reparse_point_values,\n\t\t          utf16_substitute_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf8_print_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf8_print_name_size(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tsize_t utf8_print_name_size                            = 0;\n\tint result                                             = 0;\n\tint utf8_print_name_size_is_set                        = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name_size(\n\t          reparse_point_values,\n\t          &utf8_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_print_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name_size(\n\t          NULL,\n\t          &utf8_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_print_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_print_name_size(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf8_print_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf8_print_name(\n     void )\n{\n\tuint8_t utf8_print_name[ 512 ];\n\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\tint utf8_print_name_is_set                             = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t          reparse_point_values,\n\t          utf8_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf8_print_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t          NULL,\n\t          utf8_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf8_print_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t\t          reparse_point_values,\n\t\t          utf8_print_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf8_print_name(\n\t\t          reparse_point_values,\n\t\t          utf8_print_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf16_print_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf16_print_name_size(\n     void )\n{\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tsize_t utf16_print_name_size                           = 0;\n\tint result                                             = 0;\n\tint utf16_print_name_size_is_set                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name_size(\n\t          reparse_point_values,\n\t          &utf16_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_print_name_size_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name_size(\n\t          NULL,\n\t          &utf16_print_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_print_name_size_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_print_name_size(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_reparse_point_values_get_utf16_print_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_reparse_point_values_get_utf16_print_name(\n     void )\n{\n\tuint16_t utf16_print_name[ 512 ];\n\n\tlibcerror_error_t *error                               = NULL;\n\tlibfsntfs_reparse_point_values_t *reparse_point_values = NULL;\n\tint result                                             = 0;\n\tint utf16_print_name_is_set                            = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_reparse_point_values_initialize(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t          reparse_point_values,\n\t          utf16_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tutf16_print_name_is_set = result;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t          NULL,\n\t          utf16_print_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( utf16_print_name_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t\t          reparse_point_values,\n\t\t          NULL,\n\t\t          512,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t\t          reparse_point_values,\n\t\t          utf16_print_name,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\n\t\tresult = libfsntfs_reparse_point_values_get_utf16_print_name(\n\t\t          reparse_point_values,\n\t\t          utf16_print_name,\n\t\t          (size_t) SSIZE_MAX + 1,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\t/* Clean up\n\t */\n\tresult = libfsntfs_reparse_point_values_free(\n\t          &reparse_point_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"reparse_point_values\",\n\t reparse_point_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( reparse_point_values != NULL )\n\t{\n\t\tlibfsntfs_reparse_point_values_free(\n\t\t &reparse_point_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_initialize\",\n\t fsntfs_test_reparse_point_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_free\",\n\t fsntfs_test_reparse_point_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_read_data\",\n\t fsntfs_test_reparse_point_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_read_from_mft_attribute\",\n\t fsntfs_test_reparse_point_values_read_from_mft_attribute );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_tag\",\n\t fsntfs_test_reparse_point_values_get_tag );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf8_substitute_name_size\",\n\t fsntfs_test_reparse_point_values_get_utf8_substitute_name_size );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf8_substitute_name\",\n\t fsntfs_test_reparse_point_values_get_utf8_substitute_name );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf16_substitute_name_size\",\n\t fsntfs_test_reparse_point_values_get_utf16_substitute_name_size );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf16_substitute_name\",\n\t fsntfs_test_reparse_point_values_get_utf16_substitute_name );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf8_print_name_size\",\n\t fsntfs_test_reparse_point_values_get_utf8_print_name_size );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf8_print_name\",\n\t fsntfs_test_reparse_point_values_get_utf8_print_name );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf16_print_name_size\",\n\t fsntfs_test_reparse_point_values_get_utf16_print_name_size );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_reparse_point_values_get_utf16_print_name\",\n\t fsntfs_test_reparse_point_values_get_utf16_print_name );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_rwlock.c",
    "content": "/*\n * Read/Write lock functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include <errno.h>\n\n#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ )\n#define __USE_GNU\n#include <dlfcn.h>\n#undef __USE_GNU\n#endif\n\n#include \"fsntfs_test_rwlock.h\"\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\nstatic int (*fsntfs_test_real_pthread_rwlock_destroy)(pthread_rwlock_t *) = NULL;\nstatic int (*fsntfs_test_real_pthread_rwlock_rdlock)(pthread_rwlock_t *)  = NULL;\nstatic int (*fsntfs_test_real_pthread_rwlock_wrlock)(pthread_rwlock_t *)  = NULL;\nstatic int (*fsntfs_test_real_pthread_rwlock_unlock)(pthread_rwlock_t *)  = NULL;\n\nint fsntfs_test_pthread_rwlock_destroy_attempts_before_fail               = -1;\nint fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail                = -1;\nint fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail                = -1;\nint fsntfs_test_pthread_rwlock_unlock_attempts_before_fail                = -1;\n\n#if defined( TODO )\n\n/* TODO currently disabled since this causes the tests to segfault on Ubuntu 14.04\n */\nstatic int (*fsntfs_test_real_pthread_rwlock_init)(pthread_rwlock_t *, const pthread_rwlockattr_t *) = NULL;\n\nint fsntfs_test_pthread_rwlock_init_attempts_before_fail                                             = -1;\n\n/* Custom pthread_rwlock_init for testing error cases\n * Returns 0 if successful or an error value otherwise\n */\nint pthread_rwlock_init(\n     pthread_rwlock_t *rwlock,\n     const pthread_rwlockattr_t *attr )\n{\n\tint result = 0;\n\n\tif( fsntfs_test_real_pthread_rwlock_init == NULL )\n\t{\n\t\tfsntfs_test_real_pthread_rwlock_init = dlsym(\n\t\t                                        RTLD_NEXT,\n\t\t                                        \"pthread_rwlock_init\" );\n\t}\n\tif( fsntfs_test_pthread_rwlock_init_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_init_attempts_before_fail = -1;\n\n\t\treturn( EBUSY );\n\t}\n\telse if( fsntfs_test_pthread_rwlock_init_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_init_attempts_before_fail--;\n\t}\n\tresult = fsntfs_test_real_pthread_rwlock_init(\n\t          rwlock,\n\t          attr );\n\n\treturn( result );\n}\n\n#endif /* defined( TODO ) */\n\n/* Custom pthread_rwlock_destroy for testing error cases\n * Returns 0 if successful or an error value otherwise\n */\nint pthread_rwlock_destroy(\n     pthread_rwlock_t *rwlock )\n{\n\tint result = 0;\n\n\tif( fsntfs_test_real_pthread_rwlock_destroy == NULL )\n\t{\n\t\tfsntfs_test_real_pthread_rwlock_destroy = dlsym(\n\t\t                                           RTLD_NEXT,\n\t\t                                           \"pthread_rwlock_destroy\" );\n\t}\n\tif( fsntfs_test_pthread_rwlock_destroy_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_destroy_attempts_before_fail = -1;\n\n\t\treturn( EBUSY );\n\t}\n\telse if( fsntfs_test_pthread_rwlock_destroy_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_destroy_attempts_before_fail--;\n\t}\n\tresult = fsntfs_test_real_pthread_rwlock_destroy(\n\t          rwlock );\n\n\treturn( result );\n}\n\n/* Custom pthread_rwlock_rdlock for testing error cases\n * Returns 0 if successful or an error value otherwise\n */\nint pthread_rwlock_rdlock(\n     pthread_rwlock_t *rwlock )\n{\n\tint result = 0;\n\n\tif( fsntfs_test_real_pthread_rwlock_rdlock == NULL )\n\t{\n\t\tfsntfs_test_real_pthread_rwlock_rdlock = dlsym(\n\t\t                                          RTLD_NEXT,\n\t\t                                          \"pthread_rwlock_rdlock\" );\n\t}\n\tif( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail = -1;\n\n\t\treturn( EBUSY );\n\t}\n\telse if( fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_rdlock_attempts_before_fail--;\n\t}\n\tresult = fsntfs_test_real_pthread_rwlock_rdlock(\n\t          rwlock );\n\n\treturn( result );\n}\n\n/* Custom pthread_rwlock_wrlock for testing error cases\n * Returns 0 if successful or an error value otherwise\n */\nint pthread_rwlock_wrlock(\n     pthread_rwlock_t *rwlock )\n{\n\tint result = 0;\n\n\tif( fsntfs_test_real_pthread_rwlock_wrlock == NULL )\n\t{\n\t\tfsntfs_test_real_pthread_rwlock_wrlock = dlsym(\n\t\t                                          RTLD_NEXT,\n\t\t                                          \"pthread_rwlock_wrlock\" );\n\t}\n\tif( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail == 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail = -1;\n\n\t\treturn( EBUSY );\n\t}\n\telse if( fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_wrlock_attempts_before_fail--;\n\t}\n\tresult = fsntfs_test_real_pthread_rwlock_wrlock(\n\t          rwlock );\n\n\treturn( result );\n}\n\n/* Custom pthread_rwlock_unlock for testing error cases\n * Returns 0 if successful or an error value otherwise\n */\nint pthread_rwlock_unlock(\n     pthread_rwlock_t *rwlock )\n{\n\tint result = 0;\n\n\tif( fsntfs_test_real_pthread_rwlock_unlock == NULL )\n\t{\n\t\tfsntfs_test_real_pthread_rwlock_unlock = dlsym(\n\t\t                                          RTLD_NEXT,\n\t\t                                          \"pthread_rwlock_unlock\" );\n\t}\n\tif( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail == 0 )\n\t{\n\t\t/* Unlock the lock otherwise it can enter a nondeterministic state\n\t\t */\n\t\tfsntfs_test_real_pthread_rwlock_unlock(\n\t\t rwlock );\n\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail = -1;\n\n\t\treturn( EBUSY );\n\t}\n\telse if( fsntfs_test_pthread_rwlock_unlock_attempts_before_fail > 0 )\n\t{\n\t\tfsntfs_test_pthread_rwlock_unlock_attempts_before_fail--;\n\t}\n\tresult = fsntfs_test_real_pthread_rwlock_unlock(\n\t          rwlock );\n\n\treturn( result );\n}\n\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_rwlock.h",
    "content": "/*\n * Read/Write lock functions for testing\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_RWLOCK_H )\n#define _FSNTFS_TEST_RWLOCK_H\n\n#include <common.h>\n\n#include \"fsntfs_test_libfsntfs.h\"\n\n#if defined( __cplusplus )\nextern \"C\" {\n#endif\n\n#if defined( LIBFSNTFS_HAVE_MULTI_THREAD_SUPPORT ) && defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ )\n#define HAVE_FSNTFS_TEST_RWLOCK\t\t1\n#endif\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\nextern int fsntfs_test_pthread_rwlock_init_attempts_before_fail;\n\nextern int fsntfs_test_pthread_rwlock_destroy_attempts_before_fail;\n\nextern int fsntfs_test_pthread_rwlock_rdlock_attempts_before_fail;\n\nextern int fsntfs_test_pthread_rwlock_wrlock_attempts_before_fail;\n\nextern int fsntfs_test_pthread_rwlock_unlock_attempts_before_fail;\n\n#endif /* defined( HAVE_FSNTFS_TEST_RWLOCK ) */\n\n#if defined( __cplusplus )\n}\n#endif\n\n#endif /* !defined( _FSNTFS_TEST_RWLOCK_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_sds_index_value.c",
    "content": "/*\n * Library sds_index_value type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_sds_index_value.h\"\n\nuint8_t fsntfs_test_sds_index_value_data1[ 20 ] = {\n\t0x14, 0x38, 0x78, 0x2c, 0x06, 0x01, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xb4, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_sds_index_value_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_sds_index_value_initialize(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_sds_index_value_t *sds_index_value = NULL;\n\tint result                                   = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests              = 1;\n\tint number_of_memset_fail_tests              = 1;\n\tint test_number                              = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_sds_index_value_initialize(\n\t          &sds_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"sds_index_value\",\n\t sds_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_sds_index_value_free(\n\t          &sds_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"sds_index_value\",\n\t sds_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_sds_index_value_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tsds_index_value = (libfsntfs_sds_index_value_t *) 0x12345678UL;\n\n\tresult = libfsntfs_sds_index_value_initialize(\n\t          &sds_index_value,\n\t          &error );\n\n\tsds_index_value = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_sds_index_value_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_sds_index_value_initialize(\n\t\t          &sds_index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( sds_index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_sds_index_value_free(\n\t\t\t\t &sds_index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"sds_index_value\",\n\t\t\t sds_index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_sds_index_value_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_sds_index_value_initialize(\n\t\t          &sds_index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( sds_index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_sds_index_value_free(\n\t\t\t\t &sds_index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"sds_index_value\",\n\t\t\t sds_index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( sds_index_value != NULL )\n\t{\n\t\tlibfsntfs_sds_index_value_free(\n\t\t &sds_index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_sds_index_value_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_sds_index_value_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_sds_index_value_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_sds_index_value_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_sds_index_value_read_data(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_sds_index_value_t *sds_index_value = NULL;\n\tint result                                   = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_sds_index_value_initialize(\n\t          &sds_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"sds_index_value\",\n\t sds_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_sds_index_value_read_data(\n\t          sds_index_value,\n\t          fsntfs_test_sds_index_value_data1,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_sds_index_value_read_data(\n\t          NULL,\n\t          fsntfs_test_sds_index_value_data1,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_sds_index_value_read_data(\n\t          sds_index_value,\n\t          NULL,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_sds_index_value_read_data(\n\t          sds_index_value,\n\t          fsntfs_test_sds_index_value_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_sds_index_value_read_data(\n\t          sds_index_value,\n\t          fsntfs_test_sds_index_value_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_sds_index_value_free(\n\t          &sds_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"sds_index_value\",\n\t sds_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( sds_index_value != NULL )\n\t{\n\t\tlibfsntfs_sds_index_value_free(\n\t\t &sds_index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_sds_index_value_initialize\",\n\t fsntfs_test_sds_index_value_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_sds_index_value_free\",\n\t fsntfs_test_sds_index_value_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_sds_index_value_read_data\",\n\t fsntfs_test_sds_index_value_read_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_security_descriptor_index.c",
    "content": "/*\n * Library security_descriptor_index type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_security_descriptor_index.h\"\n\nuint8_t fsntfs_test_security_descriptor_index_data1[ 80 ] = {\n\t0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xfc, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x24, 0x00, 0x53, 0x00, 0x44, 0x00, 0x53, 0x00, 0x21, 0x41, 0xd2, 0x50, 0x00, 0xf8, 0xff, 0xff };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_security_descriptor_index_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_initialize(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle                                 = NULL;\n\tlibcerror_error_t *error                                         = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                 = NULL;\n\tlibfsntfs_mft_attribute_t *data_attribute                        = NULL;\n\tlibfsntfs_security_descriptor_index_t *security_descriptor_index = NULL;\n\tint result                                                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                  = 1;\n\tint number_of_memset_fail_tests                                  = 1;\n\tint test_number                                                  = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_attribute\",\n\t data_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          data_attribute,\n\t          io_handle,\n\t          fsntfs_test_security_descriptor_index_data1,\n\t          80,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_initialize(\n\t          &security_descriptor_index,\n\t          io_handle,\n\t          file_io_handle,\n\t          data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_index\",\n\t security_descriptor_index );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_index_free(\n\t          &security_descriptor_index,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_index\",\n\t security_descriptor_index );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_initialize(\n\t          NULL,\n\t          io_handle,\n\t          file_io_handle,\n\t          data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tsecurity_descriptor_index = (libfsntfs_security_descriptor_index_t *) 0x12345678UL;\n\n\tresult = libfsntfs_security_descriptor_index_initialize(\n\t          &security_descriptor_index,\n\t          io_handle,\n\t          file_io_handle,\n\t          data_attribute,\n\t          &error );\n\n\tsecurity_descriptor_index = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_index_initialize(\n\t          &security_descriptor_index,\n\t          io_handle,\n\t          file_io_handle,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_index_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_index_initialize(\n\t\t          &security_descriptor_index,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          data_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_index != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_index_free(\n\t\t\t\t &security_descriptor_index,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_index\",\n\t\t\t security_descriptor_index );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_index_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_index_initialize(\n\t\t          &security_descriptor_index,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          data_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_index != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_index_free(\n\t\t\t\t &security_descriptor_index,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_index\",\n\t\t\t security_descriptor_index );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_mft_attribute_free(\n\t          &data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_attribute\",\n\t data_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_index != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_free(\n\t\t &security_descriptor_index,\n\t\t NULL );\n\t}\n\tif( data_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &data_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_index_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_initialize\",\n\t fsntfs_test_security_descriptor_index_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_free\",\n\t fsntfs_test_security_descriptor_index_free );\n\n\t/* TODO: add tests for libfsntfs_security_descriptor_index_read_sii_index */\n\n\t/* TODO: add tests for libfsntfs_security_descriptor_index_get_security_descriptor_by_identifier */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_security_descriptor_index_value.c",
    "content": "/*\n * Library security_descriptor_index_value type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcdata.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_security_descriptor_index_value.h\"\n\nuint8_t fsntfs_test_security_descriptor_index_value_data1[ 20 ] = {\n\t0xcb, 0xc6, 0xfe, 0x32, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x78, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_security_descriptor_index_value_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_value_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                                     = NULL;\n\tlibfsntfs_security_descriptor_index_value_t *security_descriptor_index_value = NULL;\n\tint result                                                                   = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                              = 1;\n\tint number_of_memset_fail_tests                                              = 1;\n\tint test_number                                                              = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          &security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_index_value\",\n\t security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_index_value_free(\n\t          &security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_index_value\",\n\t security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tsecurity_descriptor_index_value = (libfsntfs_security_descriptor_index_value_t *) 0x12345678UL;\n\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          &security_descriptor_index_value,\n\t          &error );\n\n\tsecurity_descriptor_index_value = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_index_value_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t\t          &security_descriptor_index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t\t\t &security_descriptor_index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_index_value\",\n\t\t\t security_descriptor_index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_index_value_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t\t          &security_descriptor_index_value,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_index_value != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t\t\t &security_descriptor_index_value,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_index_value\",\n\t\t\t security_descriptor_index_value );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_index_value != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t &security_descriptor_index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_index_value_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_value_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_index_value_compare function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_value_compare(\n     void )\n{\n\tlibcerror_error_t *error                                                            = NULL;\n\tlibfsntfs_security_descriptor_index_value_t *first_security_descriptor_index_value  = NULL;\n\tlibfsntfs_security_descriptor_index_value_t *second_security_descriptor_index_value = NULL;\n\tint result                                                                          = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          &first_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"first_security_descriptor_index_value\",\n\t first_security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          &second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"second_security_descriptor_index_value\",\n\t second_security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tfirst_security_descriptor_index_value->identifier  = 1;\n\tsecond_security_descriptor_index_value->identifier = 1;\n\n\tresult = libfsntfs_security_descriptor_index_value_compare(\n\t          first_security_descriptor_index_value,\n\t          second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBCDATA_COMPARE_EQUAL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tfirst_security_descriptor_index_value->identifier  = 1;\n\tsecond_security_descriptor_index_value->identifier = 2;\n\n\tresult = libfsntfs_security_descriptor_index_value_compare(\n\t          first_security_descriptor_index_value,\n\t          second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBCDATA_COMPARE_LESS );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tfirst_security_descriptor_index_value->identifier  = 2;\n\tsecond_security_descriptor_index_value->identifier = 1;\n\n\tresult = libfsntfs_security_descriptor_index_value_compare(\n\t          first_security_descriptor_index_value,\n\t          second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t LIBCDATA_COMPARE_GREATER );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_compare(\n\t          NULL,\n\t          second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_index_value_compare(\n\t          first_security_descriptor_index_value,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_free(\n\t          &second_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"second_security_descriptor_index_value\",\n\t second_security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_index_value_free(\n\t          &first_security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"first_security_descriptor_index_value\",\n\t first_security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( second_security_descriptor_index_value != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t &second_security_descriptor_index_value,\n\t\t NULL );\n\t}\n\tif( first_security_descriptor_index_value != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t &first_security_descriptor_index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_index_value_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_index_value_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                         = NULL;\n\tlibfsntfs_security_descriptor_index_value_t *security_descriptor_index_value = NULL;\n\tint result                                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_initialize(\n\t          &security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_index_value\",\n\t security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_read_data(\n\t          security_descriptor_index_value,\n\t          fsntfs_test_security_descriptor_index_value_data1,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_read_data(\n\t          NULL,\n\t          fsntfs_test_security_descriptor_index_value_data1,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_index_value_read_data(\n\t          security_descriptor_index_value,\n\t          NULL,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_index_value_read_data(\n\t          security_descriptor_index_value,\n\t          fsntfs_test_security_descriptor_index_value_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_index_value_read_data(\n\t          security_descriptor_index_value,\n\t          fsntfs_test_security_descriptor_index_value_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_index_value_free(\n\t          &security_descriptor_index_value,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_index_value\",\n\t security_descriptor_index_value );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_index_value != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_index_value_free(\n\t\t &security_descriptor_index_value,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_value_initialize\",\n\t fsntfs_test_security_descriptor_index_value_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_value_free\",\n\t fsntfs_test_security_descriptor_index_value_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_value_compare\",\n\t fsntfs_test_security_descriptor_index_value_compare );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_index_value_read_data\",\n\t fsntfs_test_security_descriptor_index_value_read_data );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_security_descriptor_values.c",
    "content": "/*\n * Library security_descriptor_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfdata.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_security_descriptor_values.h\"\n\nuint8_t fsntfs_test_security_descriptor_values_data1[ 128 ] = {\n\t0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00,\n\t0x64, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x80, 0x48, 0x00, 0x00, 0x00,\n\t0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x34, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x89, 0x00, 0x12, 0x00, 0x01, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x89, 0x00, 0x12, 0x00,\n\t0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,\n\t0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Reads data from the current offset into a buffer\n * Callback for the compressed block descriptor data stream\n * Returns the number of bytes read or -1 on error\n */\nssize_t fsntfs_test_security_descriptor_values_read_segment_data(\n         intptr_t *data_handle FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         libbfio_handle_t *file_io_handle,\n         int segment_index FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         int segment_file_index FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         uint8_t *segment_data,\n         size_t segment_data_size,\n         uint32_t segment_flags FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         uint8_t read_flags FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_security_descriptor_values_read_segment_data\";\n\tssize_t read_count    = 0;\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( data_handle )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( segment_index )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( segment_file_index )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( segment_flags )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( read_flags )\n\n\tread_count = libbfio_handle_read_buffer(\n\t              file_io_handle,\n\t              segment_data,\n\t              segment_data_size,\n\t              error );\n\n\tif( read_count != (ssize_t) segment_data_size )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_READ_FAILED,\n\t\t \"%s: unable to read segment data.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\treturn( read_count );\n}\n\n/* Seeks a certain offset of the data\n * Callback for the cluster block stream\n * Returns the offset if seek is successful or -1 on error\n */\noff64_t fsntfs_test_security_descriptor_values_seek_segment_offset(\n         intptr_t *data_handle FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         libbfio_handle_t *file_io_handle,\n         int segment_index FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         int segment_file_index FSNTFS_TEST_ATTRIBUTE_UNUSED,\n         off64_t segment_offset,\n         libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_security_descriptor_values_seek_segment_offset\";\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( data_handle )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( segment_index )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( segment_file_index )\n\n\tif( libbfio_handle_seek_offset(\n\t     file_io_handle,\n\t     segment_offset,\n\t     SEEK_SET,\n\t     error ) == -1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_SEEK_FAILED,\n\t\t \"%s: unable to seek segment offset: %\" PRIi64 \" (0x%08\" PRIx64 \").\",\n\t\t function,\n\t\t segment_offset,\n\t\t segment_offset );\n\n\t\treturn( -1 );\n\t}\n\treturn( segment_offset );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint result                                                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                    = 1;\n\tint number_of_memset_fail_tests                                    = 1;\n\tint test_number                                                    = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tsecurity_descriptor_values = (libfsntfs_security_descriptor_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tsecurity_descriptor_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_values_initialize(\n\t\t          &security_descriptor_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_values_free(\n\t\t\t\t &security_descriptor_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_values\",\n\t\t\t security_descriptor_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_security_descriptor_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_security_descriptor_values_initialize(\n\t\t          &security_descriptor_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( security_descriptor_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_security_descriptor_values_free(\n\t\t\t\t &security_descriptor_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"security_descriptor_values\",\n\t\t\t security_descriptor_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint result                                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_data(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_data(\n\t          security_descriptor_values,\n\t          NULL,\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_data(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_read_buffer function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_read_buffer(\n     void )\n{\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint result                                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          NULL,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          NULL,\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_security_descriptor_values_read_buffer with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\t/* Test libfsntfs_security_descriptor_values_read_buffer with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Test libfsntfs_security_descriptor_values_read_buffer with libfsntfs_security_descriptor_values_read_data failing\n\t */\n/* TODO implement */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_read_stream function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_read_stream(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle                                   = NULL;\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfdata_stream_t *data_stream                                     = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint element_index                                                  = 0;\n\tint result                                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_stream_initialize(\n\t          &data_stream,\n\t          NULL,\n\t          NULL,\n\t          NULL,\n\t          NULL,\n\t          (ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &fsntfs_test_security_descriptor_values_read_segment_data,\n\t          NULL,\n\t          (off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &fsntfs_test_security_descriptor_values_seek_segment_offset,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_stream_append_segment(\n\t          data_stream,\n\t          &element_index,\n\t          0,\n\t          0,\n\t          100,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_stream(\n\t          security_descriptor_values,\n\t          file_io_handle,\n\t          data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_stream(\n\t          security_descriptor_values,\n\t          file_io_handle,\n\t          data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_stream(\n\t          NULL,\n\t          file_io_handle,\n\t          data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO implement */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfdata_stream_free(\n\t          &data_stream,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_stream\",\n\t data_stream );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libbfio_handle_free(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n\tif( data_stream != NULL )\n\t{\n\t\tlibfdata_stream_free(\n\t\t &data_stream,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                   = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                           = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint result                                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_security_descriptor_values_data1,\n\t          128,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_from_mft_attribute(\n\t          security_descriptor_values,\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_read_from_mft_attribute(\n\t          security_descriptor_values,\n\t          NULL,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_get_data_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_get_data_size(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t data_size         = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_get_data_size(\n\t          security_descriptor_values,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"data_size\",\n\t data_size,\n\t (size_t) 100 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_get_data_size(\n\t          NULL,\n\t          &data_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_get_data_size(\n\t          security_descriptor_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_security_descriptor_values_get_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_security_descriptor_values_get_data(\n     libfsntfs_security_descriptor_values_t *security_descriptor_values )\n{\n\tuint8_t data[ 128 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          data,\n\t          128,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          NULL,\n\t          data,\n\t          128,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          NULL,\n\t          128,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          data,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          data,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED )\n\n\t/* Test libfsntfs_security_descriptor_values_get_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_security_descriptor_values_get_data(\n\t          security_descriptor_values,\n\t          data,\n\t          128,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) && defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                                           = NULL;\n\tlibfsntfs_security_descriptor_values_t *security_descriptor_values = NULL;\n\tint result                                                         = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_initialize\",\n\t fsntfs_test_security_descriptor_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_free\",\n\t fsntfs_test_security_descriptor_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_read_data\",\n\t fsntfs_test_security_descriptor_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_read_buffer\",\n\t fsntfs_test_security_descriptor_values_read_buffer );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_read_stream\",\n\t fsntfs_test_security_descriptor_values_read_stream );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_security_descriptor_values_read_from_mft_attribute\",\n\t fsntfs_test_security_descriptor_values_read_from_mft_attribute );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize security_descriptor_values for tests\n\t */\n\tresult = libfsntfs_security_descriptor_values_initialize(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_security_descriptor_values_read_buffer(\n\t          security_descriptor_values,\n\t          &( fsntfs_test_security_descriptor_values_data1[ 24 ] ),\n\t          100,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_security_descriptor_values_get_data_size\",\n\t fsntfs_test_security_descriptor_values_get_data_size,\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_security_descriptor_values_get_data\",\n\t fsntfs_test_security_descriptor_values_get_data,\n\t security_descriptor_values );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_security_descriptor_values_free(\n\t          &security_descriptor_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"security_descriptor_values\",\n\t security_descriptor_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( security_descriptor_values != NULL )\n\t{\n\t\tlibfsntfs_security_descriptor_values_free(\n\t\t &security_descriptor_values,\n\t\t NULL );\n\t}\n#endif\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_standard_information_values.c",
    "content": "/*\n * Library standard_information_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_standard_information_values.h\"\n\nuint8_t fsntfs_test_standard_information_values_data1[ 96 ] = {\n\t0x10, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x48, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01,\n\t0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01, 0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01,\n\t0xad, 0xca, 0xbc, 0x0c, 0xdc, 0x8e, 0xd0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_standard_information_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                             = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tint result                                                           = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                      = 1;\n\tint number_of_memset_fail_tests                                      = 1;\n\tint test_number                                                      = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_standard_information_values_free(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tstandard_information_values = (libfsntfs_standard_information_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          &standard_information_values,\n\t          &error );\n\n\tstandard_information_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_standard_information_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_standard_information_values_initialize(\n\t\t          &standard_information_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( standard_information_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_standard_information_values_free(\n\t\t\t\t &standard_information_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"standard_information_values\",\n\t\t\t standard_information_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_standard_information_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_standard_information_values_initialize(\n\t\t          &standard_information_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( standard_information_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_standard_information_values_free(\n\t\t\t\t &standard_information_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"standard_information_values\",\n\t\t\t standard_information_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( standard_information_values != NULL )\n\t{\n\t\tlibfsntfs_standard_information_values_free(\n\t\t &standard_information_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                             = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tint result                                                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          standard_information_values,\n\t          &( fsntfs_test_standard_information_values_data1[ 24 ] ),\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_standard_information_values_data1[ 24 ] ),\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          standard_information_values,\n\t          NULL,\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          standard_information_values,\n\t          &( fsntfs_test_standard_information_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          standard_information_values,\n\t          &( fsntfs_test_standard_information_values_data1[ 24 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_standard_information_values_free(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( standard_information_values != NULL )\n\t{\n\t\tlibfsntfs_standard_information_values_free(\n\t\t &standard_information_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                                             = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                     = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                             = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tint result                                                           = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_standard_information_values_data1,\n\t          96,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_read_from_mft_attribute(\n\t          standard_information_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_read_from_mft_attribute(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_standard_information_values_free(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( standard_information_values != NULL )\n\t{\n\t\tlibfsntfs_standard_information_values_free(\n\t\t &standard_information_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_creation_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_creation_time(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t creation_time   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_creation_time(\n\t          standard_information_values,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_creation_time(\n\t          NULL,\n\t          &creation_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_creation_time(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error   = NULL;\n\tuint64_t modification_time = 0;\n\tint result                 = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_modification_time(\n\t          standard_information_values,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_modification_time(\n\t          NULL,\n\t          &modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_modification_time(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_access_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_access_time(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t access_time     = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_access_time(\n\t          standard_information_values,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_access_time(\n\t          NULL,\n\t          &access_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_access_time(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_entry_modification_time function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_entry_modification_time(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error         = NULL;\n\tuint64_t entry_modification_time = 0;\n\tint result                       = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_entry_modification_time(\n\t          standard_information_values,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_entry_modification_time(\n\t          NULL,\n\t          &entry_modification_time,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_entry_modification_time(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_file_attribute_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_file_attribute_flags(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint32_t file_attribute_flags = 0;\n\tint result                    = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_file_attribute_flags(\n\t          standard_information_values,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_file_attribute_flags(\n\t          NULL,\n\t          &file_attribute_flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_file_attribute_flags(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_security_descriptor_identifier function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_security_descriptor_identifier(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error                = NULL;\n\tuint32_t security_descriptor_identifier = 0;\n\tint result                              = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_security_descriptor_identifier(\n\t          standard_information_values,\n\t          &security_descriptor_identifier,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_security_descriptor_identifier(\n\t          NULL,\n\t          &security_descriptor_identifier,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_security_descriptor_identifier(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_standard_information_values_get_update_sequence_number function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_standard_information_values_get_update_sequence_number(\n     libfsntfs_standard_information_values_t *standard_information_values )\n{\n\tlibcerror_error_t *error        = NULL;\n\tuint64_t update_sequence_number = 0;\n\tint result                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_update_sequence_number(\n\t          standard_information_values,\n\t          &update_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_standard_information_values_get_update_sequence_number(\n\t          NULL,\n\t          &update_sequence_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_standard_information_values_get_update_sequence_number(\n\t          standard_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                                             = NULL;\n\tlibfsntfs_standard_information_values_t *standard_information_values = NULL;\n\tint result                                                           = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_standard_information_values_initialize\",\n\t fsntfs_test_standard_information_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_standard_information_values_free\",\n\t fsntfs_test_standard_information_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_standard_information_values_read_data\",\n\t fsntfs_test_standard_information_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"fsntfs_test_standard_information_values_read_from_mft_attribute\",\n\t fsntfs_test_standard_information_values_read_from_mft_attribute );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize standard_information_values for tests\n\t */\n\tresult = libfsntfs_standard_information_values_initialize(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_standard_information_values_read_data(\n\t          standard_information_values,\n\t          &( fsntfs_test_standard_information_values_data1[ 24 ] ),\n\t          72,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_creation_time\",\n\t fsntfs_test_standard_information_values_get_creation_time,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_modification_time\",\n\t fsntfs_test_standard_information_values_get_modification_time,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_access_time\",\n\t fsntfs_test_standard_information_values_get_access_time,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_entry_modification_time\",\n\t fsntfs_test_standard_information_values_get_entry_modification_time,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_file_attribute_flags\",\n\t fsntfs_test_standard_information_values_get_file_attribute_flags,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_security_descriptor_identifier\",\n\t fsntfs_test_standard_information_values_get_security_descriptor_identifier,\n\t standard_information_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_standard_information_values_get_update_sequence_number\",\n\t fsntfs_test_standard_information_values_get_update_sequence_number,\n\t standard_information_values );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_standard_information_values_free(\n\t          &standard_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"standard_information_values\",\n\t standard_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( standard_information_values != NULL )\n\t{\n\t\tlibfsntfs_standard_information_values_free(\n\t\t &standard_information_values,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_support.c",
    "content": "/*\n * Library support functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_getopt.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Tests the libfsntfs_get_version function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_get_version(\n     void )\n{\n\tconst char *version_string = NULL;\n\tint result                 = 0;\n\n\tversion_string = libfsntfs_get_version();\n\n\tresult = narrow_string_compare(\n\t          version_string,\n\t          LIBFSNTFS_VERSION_STRING,\n\t          9 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_get_access_flags_read function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_get_access_flags_read(\n     void )\n{\n\tint access_flags = 0;\n\n\taccess_flags = libfsntfs_get_access_flags_read();\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"access_flags\",\n\t access_flags,\n\t LIBFSNTFS_ACCESS_FLAG_READ );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_get_codepage function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_get_codepage(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint codepage             = 0;\n\tint result               = 0;\n\n\tresult = libfsntfs_get_codepage(\n\t          &codepage,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_get_codepage(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_set_codepage function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_set_codepage(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\tresult = libfsntfs_set_codepage(\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_set_codepage(\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_check_volume_signature function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_check_volume_signature(\n     const system_character_t *source )\n{\n\tchar narrow_source[ 256 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\tif( source != NULL )\n\t{\n\t\t/* Initialize test\n\t\t */\n\t\tresult = fsntfs_test_get_narrow_source(\n\t\t          source,\n\t\t          narrow_source,\n\t\t          256,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Test check volume signature\n\t\t */\n\t\tresult = libfsntfs_check_volume_signature(\n\t\t          narrow_source,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_check_volume_signature(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_check_volume_signature(\n\t          \"\",\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( source != NULL )\n\t{\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t\t/* Test libfsntfs_check_volume_signature with malloc failing in libbfio_file_initialize\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\t\tresult = libfsntfs_check_volume_signature(\n\t\t          narrow_source,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Tests the libfsntfs_check_volume_signature_wide function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_check_volume_signature_wide(\n     const system_character_t *source )\n{\n\twchar_t wide_source[ 256 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\tif( source != NULL )\n\t{\n\t\t/* Initialize test\n\t\t */\n\t\tresult = fsntfs_test_get_wide_source(\n\t\t          source,\n\t\t          wide_source,\n\t\t          256,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Test check volume signature\n\t\t */\n\t\tresult = libfsntfs_check_volume_signature_wide(\n\t\t          wide_source,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_check_volume_signature_wide(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_check_volume_signature_wide(\n\t          L\"\",\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( source != NULL )\n\t{\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t\t/* Test libfsntfs_check_volume_signature_wide with malloc failing in libbfio_file_initialize\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\t\tresult = libfsntfs_check_volume_signature_wide(\n\t\t          wide_source,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Tests the libfsntfs_check_volume_signature_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_check_volume_signature_file_io_handle(\n     const system_character_t *source )\n{\n\tuint8_t empty_block[ 8192 ];\n\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tvoid *memset_result              = NULL;\n\tsize_t source_length             = 0;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tmemset_result = memory_set(\n\t                 empty_block,\n\t                 0,\n\t                 sizeof( uint8_t ) * 8192 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"memset_result\",\n\t memset_result );\n\n\tif( source != NULL )\n\t{\n\t\t/* Initialize test\n\t\t */\n\t\tresult = libbfio_file_initialize(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"file_io_handle\",\n\t\t file_io_handle );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tsource_length = system_string_length(\n\t\t                 source );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libbfio_file_set_name_wide(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          source_length,\n\t\t          &error );\n#else\n\t\tresult = libbfio_file_set_name(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          source_length,\n\t\t          &error );\n#endif\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tresult = libbfio_handle_open(\n\t\t          file_io_handle,\n\t\t          LIBBFIO_OPEN_READ,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\t/* Test check volume signature\n\t\t */\n\t\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tif( source != NULL )\n\t{\n\t\tresult = libbfio_handle_close(\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tresult = libbfio_handle_free(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"file_io_handle\",\n\t\t file_io_handle );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test check volume signature with data too small\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          empty_block,\n\t          sizeof( uint8_t ) * 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test check volume signature with empty block\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          empty_block,\n\t          sizeof( uint8_t ) * 8192,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t          file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc,\n     wchar_t * const argv[] )\n#else\nint main(\n     int argc,\n     char * const argv[] )\n#endif\n{\n\tlibcerror_error_t *error          = NULL;\n\tsystem_character_t *option_offset = NULL;\n\tsystem_character_t *source        = NULL;\n\tsystem_integer_t option           = 0;\n\tsize_t string_length              = 0;\n\toff64_t volume_offset             = 0;\n\tint result                        = 0;\n\n\twhile( ( option = fsntfs_test_getopt(\n\t                   argc,\n\t                   argv,\n\t                   _SYSTEM_STRING( \"o:\" ) ) ) != (system_integer_t) -1 )\n\t{\n\t\tswitch( option )\n\t\t{\n\t\t\tcase (system_integer_t) '?':\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Invalid argument: %\" PRIs_SYSTEM \".\\n\",\n\t\t\t\t argv[ optind - 1 ] );\n\n\t\t\t\treturn( EXIT_FAILURE );\n\n\t\t\tcase (system_integer_t) 'o':\n\t\t\t\toption_offset = optarg;\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif( optind < argc )\n\t{\n\t\tsource = argv[ optind ];\n\t}\n\tif( option_offset != NULL )\n\t{\n\t\tstring_length = system_string_length(\n\t\t                 option_offset );\n\n\t\tresult = fsntfs_test_system_string_copy_from_64_bit_in_decimal(\n\t\t          option_offset,\n\t\t          string_length + 1,\n\t\t          (uint64_t *) &volume_offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\t}\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_get_version\",\n\t fsntfs_test_get_version );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_get_access_flags_read\",\n\t fsntfs_test_get_access_flags_read );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_get_codepage\",\n\t fsntfs_test_get_codepage );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_set_codepage\",\n\t fsntfs_test_set_codepage );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\tif( ( source != NULL )\n\t && ( volume_offset == 0 ) )\n\t{\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_check_volume_signature\",\n\t\t fsntfs_test_check_volume_signature,\n\t\t source );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_check_volume_signature_wide\",\n\t\t fsntfs_test_check_volume_signature_wide,\n\t\t source );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_check_volume_signature_file_io_handle\",\n\t\t fsntfs_test_check_volume_signature_file_io_handle,\n\t\t source );\n\t}\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_bodyfile.c",
    "content": "/*\n * Tools bodyfile functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/bodyfile.h\"\n\n/* Tests the bodyfile_path_string_copy_from_file_entry_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_bodyfile_path_string_copy_from_file_entry_path(\n     void )\n{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tsystem_character_t file_entry_path3[ 5 ] = { 't', 'e', 0x2028, 't', 0 };\n#else\n\tsystem_character_t file_entry_path3[ 7 ] = { 't', 'e', 0xe2, 0x80, 0xa8, 't', 0 };\n#endif\n\tsystem_character_t file_entry_path1[ 5 ] = { 't', 'e', 's', 't', 0 };\n\tsystem_character_t file_entry_path2[ 5 ] = { 't', 'e', 0x03, 't', 0 };\n\tsystem_character_t file_entry_path4[ 5 ] = { 't', 'e', '\\\\', 't', 0 };\n\tsystem_character_t expected_path1[ 5 ]   = { 't', 'e', 's', 't', 0 };\n\tsystem_character_t expected_path2[ 8 ]   = { 't', 'e', '\\\\', 'x', '0', '3', 't', 0 };\n\tsystem_character_t expected_path3[ 14 ]  = { 't', 'e', '\\\\', 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n\tsystem_character_t expected_path4[ 6 ]   = { 't', 'e', '\\\\', '\\\\', 't', 0 };\n\tlibcerror_error_t *error                 = NULL;\n\tsystem_character_t *path                 = NULL;\n\tsize_t path_size                         = 0;\n\tint result                               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path1,\n\t          5 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path2,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path2,\n\t          8 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          4,\n\t          &error );\n#else\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          6,\n\t          &error );\n#endif\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n#else\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 61 );\n#endif\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path3,\n\t          14 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path4,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path4,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n/* TODO add test for escaping | */\n\n\t/* Test error cases\n\t */\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          NULL,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          NULL,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          NULL,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = bodyfile_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( path != NULL )\n\t{\n\t\tmemory_free(\n\t\t path );\n\t}\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"bodyfile_path_string_copy_from_file_entry_path\",\n\t fsntfs_test_tools_bodyfile_path_string_copy_from_file_entry_path )\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_digest_hash.c",
    "content": "/*\n * Tools digest_hash functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <narrow_string.h>\n#include <types.h>\n#include <system_string.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/digest_hash.h\"\n\n/* Tests the digest_hash_copy_to_string function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_digest_hash_copy_to_string(\n     void )\n{\n\tchar string[ 64 ];\n\n\tuint8_t md5_hash[ 16 ] = {\n\t\t0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e };\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = digest_hash_copy_to_string(\n\t          md5_hash,\n\t          16,\n\t          string,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          string,\n\t          \"d41d8cd98f00b204e9800998ecf8427e\",\n\t          33 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\t/* Test error cases\n\t */\n\tresult = digest_hash_copy_to_string(\n\t          NULL,\n\t          16,\n\t          string,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = digest_hash_copy_to_string(\n\t          md5_hash,\n\t          (size_t) SSIZE_MAX + 1,\n\t          string,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = digest_hash_copy_to_string(\n\t          md5_hash,\n\t          16,\n\t          NULL,\n\t          64,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = digest_hash_copy_to_string(\n\t          md5_hash,\n\t          16,\n\t          string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = digest_hash_copy_to_string(\n\t          md5_hash,\n\t          16,\n\t          string,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"digest_hash_copy_to_string\",\n\t fsntfs_test_tools_digest_hash_copy_to_string );\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_info_handle.c",
    "content": "/*\n * Tools info_handle type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/info_handle.h\"\n\n/* Tests the info_handle_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_info_handle_initialize(\n     void )\n{\n\tinfo_handle_t *info_handle      = NULL;\n\tlibcerror_error_t *error        = NULL;\n\tint result                      = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests = 1;\n\tint number_of_memset_fail_tests = 1;\n\tint test_number                 = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = info_handle_initialize(\n\t          &info_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"info_handle\",\n\t info_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = info_handle_free(\n\t          &info_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"info_handle\",\n\t info_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = info_handle_initialize(\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tinfo_handle = (info_handle_t *) 0x12345678UL;\n\n\tresult = info_handle_initialize(\n\t          &info_handle,\n\t          0,\n\t          &error );\n\n\tinfo_handle = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test info_handle_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = info_handle_initialize(\n\t\t          &info_handle,\n\t\t          0,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( info_handle != NULL )\n\t\t\t{\n\t\t\t\tinfo_handle_free(\n\t\t\t\t &info_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"info_handle\",\n\t\t\t info_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test info_handle_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = info_handle_initialize(\n\t\t          &info_handle,\n\t\t          0,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( info_handle != NULL )\n\t\t\t{\n\t\t\t\tinfo_handle_free(\n\t\t\t\t &info_handle,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"info_handle\",\n\t\t\t info_handle );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( info_handle != NULL )\n\t{\n\t\tinfo_handle_free(\n\t\t &info_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the info_handle_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_info_handle_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = info_handle_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"info_handle_initialize\",\n\t fsntfs_test_tools_info_handle_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"info_handle_free\",\n\t fsntfs_test_tools_info_handle_free );\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_mount_path_string.c",
    "content": "/*\n * Tools mount_path_string functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libcpath.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/mount_path_string.h\"\n\n#if defined( WINAPI )\n#define ESCAPE_CHARACTER (system_character_t) '^'\n#else\n#define ESCAPE_CHARACTER (system_character_t) '\\\\'\n#endif\n\n/* Tests the mount_path_string_copy_hexadecimal_to_integer_32_bit function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_mount_path_string_copy_hexadecimal_to_integer_32_bit(\n     void )\n{\n\tsystem_character_t error_string[ 5 ] = { '2', '0', 'Z', '8', 0 };\n\tsystem_character_t string[ 5 ]       = { '2', '0', '2', '8', 0 };\n\tlibcerror_error_t *error             = NULL;\n\tuint32_t value_32bit                 = 0;\n\tint result                           = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"value_32bit\",\n\t value_32bit,\n\t (uint32_t) 0x2028 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          NULL,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          0,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          4,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_hexadecimal_to_integer_32_bit(\n\t          error_string,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the mount_path_string_copy_from_file_entry_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_mount_path_string_copy_from_file_entry_path(\n     void )\n{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tsystem_character_t file_entry_path3[ 5 ] = { 't', 'e', 0x2028, 't', 0 };\n\tsystem_character_t file_entry_path4[ 5 ] = { 't', 'e', '\\\\', 't', 0 };\n\tsystem_character_t file_entry_path5[ 5 ] = { 't', 'e', ESCAPE_CHARACTER, 't', 0 };\n\tsystem_character_t expected_path2[ 8 ]   = { 't', 'e', ESCAPE_CHARACTER, 'x', '0', '3', 't', 0 };\n\tsystem_character_t expected_path3[ 14 ]  = { 't', 'e', ESCAPE_CHARACTER, 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n\tsystem_character_t expected_path4[ 8 ]   = { 't', 'e', ESCAPE_CHARACTER, 'x', '5', 'c', 't', 0 };\n\tsystem_character_t expected_path5[ 6 ]   = { 't', 'e', ESCAPE_CHARACTER, ESCAPE_CHARACTER, 't', 0 };\n#else\n\tsystem_character_t file_entry_path3[ 7 ] = { 't', 'e', 0xe2, 0x80, 0xa8, 't', 0 };\n\tsystem_character_t file_entry_path4[ 5 ] = { 't', 'e', LIBCPATH_SEPARATOR, 't', 0 };\n\tsystem_character_t file_entry_path5[ 5 ] = { 't', 'e', ESCAPE_CHARACTER, 't', 0 };\n\tsystem_character_t expected_path2[ 8 ]   = { 't', 'e', ESCAPE_CHARACTER, 'x', '0', '3', 't', 0 };\n\tsystem_character_t expected_path3[ 14 ]  = { 't', 'e', ESCAPE_CHARACTER, 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n#if defined( WINAPI )\n\tsystem_character_t expected_path4[ 8 ]   = { 't', 'e', ESCAPE_CHARACTER, 'x', '5', 'c', 't', 0 };\n#else\n\tsystem_character_t expected_path4[ 8 ]   = { 't', 'e', ESCAPE_CHARACTER, 'x', '2', 'f', 't', 0 };\n#endif\n\tsystem_character_t expected_path5[ 6 ]   = { 't', 'e', ESCAPE_CHARACTER, ESCAPE_CHARACTER, 't', 0 };\n#endif\n\n\tsystem_character_t file_entry_path1[ 5 ] = { 't', 'e', 's', 't', 0 };\n\tsystem_character_t file_entry_path2[ 5 ] = { 't', 'e', 0x03, 't', 0 };\n\tsystem_character_t expected_path1[ 5 ]   = { 't', 'e', 's', 't', 0 };\n\tlibcerror_error_t *error                 = NULL;\n\tsystem_character_t *path                 = NULL;\n\tsize_t path_size                         = 0;\n\tint result                               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path1,\n\t          5 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path2,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path2,\n\t          8 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          4,\n\t          &error );\n#else\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          6,\n\t          &error );\n#endif\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n#else\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 61 );\n#endif\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path3,\n\t          14 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path4,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path4,\n\t          8 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path5,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path5,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\t/* Test error cases\n\t */\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          NULL,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          NULL,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          NULL,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( path != NULL )\n\t{\n\t\tmemory_free(\n\t\t path );\n\t}\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the mount_path_string_copy_to_file_entry_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_mount_path_string_copy_to_file_entry_path(\n     void )\n{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tsystem_character_t expected_file_entry_path3[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', 0x2028, 't', 0 };\n\tsystem_character_t expected_file_entry_path4[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 't', 0 };\n\tsystem_character_t path2[ 9 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 'x', '0', '3', 't', 0 };\n\tsystem_character_t path3[ 15 ]                    = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n\tsystem_character_t path4[ 7 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, ESCAPE_CHARACTER, 't', 0 };\n#else\n\tsystem_character_t expected_file_entry_path3[ 8 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', 0xe2, 0x80, 0xa8, 't', 0 };\n\tsystem_character_t expected_file_entry_path4[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 't', 0 };\n\tsystem_character_t path2[ 9 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 'x', '0', '3', 't', 0 };\n\tsystem_character_t path3[ 15 ]                    = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n\tsystem_character_t path4[ 7 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', ESCAPE_CHARACTER, ESCAPE_CHARACTER, 't', 0 };\n#endif\n\n\tsystem_character_t expected_file_entry_path1[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', 's', 't', 0 };\n\tsystem_character_t expected_file_entry_path2[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', 0x03, 't', 0 };\n\tsystem_character_t expected_file_entry_path5[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', LIBFSNTFS_SEPARATOR, 't', 0 };\n\tsystem_character_t path1[ 6 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', 's', 't', 0 };\n\tsystem_character_t path5[ 6 ]                     = { LIBCPATH_SEPARATOR, 't', 'e', LIBCPATH_SEPARATOR, 't', 0 };\n\tlibcerror_error_t *error                          = NULL;\n\tsystem_character_t *file_entry_path               = NULL;\n\tsize_t file_entry_path_size                       = 0;\n\tint result                                        = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path1,\n\t          5,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 6 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path1,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path2,\n\t          8,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 9 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path2,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path3,\n\t          14,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 15 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path3,\n\t          6 );\n#else\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path3,\n\t          8 );\n#endif\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path4,\n\t          6,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 7 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path4,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path5,\n\t          6,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 7 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path5,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n\t/* Test error cases\n\t */\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          NULL,\n\t          5,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path1,\n\t          0,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path1,\n\t          5,\n\t          NULL,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = mount_path_string_copy_to_file_entry_path(\n\t          path1,\n\t          5,\n\t          &file_entry_path,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_path );\n\t}\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"mount_path_string_copy_hexadecimal_to_integer_32_bit\",\n\t fsntfs_test_tools_mount_path_string_copy_hexadecimal_to_integer_32_bit )\n\n\tFSNTFS_TEST_RUN(\n\t \"mount_path_string_copy_from_file_entry_path\",\n\t fsntfs_test_tools_mount_path_string_copy_from_file_entry_path )\n\n\tFSNTFS_TEST_RUN(\n\t \"mount_path_string_copy_to_file_entry_path\",\n\t fsntfs_test_tools_mount_path_string_copy_to_file_entry_path )\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_output.c",
    "content": "/*\n * Tools output functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#include <stdio.h>\n\n#if defined( HAVE_IO_H ) || defined( WINAPI )\n#include <io.h>\n#endif\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/fsntfstools_output.h\"\n\n/* Tests the fsntfstools_output_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_output_initialize(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\tresult = fsntfstools_output_initialize(\n\t          _IONBF,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"fsntfstools_output_initialize\",\n\t fsntfs_test_tools_output_initialize )\n\n\t/* TODO add tests for fsntfstools_output_copyright_fprint */\n\n\t/* TODO add tests for fsntfstools_output_version_fprint */\n\n\t/* TODO add tests for fsntfstools_output_version_detailed_fprint */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_path_string.c",
    "content": "/*\n * Tools path_string functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <memory.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/path_string.h\"\n\n/* Tests the path_string_copy_hexadecimal_to_integer_32_bit function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_path_string_copy_hexadecimal_to_integer_32_bit(\n     void )\n{\n\tsystem_character_t error_string[ 5 ] = { '2', '0', 'Z', '8', 0 };\n\tsystem_character_t string[ 5 ]       = { '2', '0', '2', '8', 0 };\n\tlibcerror_error_t *error             = NULL;\n\tuint32_t value_32bit                 = 0;\n\tint result                           = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"value_32bit\",\n\t value_32bit,\n\t (uint32_t) 0x2028 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          NULL,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          0,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          string,\n\t          4,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_hexadecimal_to_integer_32_bit(\n\t          error_string,\n\t          4,\n\t          &value_32bit,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the path_string_copy_from_file_entry_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_path_string_copy_from_file_entry_path(\n     void )\n{\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tsystem_character_t file_entry_path3[ 5 ] = { 't', 'e', 0x2028, 't', 0 };\n#else\n\tsystem_character_t file_entry_path3[ 7 ] = { 't', 'e', 0xe2, 0x80, 0xa8, 't', 0 };\n#endif\n\tsystem_character_t file_entry_path1[ 5 ] = { 't', 'e', 's', 't', 0 };\n\tsystem_character_t file_entry_path2[ 5 ] = { 't', 'e', 0x03, 't', 0 };\n\tsystem_character_t file_entry_path4[ 5 ] = { 't', 'e', '\\\\', 't', 0 };\n\tsystem_character_t expected_path1[ 5 ]   = { 't', 'e', 's', 't', 0 };\n\tsystem_character_t expected_path2[ 8 ]   = { 't', 'e', '\\\\', 'x', '0', '3', 't', 0 };\n\tsystem_character_t expected_path3[ 14 ]  = { 't', 'e', '\\\\', 'U', '0', '0', '0', '0', '2', '0', '2', '8', 't', 0 };\n\tsystem_character_t expected_path4[ 6 ]   = { 't', 'e', '\\\\', '\\\\', 't', 0 };\n\tlibcerror_error_t *error                 = NULL;\n\tsystem_character_t *path                 = NULL;\n\tsize_t path_size                         = 0;\n\tint result                               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path1,\n\t          5 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path2,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path2,\n\t          8 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          4,\n\t          &error );\n#else\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path3,\n\t          6,\n\t          &error );\n#endif\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n#else\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 61 );\n#endif\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path3,\n\t          14 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path4,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"path\",\n\t path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"path_size\",\n\t path_size,\n\t (size_t) 41 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          path,\n\t          expected_path4,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t path );\n\n\tpath = NULL;\n\n\t/* Test error cases\n\t */\n\tresult = path_string_copy_from_file_entry_path(\n\t          NULL,\n\t          &path_size,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          NULL,\n\t          file_entry_path1,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          NULL,\n\t          4,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_from_file_entry_path(\n\t          &path,\n\t          &path_size,\n\t          file_entry_path1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( path != NULL )\n\t{\n\t\tmemory_free(\n\t\t path );\n\t}\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the path_string_copy_to_file_entry_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_path_string_copy_to_file_entry_path(\n     void )\n{\n\tsystem_character_t expected_file_entry_path1[ 6 ] = { LIBFSNTFS_SEPARATOR, 't', 'e', 's', 't', 0 };\n\tsystem_character_t path1[ 7 ]                     = { '\\\\', '\\\\', 't', 'e', 's', 't', 0 };\n\tlibcerror_error_t *error                          = NULL;\n\tsystem_character_t *file_entry_path               = NULL;\n\tsize_t file_entry_path_size                       = 0;\n\tint result                                        = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = path_string_copy_to_file_entry_path(\n\t          path1,\n\t          6,\n\t          (system_character_t) '\\\\',\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry_path\",\n\t file_entry_path );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"file_entry_path_size\",\n\t file_entry_path_size,\n\t (size_t) 7 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = memory_compare(\n\t          file_entry_path,\n\t          expected_file_entry_path1,\n\t          6 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tmemory_free(\n\t file_entry_path );\n\n\tfile_entry_path = NULL;\n\n/* TODO improve test coverage */\n\n\t/* Test error cases\n\t */\n\tresult = path_string_copy_to_file_entry_path(\n\t          NULL,\n\t          4,\n\t          (system_character_t) '\\\\',\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_to_file_entry_path(\n\t          path1,\n\t          0,\n\t          (system_character_t) '\\\\',\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_to_file_entry_path(\n\t          path1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          (system_character_t) '\\\\',\n\t          &file_entry_path,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_to_file_entry_path(\n\t          path1,\n\t          4,\n\t          (system_character_t) '\\\\',\n\t          NULL,\n\t          &file_entry_path_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = path_string_copy_to_file_entry_path(\n\t          path1,\n\t          4,\n\t          (system_character_t) '\\\\',\n\t          &file_entry_path,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( file_entry_path != NULL )\n\t{\n\t\tmemory_free(\n\t\t file_entry_path );\n\t}\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n\tFSNTFS_TEST_RUN(\n\t \"path_string_copy_hexadecimal_to_integer_32_bit\",\n\t fsntfs_test_tools_path_string_copy_hexadecimal_to_integer_32_bit )\n\n\tFSNTFS_TEST_RUN(\n\t \"path_string_copy_from_file_entry_path\",\n\t fsntfs_test_tools_path_string_copy_from_file_entry_path )\n\n\tFSNTFS_TEST_RUN(\n\t \"path_string_copy_to_file_entry_path\",\n\t fsntfs_test_tools_path_string_copy_to_file_entry_path )\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_tools_signal.c",
    "content": "/*\n * Tools signal functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../fsntfstools/fsntfstools_signal.h\"\n\nvoid fsntfs_test_tools_signal_handler_function(\n      fsntfstools_signal_t signal FSNTFS_TEST_ATTRIBUTE_UNUSED )\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( signal )\n}\n\n#if defined( WINAPI )\n\n/* Tests the fsntfstools_signal_handler function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_signal_handler(\n     void )\n{\n\tBOOL result = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = fsntfstools_signal_handler(\n\t          CTRL_C_EVENT );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t (int) TRUE );\n\n\tresult = fsntfstools_signal_handler(\n\t          CTRL_LOGOFF_EVENT );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t (int) FALSE );\n\n\treturn( 1 );\n\non_error:\n\treturn( 0 );\n}\n\n#if defined( _MSC_VER )\n\n\t/* TODO add tests for fsntfstools_signal_initialize_memory_debug */\n\n#endif /* defined( _MSC_VER ) */\n\n#endif /* defined( WINAPI ) */\n\n/* Tests the fsntfstools_signal_attach function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_signal_attach(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = fsntfstools_signal_attach(\n\t          fsntfs_test_tools_signal_handler_function,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = fsntfstools_signal_attach(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the fsntfstools_signal_detach function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_tools_signal_detach(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = fsntfstools_signal_detach(\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( WINAPI )\n\n\tFSNTFS_TEST_RUN(\n\t \"fsntfstools_signal_handler\",\n\t fsntfs_test_tools_signal_handler )\n\n#if defined( _MSC_VER )\n\n\t/* TODO add tests for fsntfstools_signal_initialize_memory_debug */\n\n#endif /* defined( _MSC_VER ) */\n\n#endif /* defined( WINAPI ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"fsntfstools_signal_attach\",\n\t fsntfs_test_tools_signal_attach )\n\n\tFSNTFS_TEST_RUN(\n\t \"fsntfstools_signal_detach\",\n\t fsntfs_test_tools_signal_detach )\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_txf_data_values.c",
    "content": "/*\n * Library txf_data_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_txf_data_values.h\"\n\nuint8_t fsntfs_test_txf_data_values_data1[ 104 ] = {\n\t0x00, 0x01, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x09, 0x18, 0x00, 0x00, 0x00, 0x09, 0x00,\n\t0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x54, 0x00, 0x58, 0x00, 0x46, 0x00,\n\t0x5f, 0x00, 0x44, 0x00, 0x41, 0x00, 0x54, 0x00, 0x41, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_txf_data_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_txf_data_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_txf_data_values_t *txf_data_values = NULL;\n\tint result                                   = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests              = 1;\n\tint number_of_memset_fail_tests              = 1;\n\tint test_number                              = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_txf_data_values_initialize(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_txf_data_values_free(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_txf_data_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttxf_data_values = (libfsntfs_txf_data_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_txf_data_values_initialize(\n\t          &txf_data_values,\n\t          &error );\n\n\ttxf_data_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_txf_data_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_txf_data_values_initialize(\n\t\t          &txf_data_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( txf_data_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_txf_data_values_free(\n\t\t\t\t &txf_data_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"txf_data_values\",\n\t\t\t txf_data_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_txf_data_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_txf_data_values_initialize(\n\t\t          &txf_data_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( txf_data_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_txf_data_values_free(\n\t\t\t\t &txf_data_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"txf_data_values\",\n\t\t\t txf_data_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( txf_data_values != NULL )\n\t{\n\t\tlibfsntfs_txf_data_values_free(\n\t\t &txf_data_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_txf_data_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_txf_data_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_txf_data_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_txf_data_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_txf_data_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_txf_data_values_t *txf_data_values = NULL;\n\tint result                                   = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_txf_data_values_initialize(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_txf_data_values_read_data(\n\t          txf_data_values,\n\t          &( fsntfs_test_txf_data_values_data1[ 42 ] ),\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_txf_data_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_txf_data_values_data1[ 42 ] ),\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_txf_data_values_read_data(\n\t          txf_data_values,\n\t          NULL,\n\t          56,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_txf_data_values_read_data(\n\t          txf_data_values,\n\t          &( fsntfs_test_txf_data_values_data1[ 42 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_txf_data_values_read_data(\n\t          txf_data_values,\n\t          &( fsntfs_test_txf_data_values_data1[ 42 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_txf_data_values_free(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( txf_data_values != NULL )\n\t{\n\t\tlibfsntfs_txf_data_values_free(\n\t\t &txf_data_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_txf_data_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_txf_data_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_io_handle_t *io_handle             = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute     = NULL;\n\tlibfsntfs_txf_data_values_t *txf_data_values = NULL;\n\tint result                                   = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_txf_data_values_data1,\n\t          104,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_txf_data_values_initialize(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_txf_data_values_read_from_mft_attribute(\n\t          txf_data_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_txf_data_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_txf_data_values_read_from_mft_attribute(\n\t          txf_data_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_txf_data_values_free(\n\t          &txf_data_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"txf_data_values\",\n\t txf_data_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( txf_data_values != NULL )\n\t{\n\t\tlibfsntfs_txf_data_values_free(\n\t\t &txf_data_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_txf_data_values_initialize\",\n\t fsntfs_test_txf_data_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_txf_data_values_free\",\n\t fsntfs_test_txf_data_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_txf_data_values_read_data\",\n\t fsntfs_test_txf_data_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_txf_data_values_read_from_mft_attribute\",\n\t fsntfs_test_txf_data_values_read_from_mft_attribute );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_unused.h",
    "content": "/*\n * Definitions to silence compiler warnings about unused function attributes/parameters.\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#if !defined( _FSNTFS_TEST_UNUSED_H )\n#define _FSNTFS_TEST_UNUSED_H\n\n#include <common.h>\n\n#if !defined( FSNTFS_TEST_ATTRIBUTE_UNUSED )\n\n#if defined( __GNUC__ ) && __GNUC__ >= 3\n#define FSNTFS_TEST_ATTRIBUTE_UNUSED\t__attribute__ ((__unused__))\n\n#else\n#define FSNTFS_TEST_ATTRIBUTE_UNUSED\n\n#endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */\n\n#endif /* !defined( FSNTFS_TEST_ATTRIBUTE_UNUSED ) */\n\n#if defined( _MSC_VER )\n#define FSNTFS_TEST_UNREFERENCED_PARAMETER( parameter ) \\\n\tUNREFERENCED_PARAMETER( parameter );\n\n#else\n#define FSNTFS_TEST_UNREFERENCED_PARAMETER( parameter ) \\\n\t/* parameter */\n\n#endif /* defined( _MSC_VER ) */\n\n#endif /* !defined( _FSNTFS_TEST_UNUSED_H ) */\n\n"
  },
  {
    "path": "tests/fsntfs_test_usn_change_journal.c",
    "content": "/*\n * Library usn_change_journal type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_directory_entry.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_usn_change_journal.h\"\n\n\n/* TODO implement */\n#ifdef TODO\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_usn_change_journal_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_usn_change_journal_initialize(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle                   = NULL;\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_attribute_t *data_attribute              = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry       = NULL;\n\tlibfsntfs_io_handle_t *io_handle                   = NULL;\n\tlibfsntfs_usn_change_journal_t *usn_change_journal = NULL;\n\tint result                                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                    = 1;\n\tint number_of_memset_fail_tests                    = 1;\n\tint test_number                                    = 0;\n#endif\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_usn_change_journal_initialize(\n\t          &usn_change_journal,\n\t          io_handle,\n\t          file_io_handle,\n\t          directory_entry,\n\t          data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"usn_change_journal\",\n\t usn_change_journal );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_usn_change_journal_free(\n\t          &usn_change_journal,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"usn_change_journal\",\n\t usn_change_journal );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_usn_change_journal_initialize(\n\t          NULL,\n\t          io_handle,\n\t          file_io_handle,\n\t          directory_entry,\n\t          data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tusn_change_journal = (libfsntfs_usn_change_journal_t *) 0x12345678UL;\n\n\tresult = libfsntfs_usn_change_journal_initialize(\n\t          &usn_change_journal,\n\t          io_handle,\n\t          file_io_handle,\n\t          directory_entry,\n\t          data_attribute,\n\t          &error );\n\n\tusn_change_journal = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_usn_change_journal_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_usn_change_journal_initialize(\n\t\t          &usn_change_journal,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          directory_entry,\n\t\t          data_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( usn_change_journal != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_usn_change_journal_free(\n\t\t\t\t &usn_change_journal,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"usn_change_journal\",\n\t\t\t usn_change_journal );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_usn_change_journal_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_usn_change_journal_initialize(\n\t\t          &usn_change_journal,\n\t\t          io_handle,\n\t\t          file_io_handle,\n\t\t          directory_entry,\n\t\t          data_attribute,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( usn_change_journal != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_usn_change_journal_free(\n\t\t\t\t &usn_change_journal,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"usn_change_journal\",\n\t\t\t usn_change_journal );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &data_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"data_attribute\",\n\t data_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( usn_change_journal != NULL )\n\t{\n\t\tlibfsntfs_usn_change_journal_free(\n\t\t &usn_change_journal,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n#endif /* TODO */\n\n/* Tests the libfsntfs_usn_change_journal_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_usn_change_journal_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_usn_change_journal_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\t/* TODO: add tests for libfsntfs_usn_change_journal_initialize */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_usn_change_journal_free\",\n\t fsntfs_test_usn_change_journal_free );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\t/* TODO: add tests for libfsntfs_usn_change_journal_get_offset */\n\n\t/* TODO: add tests for libfsntfs_usn_change_journal_read_usn_record */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume.c",
    "content": "/*\n * Library volume type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <narrow_string.h>\n#include <system_string.h>\n#include <types.h>\n#include <wide_string.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_getopt.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n\n#include \"../libfsntfs/libfsntfs_directory_entry.h\"\n#include \"../libfsntfs/libfsntfs_mft_entry.h\"\n#include \"../libfsntfs/libfsntfs_volume.h\"\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4\n#error Unsupported size of wchar_t\n#endif\n\n/* Define to make fsntfs_test_volume generate verbose output\n#define FSNTFS_TEST_VOLUME_VERBOSE\n */\n\n#if !defined( LIBFSNTFS_HAVE_BFIO )\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_check_volume_signature_file_io_handle(\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error );\n\nLIBFSNTFS_EXTERN \\\nint libfsntfs_volume_open_file_io_handle(\n     libfsntfs_volume_t *volume,\n     libbfio_handle_t *file_io_handle,\n     int access_flags,\n     libfsntfs_error_t **error );\n\n#endif /* !defined( LIBFSNTFS_HAVE_BFIO ) */\n\n/* Creates and opens a source volume\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_volume_open_source(\n     libfsntfs_volume_t **volume,\n     libbfio_handle_t *file_io_handle,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_volume_open_source\";\n\tint result            = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( file_io_handle == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid file IO handle.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_initialize(\n\t     volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,\n\t\t \"%s: unable to initialize volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          *volume,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          error );\n\n\tif( result != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_OPEN_FAILED,\n\t\t \"%s: unable to open volume.\",\n\t\t function );\n\n\t\tgoto on_error;\n\t}\n\treturn( 1 );\n\non_error:\n\tif( *volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t volume,\n\t\t NULL );\n\t}\n\treturn( -1 );\n}\n\n/* Closes and frees a source volume\n * Returns 1 if successful or -1 on error\n */\nint fsntfs_test_volume_close_source(\n     libfsntfs_volume_t **volume,\n     libcerror_error_t **error )\n{\n\tstatic char *function = \"fsntfs_test_volume_close_source\";\n\tint result            = 0;\n\n\tif( volume == NULL )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_ARGUMENTS,\n\t\t LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,\n\t\t \"%s: invalid volume.\",\n\t\t function );\n\n\t\treturn( -1 );\n\t}\n\tif( libfsntfs_volume_close(\n\t     *volume,\n\t     error ) != 0 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_IO,\n\t\t LIBCERROR_IO_ERROR_CLOSE_FAILED,\n\t\t \"%s: unable to close volume.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\tif( libfsntfs_volume_free(\n\t     volume,\n\t     error ) != 1 )\n\t{\n\t\tlibcerror_error_set(\n\t\t error,\n\t\t LIBCERROR_ERROR_DOMAIN_RUNTIME,\n\t\t LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,\n\t\t \"%s: unable to free volume.\",\n\t\t function );\n\n\t\tresult = -1;\n\t}\n\treturn( result );\n}\n\n/* Tests the libfsntfs_volume_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_initialize(\n     void )\n{\n\tlibcerror_error_t *error        = NULL;\n\tlibfsntfs_volume_t *volume      = NULL;\n\tint result                      = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests = 2;\n\tint number_of_memset_fail_tests = 1;\n\tint test_number                 = 0;\n#endif\n\n#if defined( HAVE_FSNTFS_TEST_RWLOCK )\n\tnumber_of_malloc_fail_tests += 1;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_free(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvolume = (libfsntfs_volume_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tvolume = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n/* TODO determine why HAVE_PROFILER causes tests to be fail\n */\n#if defined( HAVE_FSNTFS_TEST_MEMORY ) && !defined( HAVE_PROFILER )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_initialize(\n\t\t          &volume,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( volume != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_free(\n\t\t\t\t &volume,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume\",\n\t\t\t volume );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_initialize(\n\t\t          &volume,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( volume != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_free(\n\t\t\t\t &volume,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume\",\n\t\t\t volume );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_open function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_open(\n     const system_character_t *source )\n{\n\tchar narrow_source[ 256 ];\n\n\tlibcerror_error_t *error   = NULL;\n\tlibfsntfs_volume_t *volume = NULL;\n\tint result                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = fsntfs_test_get_narrow_source(\n\t          source,\n\t          narrow_source,\n\t          256,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open\n\t */\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          narrow_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_open(\n\t          NULL,\n\t          narrow_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          NULL,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          narrow_source,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test open when already opened\n\t */\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          narrow_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_free(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n/* Tests the libfsntfs_volume_open_wide function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_open_wide(\n     const system_character_t *source )\n{\n\twchar_t wide_source[ 256 ];\n\n\tlibcerror_error_t *error   = NULL;\n\tlibfsntfs_volume_t *volume = NULL;\n\tint result                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = fsntfs_test_get_wide_source(\n\t          source,\n\t          wide_source,\n\t          256,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open\n\t */\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          wide_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_open_wide(\n\t          NULL,\n\t          wide_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          NULL,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          wide_source,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test open when already opened\n\t */\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          wide_source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_free(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n/* Tests the libfsntfs_volume_open_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_open_file_io_handle(\n     const system_character_t *source )\n{\n\tlibbfio_handle_t *file_io_handle = NULL;\n\tlibcerror_error_t *error         = NULL;\n\tlibfsntfs_volume_t *volume       = NULL;\n\tsize_t string_length             = 0;\n\tint result                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libbfio_file_initialize(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n        FSNTFS_TEST_ASSERT_IS_NOT_NULL(\n         \"file_io_handle\",\n         file_io_handle );\n\n        FSNTFS_TEST_ASSERT_IS_NULL(\n         \"error\",\n         error );\n\n\tstring_length = system_string_length(\n\t                 source );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libbfio_file_set_name_wide(\n\t          file_io_handle,\n\t          source,\n\t          string_length,\n\t          &error );\n#else\n\tresult = libbfio_file_set_name(\n\t          file_io_handle,\n\t          source,\n\t          string_length,\n\t          &error );\n#endif\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n        FSNTFS_TEST_ASSERT_IS_NULL(\n         \"error\",\n         error );\n\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open\n\t */\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          volume,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          NULL,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          volume,\n\t          NULL,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          volume,\n\t          file_io_handle,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test open when already opened\n\t */\n\tresult = libfsntfs_volume_open_file_io_handle(\n\t          volume,\n\t          file_io_handle,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_free(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libbfio_handle_free(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n         \"file_io_handle\",\n         file_io_handle );\n\n        FSNTFS_TEST_ASSERT_IS_NULL(\n         \"error\",\n         error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_close function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_close(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_close(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_open and libfsntfs_volume_close functions\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_open_close(\n     const system_character_t *source )\n{\n\tlibcerror_error_t *error   = NULL;\n\tlibfsntfs_volume_t *volume = NULL;\n\tint result                 = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_initialize(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open and close\n\t */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#else\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#endif\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_close(\n\t          volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test open and close a second time to validate clean up on close\n\t */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\tresult = libfsntfs_volume_open_wide(\n\t          volume,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#else\n\tresult = libfsntfs_volume_open(\n\t          volume,\n\t          source,\n\t          LIBFSNTFS_OPEN_READ,\n\t          &error );\n#endif\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_close(\n\t          volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_free(\n\t          &volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume\",\n\t volume );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_signal_abort function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_signal_abort(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_signal_abort(\n\t          volume,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_signal_abort(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_bytes_per_sector function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_bytes_per_sector(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error  = NULL;\n\tuint16_t bytes_per_sector = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_bytes_per_sector(\n\t          volume,\n\t          &bytes_per_sector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_bytes_per_sector(\n\t          NULL,\n\t          &bytes_per_sector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_bytes_per_sector(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_cluster_block_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_cluster_block_size(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error    = NULL;\n\tsize32_t cluster_block_size = 0;\n\tint result                  = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_cluster_block_size(\n\t          volume,\n\t          &cluster_block_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_cluster_block_size(\n\t          NULL,\n\t          &cluster_block_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_cluster_block_size(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_mft_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_mft_entry_size(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize32_t mft_entry_size  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_mft_entry_size(\n\t          volume,\n\t          &mft_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_mft_entry_size(\n\t          NULL,\n\t          &mft_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_mft_entry_size(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_index_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_index_entry_size(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error  = NULL;\n\tsize32_t index_entry_size = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_index_entry_size(\n\t          volume,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_index_entry_size(\n\t          NULL,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_index_entry_size(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_utf8_name_size(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_utf8_name_size(\n\t          volume,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf8_name_size(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_utf8_name(\n     libfsntfs_volume_t *volume )\n{\n\tuint8_t utf8_name[ 512 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_utf8_name(\n\t          volume,\n\t          utf8_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf8_name(\n\t          volume,\n\t          NULL,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf8_name(\n\t          volume,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf8_name(\n\t          volume,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_utf16_name_size(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_utf16_name_size(\n\t          volume,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf16_name_size(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_utf16_name(\n     libfsntfs_volume_t *volume )\n{\n\tuint16_t utf16_name[ 512 ];\n\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_utf16_name(\n\t          volume,\n\t          utf16_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf16_name(\n\t          volume,\n\t          NULL,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf16_name(\n\t          volume,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_utf16_name(\n\t          volume,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_serial_number function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_serial_number(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint64_t serial_number   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_serial_number(\n\t          volume,\n\t          &serial_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_serial_number(\n\t          NULL,\n\t          &serial_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_serial_number(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_number_of_file_entries function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_number_of_file_entries(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error        = NULL;\n\tuint64_t number_of_file_entries = 0;\n\tint result                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t          volume,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t          NULL,\n\t          &number_of_file_entries,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_number_of_file_entries(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_file_entry_by_index function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_file_entry_by_index(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tint result                         = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          volume,\n\t          0,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_free(\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          NULL,\n\t          0,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          volume,\n\t          0xffffffffffffffffUL,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          volume,\n\t          0,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_entry = (libfsntfs_file_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_get_file_entry_by_index(\n\t          volume,\n\t          0,\n\t          &file_entry,\n\t          &error );\n\n\tfile_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n     libfsntfs_volume_t *volume )\n{\n\tuint8_t utf8_path[ 6 ]                       = { '\\\\', '$', 'M', 'F', 'T', 0 };\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry             = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf8_path,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_free(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          NULL,\n\t          utf8_path,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          NULL,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf8_path,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf8_path,\n\t          5,\n\t          NULL,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf8_path,\n\t          5,\n\t          &mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdirectory_entry = (libfsntfs_directory_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf8_path,\n\t          5,\n\t          &mft_entry,\n\t          NULL,\n\t          &error );\n\n\tdirectory_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_volume_get_file_entry_by_utf8_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_file_entry_by_utf8_path(\n     libfsntfs_volume_t *volume )\n{\n\tuint8_t utf8_path[ 6 ]             = { '\\\\', '$', 'M', 'F', 'T', 0 };\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tint result                         = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          volume,\n\t          utf8_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_free(\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          NULL,\n\t          utf8_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          volume,\n\t          NULL,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          volume,\n\t          utf8_path,\n\t          5,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_entry = (libfsntfs_file_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf8_path(\n\t          volume,\n\t          utf8_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tfile_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n     libfsntfs_volume_t *volume )\n{\n\tuint16_t utf16_path[ 6 ]                     = { '\\\\', '$', 'M', 'F', 'T', 0 };\n\tlibcerror_error_t *error                     = NULL;\n\tlibfsntfs_directory_entry_t *directory_entry = NULL;\n\tlibfsntfs_mft_entry_t *mft_entry             = NULL;\n\tint result                                   = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf16_path,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_entry\",\n\t mft_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_directory_entry_free(\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"directory_entry\",\n\t directory_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          NULL,\n\t          utf16_path,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          NULL,\n\t          5,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf16_path,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &mft_entry,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf16_path,\n\t          5,\n\t          NULL,\n\t          &directory_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf16_path,\n\t          5,\n\t          &mft_entry,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tdirectory_entry = (libfsntfs_directory_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path(\n\t          (libfsntfs_internal_volume_t *) volume,\n\t          utf16_path,\n\t          5,\n\t          &mft_entry,\n\t          NULL,\n\t          &error );\n\n\tdirectory_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( directory_entry != NULL )\n\t{\n\t\tlibfsntfs_directory_entry_free(\n\t\t &directory_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* Tests the libfsntfs_volume_get_file_entry_by_utf16_path function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_file_entry_by_utf16_path(\n     libfsntfs_volume_t *volume )\n{\n\tuint16_t utf16_path[ 6 ]           = { '\\\\', '$', 'M', 'F', 'T', 0 };\n\tlibcerror_error_t *error           = NULL;\n\tlibfsntfs_file_entry_t *file_entry = NULL;\n\tint result                         = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          volume,\n\t          utf16_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_free(\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          NULL,\n\t          utf16_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          volume,\n\t          NULL,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          volume,\n\t          utf16_path,\n\t          5,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"file_entry\",\n\t file_entry );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tfile_entry = (libfsntfs_file_entry_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_get_file_entry_by_utf16_path(\n\t          volume,\n\t          utf16_path,\n\t          5,\n\t          &file_entry,\n\t          &error );\n\n\tfile_entry = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_entry != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &file_entry,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_root_directory function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_root_directory(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error               = NULL;\n\tlibfsntfs_file_entry_t *root_directory = 0;\n\tint result                             = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_root_directory(\n\t          volume,\n\t          &root_directory,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"root_directory\",\n\t root_directory );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_file_entry_free(\n\t          &root_directory,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"root_directory\",\n\t root_directory );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_root_directory(\n\t          NULL,\n\t          &root_directory,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"root_directory\",\n\t root_directory );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_get_root_directory(\n\t          volume,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"root_directory\",\n\t root_directory );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( root_directory != NULL )\n\t{\n\t\tlibfsntfs_file_entry_free(\n\t\t &root_directory,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_get_usn_change_journal function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_get_usn_change_journal(\n     libfsntfs_volume_t *volume )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_usn_change_journal_t *usn_change_journal = 0;\n\tint result                                         = 0;\n\tint usn_change_journal_is_set                      = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_get_usn_change_journal(\n\t          volume,\n\t          &usn_change_journal,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tusn_change_journal_is_set = result;\n\n\tif( usn_change_journal_is_set != 0 )\n\t{\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"usn_change_journal\",\n\t\t usn_change_journal );\n\n\t\tresult = libfsntfs_usn_change_journal_free(\n\t\t          &usn_change_journal,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_get_usn_change_journal(\n\t          NULL,\n\t          &usn_change_journal,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"usn_change_journal\",\n\t usn_change_journal );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tif( usn_change_journal_is_set != 0 )\n\t{\n\t\tresult = libfsntfs_volume_get_usn_change_journal(\n\t\t          volume,\n\t\t          NULL,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"usn_change_journal\",\n\t\t usn_change_journal );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( usn_change_journal != NULL )\n\t{\n\t\tlibfsntfs_usn_change_journal_free(\n\t\t &usn_change_journal,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc,\n     wchar_t * const argv[] )\n#else\nint main(\n     int argc,\n     char * const argv[] )\n#endif\n{\n\tlibbfio_handle_t *file_io_handle  = NULL;\n\tlibcerror_error_t *error          = NULL;\n\tlibfsntfs_volume_t *volume        = NULL;\n\tsystem_character_t *option_offset = NULL;\n\tsystem_character_t *source        = NULL;\n\tsystem_integer_t option           = 0;\n\tsize_t string_length              = 0;\n\toff64_t volume_offset             = 0;\n\tint result                        = 0;\n\n\twhile( ( option = fsntfs_test_getopt(\n\t                   argc,\n\t                   argv,\n\t                   _SYSTEM_STRING( \"o:\" ) ) ) != (system_integer_t) -1 )\n\t{\n\t\tswitch( option )\n\t\t{\n\t\t\tcase (system_integer_t) '?':\n\t\t\tdefault:\n\t\t\t\tfprintf(\n\t\t\t\t stderr,\n\t\t\t\t \"Invalid argument: %\" PRIs_SYSTEM \".\\n\",\n\t\t\t\t argv[ optind - 1 ] );\n\n\t\t\t\treturn( EXIT_FAILURE );\n\n\t\t\tcase (system_integer_t) 'o':\n\t\t\t\toption_offset = optarg;\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif( optind < argc )\n\t{\n\t\tsource = argv[ optind ];\n\t}\n\tif( option_offset != NULL )\n\t{\n\t\tstring_length = system_string_length(\n\t\t                 option_offset );\n\n\t\tresult = fsntfs_test_system_string_copy_from_64_bit_in_decimal(\n\t\t          option_offset,\n\t\t          string_length + 1,\n\t\t          (uint64_t *) &volume_offset,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\t}\n#if defined( HAVE_DEBUG_OUTPUT ) && defined( FSNTFS_TEST_VOLUME_VERBOSE )\n\tlibfsntfs_notify_set_verbose(\n\t 1 );\n\tlibfsntfs_notify_set_stream(\n\t stderr,\n\t NULL );\n#endif\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_initialize\",\n\t fsntfs_test_volume_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_free\",\n\t fsntfs_test_volume_free );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\tif( source != NULL )\n\t{\n\t\tresult = libbfio_file_range_initialize(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t         \"file_io_handle\",\n\t         file_io_handle );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tstring_length = system_string_length(\n\t\t                 source );\n\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\n\t\tresult = libbfio_file_range_set_name_wide(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          string_length,\n\t\t          &error );\n#else\n\t\tresult = libbfio_file_range_set_name(\n\t\t          file_io_handle,\n\t\t          source,\n\t\t          string_length,\n\t\t          &error );\n#endif\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tresult = libbfio_file_range_set(\n\t\t          file_io_handle,\n\t\t          volume_offset,\n\t\t          0,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\n\t\tresult = libfsntfs_check_volume_signature_file_io_handle(\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_NOT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\tif( ( result != 0 )\n\t && ( volume_offset == 0 ) )\n\t{\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_open\",\n\t\t fsntfs_test_volume_open,\n\t\t source );\n\n#if defined( HAVE_WIDE_CHARACTER_TYPE )\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_open_wide\",\n\t\t fsntfs_test_volume_open_wide,\n\t\t source );\n\n#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_open_file_io_handle\",\n\t\t fsntfs_test_volume_open_file_io_handle,\n\t\t source );\n\n\t\tFSNTFS_TEST_RUN(\n\t\t \"libfsntfs_volume_close\",\n\t\t fsntfs_test_volume_close );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_open_close\",\n\t\t fsntfs_test_volume_open_close,\n\t\t source );\n\n\t\t/* TODO: add tests for libfsntfs_internal_volume_open_read */\n\n\t\t/* TODO: add tests for libfsntfs_internal_volume_read_bitmap */\n\n\t\t/* TODO: add tests for libfsntfs_internal_volume_read_security_descriptors */\n\t}\n\tif( result != 0 )\n\t{\n\t\t/* Initialize volume for tests\n\t\t */\n\t\tresult = fsntfs_test_volume_open_source(\n\t\t          &volume,\n\t\t          file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"volume\",\n\t\t volume );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_signal_abort\",\n\t\t fsntfs_test_volume_signal_abort,\n\t\t volume );\n\n\t\t/* TODO: add tests for libfsntfs_volume_has_bitlocker_drive_encryption */\n\n\t\t/* TODO: add tests for libfsntfs_volume_has_volume_shadow_snapshots */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_bytes_per_sector\",\n\t\t fsntfs_test_volume_get_bytes_per_sector,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_cluster_block_size\",\n\t\t fsntfs_test_volume_get_cluster_block_size,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_mft_entry_size\",\n\t\t fsntfs_test_volume_get_mft_entry_size,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_index_entry_size\",\n\t\t fsntfs_test_volume_get_index_entry_size,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_utf8_name_size\",\n\t\t fsntfs_test_volume_get_utf8_name_size,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_utf8_name\",\n\t\t fsntfs_test_volume_get_utf8_name,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_utf16_name_size\",\n\t\t fsntfs_test_volume_get_utf16_name_size,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_utf16_name\",\n\t\t fsntfs_test_volume_get_utf16_name,\n\t\t volume );\n\n\t\t/* TODO: add tests for libfsntfs_volume_get_version */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_serial_number\",\n\t\t fsntfs_test_volume_get_serial_number,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_number_of_file_entries\",\n\t\t fsntfs_test_volume_get_number_of_file_entries,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_file_entry_by_index\",\n\t\t fsntfs_test_volume_get_file_entry_by_index,\n\t\t volume );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf8_path\",\n\t\t fsntfs_test_internal_volume_get_mft_and_directory_entry_by_utf8_path,\n\t\t volume );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_file_entry_by_utf8_path\",\n\t\t fsntfs_test_volume_get_file_entry_by_utf8_path,\n\t\t volume );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_internal_volume_get_mft_and_directory_entry_by_utf16_path\",\n\t\t fsntfs_test_internal_volume_get_mft_and_directory_entry_by_utf16_path,\n\t\t volume );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_file_entry_by_utf16_path\",\n\t\t fsntfs_test_volume_get_file_entry_by_utf16_path,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_root_directory\",\n\t\t fsntfs_test_volume_get_root_directory,\n\t\t volume );\n\n\t\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t\t \"libfsntfs_volume_get_usn_change_journal\",\n\t\t fsntfs_test_volume_get_usn_change_journal,\n\t\t volume );\n\n\t\t/* Clean up\n\t\t */\n\t\tresult = fsntfs_test_volume_close_source(\n\t\t          &volume,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 0 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"volume\",\n\t\t volume );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t \"error\",\n\t\t error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tresult = libbfio_handle_free(\n\t\t          &file_io_handle,\n\t\t          &error );\n\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t 1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"file_io_handle\",\n\t         file_io_handle );\n\n\t        FSNTFS_TEST_ASSERT_IS_NULL(\n\t         \"error\",\n\t         error );\n\t}\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n\treturn( EXIT_SUCCESS );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume != NULL )\n\t{\n\t\tlibfsntfs_volume_free(\n\t\t &volume,\n\t\t NULL );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume_header.c",
    "content": "/*\n * Library volume_header type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <byte_stream.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_functions.h\"\n#include \"fsntfs_test_libbfio.h\"\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_volume_header.h\"\n\nuint8_t fsntfs_test_volume_header_data1[ 512 ] = {\n\t0xeb, 0x52, 0x90, 0x4e, 0x54, 0x46, 0x53, 0x20, 0x20, 0x20, 0x20, 0x00, 0x02, 0x01, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x3f, 0x00, 0x20, 0x00, 0x3f, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0xc0, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xeb, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x56, 0xed, 0x50, 0x92, 0xed, 0x50, 0xba,\n\t0x00, 0x00, 0x00, 0x00, 0xfa, 0x33, 0xc0, 0x8e, 0xd0, 0xbc, 0x00, 0x7c, 0xfb, 0xb8, 0xc0, 0x07,\n\t0x8e, 0xd8, 0xe8, 0x16, 0x00, 0xb8, 0x00, 0x0d, 0x8e, 0xc0, 0x33, 0xdb, 0xc6, 0x06, 0x0e, 0x00,\n\t0x10, 0xe8, 0x53, 0x00, 0x68, 0x00, 0x0d, 0x68, 0x6a, 0x02, 0xcb, 0x8a, 0x16, 0x24, 0x00, 0xb4,\n\t0x08, 0xcd, 0x13, 0x73, 0x05, 0xb9, 0xff, 0xff, 0x8a, 0xf1, 0x66, 0x0f, 0xb6, 0xc6, 0x40, 0x66,\n\t0x0f, 0xb6, 0xd1, 0x80, 0xe2, 0x3f, 0xf7, 0xe2, 0x86, 0xcd, 0xc0, 0xed, 0x06, 0x41, 0x66, 0x0f,\n\t0xb7, 0xc9, 0x66, 0xf7, 0xe1, 0x66, 0xa3, 0x20, 0x00, 0xc3, 0xb4, 0x41, 0xbb, 0xaa, 0x55, 0x8a,\n\t0x16, 0x24, 0x00, 0xcd, 0x13, 0x72, 0x0f, 0x81, 0xfb, 0x55, 0xaa, 0x75, 0x09, 0xf6, 0xc1, 0x01,\n\t0x74, 0x04, 0xfe, 0x06, 0x14, 0x00, 0xc3, 0x66, 0x60, 0x1e, 0x06, 0x66, 0xa1, 0x10, 0x00, 0x66,\n\t0x03, 0x06, 0x1c, 0x00, 0x66, 0x3b, 0x06, 0x20, 0x00, 0x0f, 0x82, 0x3a, 0x00, 0x1e, 0x66, 0x6a,\n\t0x00, 0x66, 0x50, 0x06, 0x53, 0x66, 0x68, 0x10, 0x00, 0x01, 0x00, 0x80, 0x3e, 0x14, 0x00, 0x00,\n\t0x0f, 0x85, 0x0c, 0x00, 0xe8, 0xb3, 0xff, 0x80, 0x3e, 0x14, 0x00, 0x00, 0x0f, 0x84, 0x61, 0x00,\n\t0xb4, 0x42, 0x8a, 0x16, 0x24, 0x00, 0x16, 0x1f, 0x8b, 0xf4, 0xcd, 0x13, 0x66, 0x58, 0x5b, 0x07,\n\t0x66, 0x58, 0x66, 0x58, 0x1f, 0xeb, 0x2d, 0x66, 0x33, 0xd2, 0x66, 0x0f, 0xb7, 0x0e, 0x18, 0x00,\n\t0x66, 0xf7, 0xf1, 0xfe, 0xc2, 0x8a, 0xca, 0x66, 0x8b, 0xd0, 0x66, 0xc1, 0xea, 0x10, 0xf7, 0x36,\n\t0x1a, 0x00, 0x86, 0xd6, 0x8a, 0x16, 0x24, 0x00, 0x8a, 0xe8, 0xc0, 0xe4, 0x06, 0x0a, 0xcc, 0xb8,\n\t0x01, 0x02, 0xcd, 0x13, 0x0f, 0x82, 0x19, 0x00, 0x8c, 0xc0, 0x05, 0x20, 0x00, 0x8e, 0xc0, 0x66,\n\t0xff, 0x06, 0x10, 0x00, 0xff, 0x0e, 0x0e, 0x00, 0x0f, 0x85, 0x6f, 0xff, 0x07, 0x1f, 0x66, 0x61,\n\t0xc3, 0xa0, 0xf8, 0x01, 0xe8, 0x09, 0x00, 0xa0, 0xfb, 0x01, 0xe8, 0x03, 0x00, 0xfb, 0xeb, 0xfe,\n\t0xb4, 0x01, 0x8b, 0xf0, 0xac, 0x3c, 0x00, 0x74, 0x09, 0xb4, 0x0e, 0xbb, 0x07, 0x00, 0xcd, 0x10,\n\t0xeb, 0xf2, 0xc3, 0x0d, 0x0a, 0x41, 0x20, 0x64, 0x69, 0x73, 0x6b, 0x20, 0x72, 0x65, 0x61, 0x64,\n\t0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x00,\n\t0x0d, 0x0a, 0x4e, 0x54, 0x4c, 0x44, 0x52, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x69, 0x73, 0x73, 0x69,\n\t0x6e, 0x67, 0x00, 0x0d, 0x0a, 0x4e, 0x54, 0x4c, 0x44, 0x52, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f,\n\t0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x00, 0x0d, 0x0a, 0x50, 0x72, 0x65, 0x73, 0x73,\n\t0x20, 0x43, 0x74, 0x72, 0x6c, 0x2b, 0x41, 0x6c, 0x74, 0x2b, 0x44, 0x65, 0x6c, 0x20, 0x74, 0x6f,\n\t0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x0d, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xa0, 0xb3, 0xc9, 0x00, 0x00, 0x55, 0xaa };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_volume_header_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_initialize(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_volume_header_t *volume_header = NULL;\n\tint result                               = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests          = 1;\n\tint number_of_memset_fail_tests          = 1;\n\tint test_number                          = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_initialize(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_header_free(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvolume_header = (libfsntfs_volume_header_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_header_initialize(\n\t          &volume_header,\n\t          &error );\n\n\tvolume_header = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_header_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_header_initialize(\n\t\t          &volume_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( volume_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_header_free(\n\t\t\t\t &volume_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_header\",\n\t\t\t volume_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_header_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_header_initialize(\n\t\t          &volume_header,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( volume_header != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_header_free(\n\t\t\t\t &volume_header,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_header\",\n\t\t\t volume_header );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_header != NULL )\n\t{\n\t\tlibfsntfs_volume_header_free(\n\t\t &volume_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_read_data(\n     void )\n{\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_volume_header_t *volume_header = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_header_initialize(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_read_data(\n\t          NULL,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          NULL,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where signature is invalid\n\t */\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 3 ] ),\n\t 0xffffffffffffffffUL );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 3 ] ),\n\t 0x202020205346544eUL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where bytes per sector is invalid\n\t */\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 11 ] ),\n\t 0xffff );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tbyte_stream_copy_from_uint16_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 11 ] ),\n\t 512 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where sectors per cluster block is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 13 ] = 0xc0;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 13 ] = 0x01;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where cluster block size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 13 ] = 0x1f;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 13 ] = 0x01;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where total number of sectors is invalid\n\t */\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 40 ] ),\n\t 0x0080000000000001UL );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 40 ] ),\n\t 0x0000000000003ec0UL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where MFT entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 64 ] = 0x00;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 64 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where MFT entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 64 ] = 0xdf;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 64 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where MFT entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 64 ] = 0xff;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 64 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where index entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 68 ] = 0x00;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 68 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where index entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 68 ] = 0xdf;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 68 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test error case where index entry size is invalid\n\t */\n\tfsntfs_test_volume_header_data1[ 68 ] = 0xff;\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tfsntfs_test_volume_header_data1[ 68 ] = 0x02;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_header_free(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_header != NULL )\n\t{\n\t\tlibfsntfs_volume_header_free(\n\t\t &volume_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_read_file_io_handle function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_read_file_io_handle(\n     void )\n{\n\tlibbfio_handle_t *file_io_handle         = NULL;\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_volume_header_t *volume_header = NULL;\n\tint result                               = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_header_initialize(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize file IO handle\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          volume_header,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          NULL,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          volume_header,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          volume_header,\n\t          file_io_handle,\n\t          -1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up file IO handle\n\t */\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data too small\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_volume_header_data1,\n\t          8,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          volume_header,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test data invalid\n\t */\n\tresult = fsntfs_test_open_file_io_handle(\n\t          &file_io_handle,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"file_io_handle\",\n\t file_io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 3 ] ),\n\t 0xffffffffffffffffUL );\n\n\tresult = libfsntfs_volume_header_read_file_io_handle(\n\t          volume_header,\n\t          file_io_handle,\n\t          0,\n\t          &error );\n\n\tbyte_stream_copy_from_uint64_little_endian(\n\t &( fsntfs_test_volume_header_data1[ 3 ] ),\n\t 0x202020205346544eUL );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = fsntfs_test_close_file_io_handle(\n\t          &file_io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_header_free(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( file_io_handle != NULL )\n\t{\n\t\tlibbfio_handle_free(\n\t\t &file_io_handle,\n\t\t NULL );\n\t}\n\tif( volume_header != NULL )\n\t{\n\t\tlibfsntfs_volume_header_free(\n\t\t &volume_header,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_bytes_per_sector function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_bytes_per_sector(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error  = NULL;\n\tuint16_t bytes_per_sector = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_bytes_per_sector(\n\t          volume_header,\n\t          &bytes_per_sector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT16(\n\t \"bytes_per_sector\",\n\t bytes_per_sector,\n\t 512 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_bytes_per_sector(\n\t          NULL,\n\t          &bytes_per_sector,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_bytes_per_sector(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_cluster_block_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_cluster_block_size(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error    = NULL;\n\tsize32_t cluster_block_size = 0;\n\tint result                  = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_cluster_block_size(\n\t          volume_header,\n\t          &cluster_block_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"cluster_block_size\",\n\t (uint32_t) cluster_block_size,\n\t 512 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_cluster_block_size(\n\t          NULL,\n\t          &cluster_block_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_cluster_block_size(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_mft_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_mft_entry_size(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize32_t mft_entry_size  = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_mft_entry_size(\n\t          volume_header,\n\t          &mft_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"mft_entry_size\",\n\t (uint32_t) mft_entry_size,\n\t 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_mft_entry_size(\n\t          NULL,\n\t          &mft_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_mft_entry_size(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_index_entry_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_index_entry_size(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error  = NULL;\n\tsize32_t index_entry_size = 0;\n\tint result                = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_index_entry_size(\n\t          volume_header,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT32(\n\t \"index_entry_size\",\n\t (uint32_t) index_entry_size,\n\t 1024 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_index_entry_size(\n\t          NULL,\n\t          &index_entry_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_index_entry_size(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_volume_serial_number function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_volume_serial_number(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error      = NULL;\n\tuint64_t volume_serial_number = 0;\n\tint result                    = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_volume_serial_number(\n\t          volume_header,\n\t          &volume_serial_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_UINT64(\n\t \"volume_serial_number\",\n\t volume_serial_number,\n\t (uint64_t) 0xba50ed9250ed5623UL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_volume_serial_number(\n\t          NULL,\n\t          &volume_serial_number,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_volume_serial_number(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_header_get_mft_offset function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_header_get_mft_offset(\n     libfsntfs_volume_header_t *volume_header )\n{\n\tlibcerror_error_t *error = NULL;\n\toff64_t mft_offset       = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_header_get_mft_offset(\n\t          volume_header,\n\t          &mft_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT64(\n\t \"mft_offset\",\n\t mft_offset,\n\t (int64_t) 0x0029d600UL );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_header_get_mft_offset(\n\t          NULL,\n\t          &mft_offset,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_header_get_mft_offset(\n\t          volume_header,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_volume_header_t *volume_header = NULL;\n\tint result                               = 0;\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_header_initialize\",\n\t fsntfs_test_volume_header_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_header_free\",\n\t fsntfs_test_volume_header_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_header_read_data\",\n\t fsntfs_test_volume_header_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_header_read_file_io_handle\",\n\t fsntfs_test_volume_header_read_file_io_handle );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_header_initialize(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_header_read_data(\n\t          volume_header,\n\t          fsntfs_test_volume_header_data1,\n\t          512,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Run tests\n\t */\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_bytes_per_sector\",\n\t fsntfs_test_volume_header_get_bytes_per_sector,\n\t volume_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_cluster_block_size\",\n\t fsntfs_test_volume_header_get_cluster_block_size,\n\t volume_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_mft_entry_size\",\n\t fsntfs_test_volume_header_get_mft_entry_size,\n\t volume_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_index_entry_size\",\n\t fsntfs_test_volume_header_get_index_entry_size,\n\t volume_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_volume_serial_number\",\n\t fsntfs_test_volume_header_get_volume_serial_number,\n\t volume_header );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_header_get_mft_offset\",\n\t fsntfs_test_volume_header_get_mft_offset,\n\t volume_header );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_header_free(\n\t          &volume_header,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_header\",\n\t volume_header );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_header != NULL )\n\t{\n\t\tlibfsntfs_volume_header_free(\n\t\t &volume_header,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume_information_attribute.c",
    "content": "/*\n * Library volume_information_attributes functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_volume_information_attribute.h\"\n\nuint8_t fsntfs_test_volume_information_attribute_data1[ 40 ] = {\n\t0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_volume_information_attribute_get_version function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_attribute_get_version(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tintptr_t *value          = NULL;\n\tuint32_t type            = 0;\n\tuint8_t major_version    = 0;\n\tuint8_t minor_version    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          attribute,\n\t          &major_version,\n\t          &minor_version,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          NULL,\n\t          &major_version,\n\t          &minor_version,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          attribute,\n\t          NULL,\n\t          &minor_version,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          attribute,\n\t          &major_version,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          attribute,\n\t          &major_version,\n\t          &minor_version,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvalue = ( (libfsntfs_internal_attribute_t *) attribute )->value;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->value = NULL;\n\n\tresult = libfsntfs_volume_information_attribute_get_version(\n\t          attribute,\n\t          &major_version,\n\t          &minor_version,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->value = value;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_information_attribute_get_flags function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_attribute_get_flags(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tintptr_t *value          = NULL;\n\tuint32_t type            = 0;\n\tuint16_t flags           = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          attribute,\n\t          &flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          NULL,\n\t          &flags,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          attribute,\n\t          &flags,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvalue = ( (libfsntfs_internal_attribute_t *) attribute )->value;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->value = NULL;\n\n\tresult = libfsntfs_volume_information_attribute_get_flags(\n\t          attribute,\n\t          &flags,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->value = value;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize attribute for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_volume_information_attribute_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_information_attribute_get_version\",\n\t fsntfs_test_volume_information_attribute_get_version,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_information_attribute_get_flags\",\n\t fsntfs_test_volume_information_attribute_get_flags,\n\t attribute );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t         (libfsntfs_internal_attribute_t **) &attribute,\n\t         &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t         &mft_attribute,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume_information_values.c",
    "content": "/*\n * Library volume_information_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_standard_information_values.h\"\n#include \"../libfsntfs/libfsntfs_volume_information_values.h\"\n\nuint8_t fsntfs_test_volume_information_values_data1[ 40 ] = {\n\t0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x03, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_volume_information_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                                         = NULL;\n\tlibfsntfs_volume_information_values_t *volume_information_values = NULL;\n\tint result                                                       = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                                  = 1;\n\tint number_of_memset_fail_tests                                  = 1;\n\tint test_number                                                  = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_information_values_initialize(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_information_values_free(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvolume_information_values = (libfsntfs_volume_information_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_information_values_initialize(\n\t          &volume_information_values,\n\t          &error );\n\n\tvolume_information_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_information_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_information_values_initialize(\n\t\t          &volume_information_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( volume_information_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_information_values_free(\n\t\t\t\t &volume_information_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_information_values\",\n\t\t\t volume_information_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_information_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_information_values_initialize(\n\t\t          &volume_information_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( volume_information_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_information_values_free(\n\t\t\t\t &volume_information_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_information_values\",\n\t\t\t volume_information_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_information_values != NULL )\n\t{\n\t\tlibfsntfs_volume_information_values_free(\n\t\t &volume_information_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_information_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_information_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                                         = NULL;\n\tlibfsntfs_volume_information_values_t *volume_information_values = NULL;\n\tint result                                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_information_values_initialize(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_information_values_read_data(\n\t          volume_information_values,\n\t          &( fsntfs_test_volume_information_values_data1[ 24 ] ),\n\t          12,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_volume_information_values_data1[ 24 ] ),\n\t          12,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_values_read_data(\n\t          volume_information_values,\n\t          NULL,\n\t          12,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_values_read_data(\n\t          volume_information_values,\n\t          &( fsntfs_test_volume_information_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_values_read_data(\n\t          volume_information_values,\n\t          &( fsntfs_test_volume_information_values_data1[ 24 ] ),\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_information_values_free(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_information_values != NULL )\n\t{\n\t\tlibfsntfs_volume_information_values_free(\n\t\t &volume_information_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_information_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_information_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                                         = NULL;\n\tlibfsntfs_io_handle_t *io_handle                                 = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute                         = NULL;\n\tlibfsntfs_volume_information_values_t *volume_information_values = NULL;\n\tint result                                                       = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_volume_information_values_data1,\n\t          40,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_information_values_initialize(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_information_values_read_from_mft_attribute(\n\t          volume_information_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_information_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_information_values_read_from_mft_attribute(\n\t          volume_information_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_information_values_free(\n\t          &volume_information_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_information_values\",\n\t volume_information_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_information_values != NULL )\n\t{\n\t\tlibfsntfs_volume_information_values_free(\n\t\t &volume_information_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_information_values_initialize\",\n\t fsntfs_test_volume_information_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_information_values_free\",\n\t fsntfs_test_volume_information_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_information_values_read_data\",\n\t fsntfs_test_volume_information_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_information_values_read_from_mft_attribute\",\n\t fsntfs_test_volume_information_values_read_from_mft_attribute );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume_name_attribute.c",
    "content": "/*\n * Library volume_name_attributes functions test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_attribute.h\"\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_volume_name_attribute.h\"\n\nuint8_t fsntfs_test_volume_name_attribute_data1[ 48 ] = {\n\t0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,\n\t0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_volume_name_attribute_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_attribute_get_utf8_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf8_name_size    = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 11 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name_size(\n\t          attribute,\n\t          &utf8_name_size,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_attribute_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_attribute_get_utf8_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_name_attribute_get_utf8_name(\n\t          attribute,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_attribute_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_attribute_get_utf16_name_size(\n     libfsntfs_attribute_t *attribute )\n{\n\tlibcerror_error_t *error = NULL;\n\tsize_t utf16_name_size   = 0;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 11 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name_size(\n\t          attribute,\n\t          &utf16_name_size,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_attribute_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_attribute_get_utf16_name(\n     libfsntfs_attribute_t *attribute )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint32_t type            = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          attribute,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\ttype = ( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type;\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = 0;\n\n\tresult = libfsntfs_volume_name_attribute_get_utf16_name(\n\t          attribute,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\t( (libfsntfs_internal_attribute_t *) attribute )->mft_attribute->type = type;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                 = NULL;\n\tlibfsntfs_attribute_t *attribute         = NULL;\n\tlibfsntfs_io_handle_t *io_handle         = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute = NULL;\n\tint result                               = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize attribute for tests\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_volume_name_attribute_data1,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_attribute_initialize(\n\t          &attribute,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_internal_attribute_read_value(\n\t          (libfsntfs_internal_attribute_t *) attribute,\n\t          io_handle,\n\t          NULL,\n\t          0,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_attribute_get_utf8_name_size\",\n\t fsntfs_test_volume_name_attribute_get_utf8_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_attribute_get_utf8_name\",\n\t fsntfs_test_volume_name_attribute_get_utf8_name,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_attribute_get_utf16_name_size\",\n\t fsntfs_test_volume_name_attribute_get_utf16_name_size,\n\t attribute );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_attribute_get_utf16_name\",\n\t fsntfs_test_volume_name_attribute_get_utf16_name,\n\t attribute );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_internal_attribute_free(\n\t          (libfsntfs_internal_attribute_t **) &attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"attribute\",\n\t attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( attribute != NULL )\n\t{\n\t\tlibfsntfs_internal_attribute_free(\n\t         (libfsntfs_internal_attribute_t **) &attribute,\n\t         &error );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t         &mft_attribute,\n\t         &error );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/fsntfs_test_volume_name_values.c",
    "content": "/*\n * Library volume_name_values type test program\n *\n * Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n *\n * Refer to AUTHORS for acknowledgements.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <common.h>\n#include <file_stream.h>\n#include <types.h>\n\n#if defined( HAVE_STDLIB_H ) || defined( WINAPI )\n#include <stdlib.h>\n#endif\n\n#include \"fsntfs_test_libcerror.h\"\n#include \"fsntfs_test_libfsntfs.h\"\n#include \"fsntfs_test_macros.h\"\n#include \"fsntfs_test_memory.h\"\n#include \"fsntfs_test_unused.h\"\n\n#include \"../libfsntfs/libfsntfs_io_handle.h\"\n#include \"../libfsntfs/libfsntfs_mft_attribute.h\"\n#include \"../libfsntfs/libfsntfs_standard_information_values.h\"\n#include \"../libfsntfs/libfsntfs_volume_name_values.h\"\n\nuint8_t fsntfs_test_volume_name_values_data1[ 48 ] = {\n\t0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,\n\t0x56, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00 };\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n/* Tests the libfsntfs_volume_name_values_initialize function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_initialize(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_volume_name_values_t *volume_name_values = NULL;\n\tint result                                         = 0;\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\tint number_of_malloc_fail_tests                    = 1;\n\tint number_of_memset_fail_tests                    = 1;\n\tint test_number                                    = 0;\n#endif\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_name_values_free(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvolume_name_values = (libfsntfs_volume_name_values_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tvolume_name_values = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\tfor( test_number = 0;\n\t     test_number < number_of_malloc_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_name_values_initialize with malloc failing\n\t\t */\n\t\tfsntfs_test_malloc_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_name_values_initialize(\n\t\t          &volume_name_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\n\t\t\tif( volume_name_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_name_values_free(\n\t\t\t\t &volume_name_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_name_values\",\n\t\t\t volume_name_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n\tfor( test_number = 0;\n\t     test_number < number_of_memset_fail_tests;\n\t     test_number++ )\n\t{\n\t\t/* Test libfsntfs_volume_name_values_initialize with memset failing\n\t\t */\n\t\tfsntfs_test_memset_attempts_before_fail = test_number;\n\n\t\tresult = libfsntfs_volume_name_values_initialize(\n\t\t          &volume_name_values,\n\t\t          &error );\n\n\t\tif( fsntfs_test_memset_attempts_before_fail != -1 )\n\t\t{\n\t\t\tfsntfs_test_memset_attempts_before_fail = -1;\n\n\t\t\tif( volume_name_values != NULL )\n\t\t\t{\n\t\t\t\tlibfsntfs_volume_name_values_free(\n\t\t\t\t &volume_name_values,\n\t\t\t\t NULL );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t\t \"result\",\n\t\t\t result,\n\t\t\t -1 );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t\t\t \"volume_name_values\",\n\t\t\t volume_name_values );\n\n\t\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t\t \"error\",\n\t\t\t error );\n\n\t\t\tlibcerror_error_free(\n\t\t\t &error );\n\t\t}\n\t}\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_name_values != NULL )\n\t{\n\t\tlibfsntfs_volume_name_values_free(\n\t\t &volume_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_free function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_free(\n     void )\n{\n\tlibcerror_error_t *error = NULL;\n\tint result               = 0;\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_free(\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_read_data function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_read_data(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_volume_name_values_t *volume_name_values = NULL;\n\tint result                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_name_values_free(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          NULL,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tvolume_name_values->name = (uint8_t *) 0x12345678UL;\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tvolume_name_values->name = NULL;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          NULL,\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n#if defined( HAVE_FSNTFS_TEST_MEMORY )\n\n\t/* Test libfsntfs_volume_name_values_read_data with malloc failing\n\t */\n\tfsntfs_test_malloc_attempts_before_fail = 0;\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tif( fsntfs_test_malloc_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_malloc_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#if defined( OPTIMIZATION_DISABLED )\n\t/* Test libfsntfs_volume_name_values_read_data with memcpy failing\n\t */\n\tfsntfs_test_memcpy_attempts_before_fail = 0;\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tif( fsntfs_test_memcpy_attempts_before_fail != -1 )\n\t{\n\t\tfsntfs_test_memcpy_attempts_before_fail = -1;\n\t}\n\telse\n\t{\n\t\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t\t \"result\",\n\t\t result,\n\t\t -1 );\n\n\t\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t\t \"error\",\n\t\t error );\n\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n#endif /* defined( OPTIMIZATION_DISABLED ) */\n#endif /* defined( HAVE_FSNTFS_TEST_MEMORY ) */\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_name_values_free(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_name_values != NULL )\n\t{\n\t\tlibfsntfs_volume_name_values_free(\n\t\t &volume_name_values,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_read_from_mft_attribute function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_read_from_mft_attribute(\n     void )\n{\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_io_handle_t *io_handle                   = NULL;\n\tlibfsntfs_mft_attribute_t *mft_attribute           = NULL;\n\tlibfsntfs_volume_name_values_t *volume_name_values = NULL;\n\tint result                                         = 0;\n\n\t/* Initialize test\n\t */\n\tresult = libfsntfs_io_handle_initialize(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tio_handle->cluster_block_size = 4096;\n\n\tresult = libfsntfs_mft_attribute_initialize(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_read_data(\n\t          mft_attribute,\n\t          io_handle,\n\t          fsntfs_test_volume_name_values_data1,\n\t          48,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_read_from_mft_attribute(\n\t          volume_name_values,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_read_from_mft_attribute(\n\t          NULL,\n\t          mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tresult = libfsntfs_volume_name_values_read_from_mft_attribute(\n\t          volume_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_name_values_free(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_mft_attribute_free(\n\t          &mft_attribute,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"mft_attribute\",\n\t mft_attribute );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_io_handle_free(\n\t          &io_handle,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"io_handle\",\n\t io_handle );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_name_values != NULL )\n\t{\n\t\tlibfsntfs_volume_name_values_free(\n\t\t &volume_name_values,\n\t\t NULL );\n\t}\n\tif( mft_attribute != NULL )\n\t{\n\t\tlibfsntfs_mft_attribute_free(\n\t\t &mft_attribute,\n\t\t NULL );\n\t}\n\tif( io_handle != NULL )\n\t{\n\t\tlibfsntfs_io_handle_free(\n\t\t &io_handle,\n\t\t NULL );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_get_utf8_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_get_utf8_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *name            = NULL;\n\tsize_t name_size         = 0;\n\tsize_t utf8_name_size    = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf8_name_size(\n\t          volume_name_values,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 11 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test with empty name\n\t */\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name_size(\n\t          volume_name_values,\n\t          &utf8_name_size,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf8_name_size\",\n\t utf8_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf8_name_size(\n\t          NULL,\n\t          &utf8_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name_size(\n\t          volume_name_values,\n\t          NULL,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test libfsntfs_volume_name_values_get_utf8_name_size with failing libuna_utf8_string_size_from_utf16_stream */\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name_size(\n\t          volume_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_get_utf8_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_get_utf8_name(\n     libfsntfs_volume_name_values_t *volume_name_values )\n{\n\tuint8_t utf8_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *name            = NULL;\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test with empty name\n\t */\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          NULL,\n\t          utf8_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          utf8_name,\n\t          0,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          utf8_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test fsntfs_test_volume_name_values_get_utf8_name with failing libuna_utf8_string_copy_from_utf16_stream */\n\n\tresult = libfsntfs_volume_name_values_get_utf8_name(\n\t          volume_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_get_utf16_name_size function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_get_utf16_name_size(\n     libfsntfs_volume_name_values_t *volume_name_values )\n{\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *name            = NULL;\n\tsize_t name_size         = 0;\n\tsize_t utf16_name_size   = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf16_name_size(\n\t          volume_name_values,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 11 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test with empty name\n\t */\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name_size(\n\t          volume_name_values,\n\t          &utf16_name_size,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_SIZE(\n\t \"utf16_name_size\",\n\t utf16_name_size,\n\t (size_t) 0 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf16_name_size(\n\t          NULL,\n\t          &utf16_name_size,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name_size(\n\t          volume_name_values,\n\t          NULL,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test libfsntfs_volume_name_values_get_utf16_name_size with failing libuna_utf16_string_size_from_utf16_stream */\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name_size(\n\t          volume_name_values,\n\t          NULL,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n/* Tests the libfsntfs_volume_name_values_get_utf16_name function\n * Returns 1 if successful or 0 if not\n */\nint fsntfs_test_volume_name_values_get_utf16_name(\n     libfsntfs_volume_name_values_t *volume_name_values )\n{\n\tuint16_t utf16_name[ 16 ];\n\n\tlibcerror_error_t *error = NULL;\n\tuint8_t *name            = NULL;\n\tsize_t name_size         = 0;\n\tint result               = 0;\n\n\t/* Test regular cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test with empty name\n\t */\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\t/* Test error cases\n\t */\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          NULL,\n\t          utf16_name,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          utf16_name,\n\t          0,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\tname      = volume_name_values->name;\n\tname_size = volume_name_values->name_size;\n\n\tvolume_name_values->name      = NULL;\n\tvolume_name_values->name_size = 0;\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          utf16_name,\n\t          (size_t) SSIZE_MAX + 1,\n\t          &error );\n\n\tvolume_name_values->name      = name;\n\tvolume_name_values->name_size = name_size;\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\t/* Test fsntfs_test_volume_name_values_get_utf16_name with failing libuna_utf16_string_copy_from_utf16_stream */\n\n\tresult = libfsntfs_volume_name_values_get_utf16_name(\n\t          volume_name_values,\n\t          NULL,\n\t          16,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t -1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"error\",\n\t error );\n\n\tlibcerror_error_free(\n\t &error );\n\n\treturn( 1 );\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\treturn( 0 );\n}\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n/* The main program\n */\n#if defined( HAVE_WIDE_SYSTEM_CHARACTER )\nint wmain(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     wchar_t * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#else\nint main(\n     int argc FSNTFS_TEST_ATTRIBUTE_UNUSED,\n     char * const argv[] FSNTFS_TEST_ATTRIBUTE_UNUSED )\n#endif\n{\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\tlibcerror_error_t *error                           = NULL;\n\tlibfsntfs_volume_name_values_t *volume_name_values = NULL;\n\tint result                                         = 0;\n#endif\n\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argc )\n\tFSNTFS_TEST_UNREFERENCED_PARAMETER( argv )\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_name_values_initialize\",\n\t fsntfs_test_volume_name_values_initialize );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_name_values_free\",\n\t fsntfs_test_volume_name_values_free );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_name_values_read_data\",\n\t fsntfs_test_volume_name_values_read_data );\n\n\tFSNTFS_TEST_RUN(\n\t \"libfsntfs_volume_name_values_read_from_mft_attribute\",\n\t fsntfs_test_volume_name_values_read_from_mft_attribute );\n\n#if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )\n\n\t/* Initialize volume_name_values for tests\n\t */\n\tresult = libfsntfs_volume_name_values_initialize(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NOT_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tresult = libfsntfs_volume_name_values_read_data(\n\t          volume_name_values,\n\t          &( fsntfs_test_volume_name_values_data1[ 24 ] ),\n\t          20,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_values_get_utf8_name_size\",\n\t fsntfs_test_volume_name_values_get_utf8_name_size,\n\t volume_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_values_get_utf8_name\",\n\t fsntfs_test_volume_name_values_get_utf8_name,\n\t volume_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_values_get_utf16_name_size\",\n\t fsntfs_test_volume_name_values_get_utf16_name_size,\n\t volume_name_values );\n\n\tFSNTFS_TEST_RUN_WITH_ARGS(\n\t \"libfsntfs_volume_name_values_get_utf16_name\",\n\t fsntfs_test_volume_name_values_get_utf16_name,\n\t volume_name_values );\n\n\t/* Clean up\n\t */\n\tresult = libfsntfs_volume_name_values_free(\n\t          &volume_name_values,\n\t          &error );\n\n\tFSNTFS_TEST_ASSERT_EQUAL_INT(\n\t \"result\",\n\t result,\n\t 1 );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"volume_name_values\",\n\t volume_name_values );\n\n\tFSNTFS_TEST_ASSERT_IS_NULL(\n\t \"error\",\n\t error );\n\n#endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n\n\treturn( EXIT_SUCCESS );\n\n#if defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT )\n\non_error:\n\tif( error != NULL )\n\t{\n\t\tlibcerror_error_free(\n\t\t &error );\n\t}\n\tif( volume_name_values != NULL )\n\t{\n\t\tlibfsntfs_volume_name_values_free(\n\t\t &volume_name_values,\n\t\t NULL );\n\t}\n\treturn( EXIT_FAILURE );\n\n#endif /* defined( __GNUC__ ) && !defined( LIBFSNTFS_DLL_IMPORT ) */\n}\n\n"
  },
  {
    "path": "tests/lsan.suppressions",
    "content": "leak:/lib*/libpython*\n"
  },
  {
    "path": "tests/pkgbuild.sh",
    "content": "#!/bin/sh\n# Script to build a MacOS pkg\n#\n# Version: 20241015\n\nset -e\n\nmake install DESTDIR=${PWD}/osx-pkg\nmkdir -p ${PWD}/osx-pkg/usr/share/doc/libfsntfs\ncp AUTHORS COPYING COPYING.LESSER NEWS README ${PWD}/osx-pkg/usr/share/doc/libfsntfs\n\nVERSION=`sed '5!d; s/^  \\[//;s/\\],$//' configure.ac`\npkgbuild --root osx-pkg --identifier com.github.libyal.libfsntfs --version ${VERSION} --ownership recommended ../libfsntfs-${VERSION}.pkg\n\n"
  },
  {
    "path": "tests/pyfsntfs_test_attribute.py",
    "content": "#!/usr/bin/env python\n#\n# Python-bindings attribute type test script\n#\n# Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n#\n# Refer to AUTHORS for acknowledgements.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nimport argparse\nimport os\nimport sys\nimport unittest\n\nimport pyfsntfs\n\n\nclass DataRangeFileObject(object):\n  \"\"\"File-like object that maps an in-file data range.\"\"\"\n\n  def __init__(self, path, range_offset, range_size):\n    \"\"\"Initializes a file-like object.\n\n    Args:\n      path (str): path of the file that contains the data range.\n      range_offset (int): offset where the data range starts.\n      range_size (int): size of the data range starts, or None to indicate\n          the range should continue to the end of the parent file-like object.\n    \"\"\"\n    if range_size is None:\n      stat_object = os.stat(path)\n      range_size = stat_object.st_size\n\n    super(DataRangeFileObject, self).__init__()\n    self._current_offset = 0\n    self._file_object = open(path, \"rb\")\n    self._range_offset = range_offset\n    self._range_size = range_size\n\n  def __enter__(self):\n    \"\"\"Enters a with statement.\"\"\"\n    return self\n\n  def __exit__(self, unused_type, unused_value, unused_traceback):\n    \"\"\"Exits a with statement.\"\"\"\n    return\n\n  def close(self):\n    \"\"\"Closes the file-like object.\"\"\"\n    if self._file_object:\n      self._file_object.close()\n      self._file_object = None\n\n  def get_offset(self):\n    \"\"\"Retrieves the current offset into the file-like object.\n\n    Returns:\n      int: current offset in the data range.\n    \"\"\"\n    return self._current_offset\n\n  def get_size(self):\n    \"\"\"Retrieves the size of the file-like object.\n\n    Returns:\n      int: size of the data range.\n    \"\"\"\n    return self._range_size\n\n  def read(self, size=None):\n    \"\"\"Reads a byte string from the file-like object at the current offset.\n\n    The function will read a byte string of the specified size or\n    all of the remaining data if no size was specified.\n\n    Args:\n      size (Optional[int]): number of bytes to read, where None is all\n          remaining data.\n\n    Returns:\n      bytes: data read.\n\n    Raises:\n      IOError: if the read failed.\n    \"\"\"\n    if (self._range_offset < 0 or\n        (self._range_size is not None and self._range_size < 0)):\n      raise IOError(\"Invalid data range.\")\n\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if (self._range_size is not None and\n        self._current_offset >= self._range_size):\n      return b\"\"\n\n    if size is None:\n      size = self._range_size\n    if self._range_size is not None and self._current_offset + size > self._range_size:\n      size = self._range_size - self._current_offset\n\n    self._file_object.seek(\n        self._range_offset + self._current_offset, os.SEEK_SET)\n\n    data = self._file_object.read(size)\n\n    self._current_offset += len(data)\n\n    return data\n\n  def seek(self, offset, whence=os.SEEK_SET):\n    \"\"\"Seeks to an offset within the file-like object.\n\n    Args:\n      offset (int): offset to seek to.\n      whence (Optional(int)): value that indicates whether offset is an absolute\n          or relative position within the file.\n\n    Raises:\n      IOError: if the seek failed.\n    \"\"\"\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if whence == os.SEEK_CUR:\n      offset += self._current_offset\n    elif whence == os.SEEK_END:\n      offset += self._range_size\n    elif whence != os.SEEK_SET:\n      raise IOError(\"Unsupported whence.\")\n    if offset < 0:\n      raise IOError(\"Invalid offset value less than zero.\")\n\n    self._current_offset = offset\n\n\nclass AttributeTypeTests(unittest.TestCase):\n  \"\"\"Tests the attribute type.\"\"\"\n\n  def test_get_attribute_type(self):\n    \"\"\"Tests the get_attribute_type function and attribute_type property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_attributes:\n          raise unittest.SkipTest('missing attributes')\n\n        fsntfs_attribute = fsntfs_file_entry.get_attribute(0)\n        self.assertIsNotNone(fsntfs_attribute)\n\n        attribute_type = fsntfs_attribute.get_attribute_type()\n        self.assertIsNotNone(attribute_type)\n\n        self.assertIsNotNone(fsntfs_attribute.attribute_type)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_attribute_name(self):\n    \"\"\"Tests the get_attribute_name function and attribute_name property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_attributes:\n          raise unittest.SkipTest('missing attributes')\n\n        fsntfs_attribute = fsntfs_file_entry.get_attribute(0)\n        self.assertIsNotNone(fsntfs_attribute)\n\n        attribute_name = fsntfs_attribute.get_attribute_name()\n        self.assertIsNone(attribute_name)\n\n        self.assertIsNone(fsntfs_attribute.attribute_name)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_data_size(self):\n    \"\"\"Tests the get_data_size function and data_size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_attributes:\n          raise unittest.SkipTest('missing attributes')\n\n        fsntfs_attribute = fsntfs_file_entry.get_attribute(0)\n        self.assertIsNotNone(fsntfs_attribute)\n\n        data_size = fsntfs_attribute.get_data_size()\n        self.assertIsNotNone(data_size)\n\n        self.assertIsNotNone(fsntfs_attribute.data_size)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_valid_data_size(self):\n    \"\"\"Tests the get_valid_data_size function and valid_data_size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_attributes:\n          raise unittest.SkipTest('missing attributes')\n\n        fsntfs_attribute = fsntfs_file_entry.get_attribute(0)\n        self.assertIsNotNone(fsntfs_attribute)\n\n        valid_data_size = fsntfs_attribute.get_valid_data_size()\n        self.assertIsNotNone(valid_data_size)\n\n        self.assertIsNotNone(fsntfs_attribute.valid_data_size)\n\n      finally:\n        fsntfs_volume.close()\n\n\nif __name__ == \"__main__\":\n  argument_parser = argparse.ArgumentParser()\n\n  argument_parser.add_argument(\n      \"-o\", \"--offset\", dest=\"offset\", action=\"store\", default=None,\n      type=int, help=\"offset of the source file.\")\n\n  argument_parser.add_argument(\n      \"source\", nargs=\"?\", action=\"store\", metavar=\"PATH\",\n      default=None, help=\"path of the source file.\")\n\n  options, unknown_options = argument_parser.parse_known_args()\n  unknown_options.insert(0, sys.argv[0])\n\n  setattr(unittest, \"offset\", options.offset)\n  setattr(unittest, \"source\", options.source)\n\n  unittest.main(argv=unknown_options, verbosity=2)\n"
  },
  {
    "path": "tests/pyfsntfs_test_file_entry.py",
    "content": "#!/usr/bin/env python\n#\n# Python-bindings file_entry type test script\n#\n# Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n#\n# Refer to AUTHORS for acknowledgements.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nimport argparse\nimport os\nimport random\nimport sys\nimport unittest\n\nimport pyfsntfs\n\n\nclass DataRangeFileObject(object):\n  \"\"\"File-like object that maps an in-file data range.\"\"\"\n\n  def __init__(self, path, range_offset, range_size):\n    \"\"\"Initializes a file-like object.\n\n    Args:\n      path (str): path of the file that contains the data range.\n      range_offset (int): offset where the data range starts.\n      range_size (int): size of the data range starts, or None to indicate\n          the range should continue to the end of the parent file-like object.\n    \"\"\"\n    if range_size is None:\n      stat_object = os.stat(path)\n      range_size = stat_object.st_size\n\n    super(DataRangeFileObject, self).__init__()\n    self._current_offset = 0\n    self._file_object = open(path, \"rb\")\n    self._range_offset = range_offset\n    self._range_size = range_size\n\n  def __enter__(self):\n    \"\"\"Enters a with statement.\"\"\"\n    return self\n\n  def __exit__(self, unused_type, unused_value, unused_traceback):\n    \"\"\"Exits a with statement.\"\"\"\n    return\n\n  def close(self):\n    \"\"\"Closes the file-like object.\"\"\"\n    if self._file_object:\n      self._file_object.close()\n      self._file_object = None\n\n  def get_offset(self):\n    \"\"\"Retrieves the current offset into the file-like object.\n\n    Returns:\n      int: current offset in the data range.\n    \"\"\"\n    return self._current_offset\n\n  def get_size(self):\n    \"\"\"Retrieves the size of the file-like object.\n\n    Returns:\n      int: size of the data range.\n    \"\"\"\n    return self._range_size\n\n  def read(self, size=None):\n    \"\"\"Reads a byte string from the file-like object at the current offset.\n\n    The function will read a byte string of the specified size or\n    all of the remaining data if no size was specified.\n\n    Args:\n      size (Optional[int]): number of bytes to read, where None is all\n          remaining data.\n\n    Returns:\n      bytes: data read.\n\n    Raises:\n      IOError: if the read failed.\n    \"\"\"\n    if (self._range_offset < 0 or\n        (self._range_size is not None and self._range_size < 0)):\n      raise IOError(\"Invalid data range.\")\n\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if (self._range_size is not None and\n        self._current_offset >= self._range_size):\n      return b\"\"\n\n    if size is None:\n      size = self._range_size\n    if self._range_size is not None and self._current_offset + size > self._range_size:\n      size = self._range_size - self._current_offset\n\n    self._file_object.seek(\n        self._range_offset + self._current_offset, os.SEEK_SET)\n\n    data = self._file_object.read(size)\n\n    self._current_offset += len(data)\n\n    return data\n\n  def seek(self, offset, whence=os.SEEK_SET):\n    \"\"\"Seeks to an offset within the file-like object.\n\n    Args:\n      offset (int): offset to seek to.\n      whence (Optional(int)): value that indicates whether offset is an absolute\n          or relative position within the file.\n\n    Raises:\n      IOError: if the seek failed.\n    \"\"\"\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if whence == os.SEEK_CUR:\n      offset += self._current_offset\n    elif whence == os.SEEK_END:\n      offset += self._range_size\n    elif whence != os.SEEK_SET:\n      raise IOError(\"Unsupported whence.\")\n    if offset < 0:\n      raise IOError(\"Invalid offset value less than zero.\")\n\n    self._current_offset = offset\n\n\nclass FileEntryTypeTests(unittest.TestCase):\n  \"\"\"Tests the file_entry type.\"\"\"\n\n  def test_get_size(self):\n    \"\"\"Tests the get_size function and size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        size = fsntfs_file_entry.get_size()\n        self.assertIsNotNone(size)\n\n        self.assertIsNotNone(fsntfs_file_entry.size)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_number_of_extents(self):\n    \"\"\"Tests the get_number_of_extents function and number_of_extents property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        number_of_extents = fsntfs_file_entry.get_number_of_extents()\n        self.assertIsNotNone(number_of_extents)\n\n        self.assertIsNotNone(fsntfs_file_entry.number_of_extents)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_extent(self):\n    \"\"\"Tests the get_extent function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_extents:\n          raise unittest.SkipTest('missing extents')\n\n        extent = fsntfs_file_entry.get_extent(0)\n        self.assertIsNotNone(extent)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_is_empty(self):\n    \"\"\"Tests the is_empty function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        is_empty = fsntfs_file_entry.is_empty()\n        self.assertFalse(is_empty)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_is_allocated(self):\n    \"\"\"Tests the is_allocated function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        is_allocated = fsntfs_file_entry.is_allocated()\n        self.assertTrue(is_allocated)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_has_directory_entries_index(self):\n    \"\"\"Tests the has_directory_entries_index function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        has_directory_entries_index = fsntfs_file_entry.has_directory_entries_index()\n        self.assertFalse(has_directory_entries_index)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_has_default_data_stream(self):\n    \"\"\"Tests the has_default_data_stream function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        has_default_data_stream = fsntfs_file_entry.has_default_data_stream()\n        self.assertTrue(has_default_data_stream)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_file_reference(self):\n    \"\"\"Tests the get_file_reference function and file_reference property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        file_reference = fsntfs_file_entry.get_file_reference()\n        self.assertIsNotNone(file_reference)\n\n        self.assertIsNotNone(fsntfs_file_entry.file_reference)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_base_record_file_reference(self):\n    \"\"\"Tests the get_base_record_file_reference function and base_record_file_reference property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        base_record_file_reference = fsntfs_file_entry.get_base_record_file_reference()\n        self.assertIsNotNone(base_record_file_reference)\n\n        self.assertIsNotNone(fsntfs_file_entry.base_record_file_reference)\n\n      finally:\n        fsntfs_volume.close()\n\n  # TODO: add tests for parent_file_reference\n  # TODO: add tests for get_parent_file_reference_by_attribute_index\n\n  def test_get_journal_sequence_number(self):\n    \"\"\"Tests the get_journal_sequence_number function and journal_sequence_number property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        journal_sequence_number = fsntfs_file_entry.get_journal_sequence_number()\n        self.assertIsNotNone(journal_sequence_number)\n\n        self.assertIsNotNone(fsntfs_file_entry.journal_sequence_number)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_creation_time(self):\n    \"\"\"Tests the get_creation_time function and creation_time property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        creation_time = fsntfs_file_entry.get_creation_time()\n        self.assertIsNotNone(creation_time)\n\n        self.assertIsNotNone(fsntfs_file_entry.creation_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_creation_time_as_integer(self):\n    \"\"\"Tests the get_creation_time_as_integer function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        creation_time = fsntfs_file_entry.get_creation_time_as_integer()\n        self.assertIsNotNone(creation_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_modification_time(self):\n    \"\"\"Tests the get_modification_time function and modification_time property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        modification_time = fsntfs_file_entry.get_modification_time()\n        self.assertIsNotNone(modification_time)\n\n        self.assertIsNotNone(fsntfs_file_entry.modification_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_modification_time_as_integer(self):\n    \"\"\"Tests the get_modification_time_as_integer function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        modification_time = fsntfs_file_entry.get_modification_time_as_integer()\n        self.assertIsNotNone(modification_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_access_time(self):\n    \"\"\"Tests the get_access_time function and access_time property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        access_time = fsntfs_file_entry.get_access_time()\n        self.assertIsNotNone(access_time)\n\n        self.assertIsNotNone(fsntfs_file_entry.access_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_access_time_as_integer(self):\n    \"\"\"Tests the get_access_time_as_integer function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        access_time = fsntfs_file_entry.get_access_time_as_integer()\n        self.assertIsNotNone(access_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_entry_modification_time(self):\n    \"\"\"Tests the get_entry_modification_time function and entry_modification_time property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        entry_modification_time = fsntfs_file_entry.get_entry_modification_time()\n        self.assertIsNotNone(entry_modification_time)\n\n        self.assertIsNotNone(fsntfs_file_entry.entry_modification_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_entry_modification_time_as_integer(self):\n    \"\"\"Tests the get_entry_modification_time_as_integer function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        entry_modification_time = fsntfs_file_entry.get_entry_modification_time_as_integer()\n        self.assertIsNotNone(entry_modification_time)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_name(self):\n    \"\"\"Tests the get_name function and name property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        name = fsntfs_file_entry.get_name()\n        self.assertIsNotNone(name)\n\n        self.assertIsNotNone(fsntfs_file_entry.name)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_name_attribute_index(self):\n    \"\"\"Tests the get_name_attribute_index function and name_attribute_index property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        name_attribute_index = fsntfs_file_entry.get_name_attribute_index()\n        self.assertIsNotNone(name_attribute_index)\n\n        self.assertIsNotNone(fsntfs_file_entry.name_attribute_index)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_file_attribute_flags(self):\n    \"\"\"Tests the get_file_attribute_flags function and file_attribute_flags property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        file_attribute_flags = fsntfs_file_entry.get_file_attribute_flags()\n        self.assertIsNotNone(file_attribute_flags)\n\n        self.assertIsNotNone(fsntfs_file_entry.file_attribute_flags)\n\n      finally:\n        fsntfs_volume.close()\n\n  # TODO: add tests for path_hint\n\n  def test_get_symbolic_link_target(self):\n    \"\"\"Tests the get_symbolic_link_target function and symbolic_link_target property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        symbolic_link_target = fsntfs_file_entry.get_symbolic_link_target()\n        self.assertIsNone(symbolic_link_target)\n\n        self.assertIsNone(fsntfs_file_entry.symbolic_link_target)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_security_descriptor_data(self):\n    \"\"\"Tests the get_security_descriptor_data function and security_descriptor_data property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_root_directory()\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        security_descriptor_data = fsntfs_file_entry.get_security_descriptor_data()\n        self.assertIsNotNone(security_descriptor_data)\n\n        self.assertIsNotNone(fsntfs_file_entry.security_descriptor_data)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_number_of_attributes(self):\n    \"\"\"Tests the get_number_of_attributes function and number_of_attributes property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        number_of_attributes = fsntfs_file_entry.get_number_of_attributes()\n        self.assertIsNotNone(number_of_attributes)\n\n        self.assertIsNotNone(fsntfs_file_entry.number_of_attributes)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_attribute(self):\n    \"\"\"Tests the get_attribute function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        if not fsntfs_file_entry.number_of_attributes:\n          raise unittest.SkipTest('missing attributes')\n\n        attribute = fsntfs_file_entry.get_attribute(0)\n        self.assertIsNotNone(attribute)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_number_of_alternate_data_streams(self):\n    \"\"\"Tests the get_number_of_alternate_data_streams function and number_of_alternate_data_streams property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        number_of_alternate_data_streams = fsntfs_file_entry.get_number_of_alternate_data_streams()\n        self.assertIsNotNone(number_of_alternate_data_streams)\n\n        self.assertIsNotNone(fsntfs_file_entry.number_of_alternate_data_streams)\n\n      finally:\n        fsntfs_volume.close()\n\n  # TODO: add tests for get_alternate_data_stream\n  # TODO: add tests for has_alternate_data_stream_by_name\n  # TODO: add tests for get_alternate_data_stream_by_name\n\n  def test_get_number_of_sub_file_entries(self):\n    \"\"\"Tests the get_number_of_sub_file_entries function and number_of_sub_file_entries property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        fsntfs_file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(fsntfs_file_entry)\n\n        number_of_sub_file_entries = fsntfs_file_entry.get_number_of_sub_file_entries()\n        self.assertIsNotNone(number_of_sub_file_entries)\n\n        self.assertIsNotNone(fsntfs_file_entry.number_of_sub_file_entries)\n\n      finally:\n        fsntfs_volume.close()\n\n  # TODO: add tests for get_sub_file_entry\n\n\nif __name__ == \"__main__\":\n  argument_parser = argparse.ArgumentParser()\n\n  argument_parser.add_argument(\n      \"-o\", \"--offset\", dest=\"offset\", action=\"store\", default=None,\n      type=int, help=\"offset of the source file.\")\n\n  argument_parser.add_argument(\n      \"source\", nargs=\"?\", action=\"store\", metavar=\"PATH\",\n      default=None, help=\"path of the source file.\")\n\n  options, unknown_options = argument_parser.parse_known_args()\n  unknown_options.insert(0, sys.argv[0])\n\n  setattr(unittest, \"offset\", options.offset)\n  setattr(unittest, \"source\", options.source)\n\n  unittest.main(argv=unknown_options, verbosity=2)\n"
  },
  {
    "path": "tests/pyfsntfs_test_support.py",
    "content": "#!/usr/bin/env python\n#\n# Python-bindings support functions test script\n#\n# Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n#\n# Refer to AUTHORS for acknowledgements.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nimport argparse\nimport os\nimport sys\nimport unittest\n\nimport pyfsntfs\n\n\nclass SupportFunctionsTests(unittest.TestCase):\n  \"\"\"Tests the support functions.\"\"\"\n\n  def test_get_version(self):\n    \"\"\"Tests the get_version function.\"\"\"\n    version = pyfsntfs.get_version()\n    self.assertIsNotNone(version)\n\n\nif __name__ == \"__main__\":\n  argument_parser = argparse.ArgumentParser()\n\n  argument_parser.add_argument(\n      \"source\", nargs=\"?\", action=\"store\", metavar=\"PATH\",\n      default=None, help=\"path of the source file.\")\n\n  options, unknown_options = argument_parser.parse_known_args()\n  unknown_options.insert(0, sys.argv[0])\n\n  setattr(unittest, \"source\", options.source)\n\n  unittest.main(argv=unknown_options, verbosity=2)\n"
  },
  {
    "path": "tests/pyfsntfs_test_volume.py",
    "content": "#!/usr/bin/env python\n#\n# Python-bindings volume type test script\n#\n# Copyright (C) 2010-2026, Joachim Metz <joachim.metz@gmail.com>\n#\n# Refer to AUTHORS for acknowledgements.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nimport argparse\nimport os\nimport sys\nimport unittest\n\nimport pyfsntfs\n\n\nclass DataRangeFileObject(object):\n  \"\"\"File-like object that maps an in-file data range.\"\"\"\n\n  def __init__(self, path, range_offset, range_size):\n    \"\"\"Initializes a file-like object.\n\n    Args:\n      path (str): path of the file that contains the data range.\n      range_offset (int): offset where the data range starts.\n      range_size (int): size of the data range starts, or None to indicate\n          the range should continue to the end of the parent file-like object.\n    \"\"\"\n    if range_size is None:\n      stat_object = os.stat(path)\n      range_size = stat_object.st_size\n\n    super(DataRangeFileObject, self).__init__()\n    self._current_offset = 0\n    self._file_object = open(path, \"rb\")\n    self._range_offset = range_offset\n    self._range_size = range_size\n\n  def __enter__(self):\n    \"\"\"Enters a with statement.\"\"\"\n    return self\n\n  def __exit__(self, unused_type, unused_value, unused_traceback):\n    \"\"\"Exits a with statement.\"\"\"\n    return\n\n  def close(self):\n    \"\"\"Closes the file-like object.\"\"\"\n    if self._file_object:\n      self._file_object.close()\n      self._file_object = None\n\n  def get_offset(self):\n    \"\"\"Retrieves the current offset into the file-like object.\n\n    Returns:\n      int: current offset in the data range.\n    \"\"\"\n    return self._current_offset\n\n  def get_size(self):\n    \"\"\"Retrieves the size of the file-like object.\n\n    Returns:\n      int: size of the data range.\n    \"\"\"\n    return self._range_size\n\n  def read(self, size=None):\n    \"\"\"Reads a byte string from the file-like object at the current offset.\n\n    The function will read a byte string of the specified size or\n    all of the remaining data if no size was specified.\n\n    Args:\n      size (Optional[int]): number of bytes to read, where None is all\n          remaining data.\n\n    Returns:\n      bytes: data read.\n\n    Raises:\n      IOError: if the read failed.\n    \"\"\"\n    if (self._range_offset < 0 or\n        (self._range_size is not None and self._range_size < 0)):\n      raise IOError(\"Invalid data range.\")\n\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if (self._range_size is not None and\n        self._current_offset >= self._range_size):\n      return b\"\"\n\n    if size is None:\n      size = self._range_size\n    if self._range_size is not None and self._current_offset + size > self._range_size:\n      size = self._range_size - self._current_offset\n\n    self._file_object.seek(\n        self._range_offset + self._current_offset, os.SEEK_SET)\n\n    data = self._file_object.read(size)\n\n    self._current_offset += len(data)\n\n    return data\n\n  def seek(self, offset, whence=os.SEEK_SET):\n    \"\"\"Seeks to an offset within the file-like object.\n\n    Args:\n      offset (int): offset to seek to.\n      whence (Optional(int)): value that indicates whether offset is an absolute\n          or relative position within the file.\n\n    Raises:\n      IOError: if the seek failed.\n    \"\"\"\n    if self._current_offset < 0:\n      raise IOError(\n          \"Invalid current offset: {0:d} value less than zero.\".format(\n              self._current_offset))\n\n    if whence == os.SEEK_CUR:\n      offset += self._current_offset\n    elif whence == os.SEEK_END:\n      offset += self._range_size\n    elif whence != os.SEEK_SET:\n      raise IOError(\"Unsupported whence.\")\n    if offset < 0:\n      raise IOError(\"Invalid offset value less than zero.\")\n\n    self._current_offset = offset\n\n\nclass VolumeTypeTests(unittest.TestCase):\n  \"\"\"Tests the volume type.\"\"\"\n\n  def test_signal_abort(self):\n    \"\"\"Tests the signal_abort function.\"\"\"\n    fsntfs_volume = pyfsntfs.volume()\n\n    fsntfs_volume.signal_abort()\n\n  def test_open(self):\n    \"\"\"Tests the open function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    test_offset = getattr(unittest, \"offset\", None)\n    if test_offset:\n      raise unittest.SkipTest(\"unsupported source with offset\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    fsntfs_volume.open(test_source)\n\n    with self.assertRaises(IOError):\n      fsntfs_volume.open(test_source)\n\n    fsntfs_volume.close()\n\n    with self.assertRaises(TypeError):\n      fsntfs_volume.open(None)\n\n    with self.assertRaises(ValueError):\n      fsntfs_volume.open(test_source, mode=\"w\")\n\n  def test_open_file_object(self):\n    \"\"\"Tests the open_file_object function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    if not os.path.isfile(test_source):\n      raise unittest.SkipTest(\"source not a regular file\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume.open_file_object(file_object)\n\n      with self.assertRaises(IOError):\n        fsntfs_volume.open_file_object(file_object)\n\n      fsntfs_volume.close()\n\n      with self.assertRaises(TypeError):\n        fsntfs_volume.open_file_object(None)\n\n      with self.assertRaises(ValueError):\n        fsntfs_volume.open_file_object(file_object, mode=\"w\")\n\n  def test_close(self):\n    \"\"\"Tests the close function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    with self.assertRaises(IOError):\n      fsntfs_volume.close()\n\n  def test_open_close(self):\n    \"\"\"Tests the open and close functions.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      return\n\n    test_offset = getattr(unittest, \"offset\", None)\n    if test_offset:\n      raise unittest.SkipTest(\"unsupported source with offset\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    # Test open and close.\n    fsntfs_volume.open(test_source)\n    fsntfs_volume.close()\n\n    # Test open and close a second time to validate clean up on close.\n    fsntfs_volume.open(test_source)\n    fsntfs_volume.close()\n\n    if os.path.isfile(test_source):\n      with open(test_source, \"rb\") as file_object:\n\n        # Test open_file_object and close.\n        fsntfs_volume.open_file_object(file_object)\n        fsntfs_volume.close()\n\n        # Test open_file_object and close a second time to validate clean up on close.\n        fsntfs_volume.open_file_object(file_object)\n        fsntfs_volume.close()\n\n        # Test open_file_object and close and dereferencing file_object.\n        fsntfs_volume.open_file_object(file_object)\n        del file_object\n        fsntfs_volume.close()\n\n  def test_get_bytes_per_sector(self):\n    \"\"\"Tests the get_bytes_per_sector function and bytes_per_sector property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        bytes_per_sector = fsntfs_volume.get_bytes_per_sector()\n        self.assertIsNotNone(bytes_per_sector)\n\n        self.assertIsNotNone(fsntfs_volume.bytes_per_sector)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_cluster_block_size(self):\n    \"\"\"Tests the get_cluster_block_size function and cluster_block_size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        cluster_block_size = fsntfs_volume.get_cluster_block_size()\n        self.assertIsNotNone(cluster_block_size)\n\n        self.assertIsNotNone(fsntfs_volume.cluster_block_size)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_mft_entry_size(self):\n    \"\"\"Tests the get_mft_entry_size function and mft_entry_size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        mft_entry_size = fsntfs_volume.get_mft_entry_size()\n        self.assertIsNotNone(mft_entry_size)\n\n        self.assertIsNotNone(fsntfs_volume.mft_entry_size)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_index_entry_size(self):\n    \"\"\"Tests the get_index_entry_size function and index_entry_size property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        index_entry_size = fsntfs_volume.get_index_entry_size()\n        self.assertIsNotNone(index_entry_size)\n\n        self.assertIsNotNone(fsntfs_volume.index_entry_size)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_name(self):\n    \"\"\"Tests the get_name function and name property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        name = fsntfs_volume.get_name()\n        self.assertIsNotNone(name)\n\n        self.assertIsNotNone(fsntfs_volume.name)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_serial_number(self):\n    \"\"\"Tests the get_serial_number function and serial_number property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        serial_number = fsntfs_volume.get_serial_number()\n        self.assertIsNotNone(serial_number)\n\n        self.assertIsNotNone(fsntfs_volume.serial_number)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_number_of_file_entries(self):\n    \"\"\"Tests the get_number_of_file_entries function and number_of_file_entries property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        number_of_file_entries = fsntfs_volume.get_number_of_file_entries()\n        self.assertIsNotNone(number_of_file_entries)\n\n        self.assertIsNotNone(fsntfs_volume.number_of_file_entries)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_file_entry(self):\n    \"\"\"Tests the get_file_entry function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      if not fsntfs_volume.number_of_file_entries:\n        raise unittest.SkipTest('missing file entries')\n\n      try:\n        file_entry = fsntfs_volume.get_file_entry(0)\n        self.assertIsNotNone(file_entry)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_file_entry_by_path(self):\n    \"\"\"Tests the get_file_entry_by_path function.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest('missing source')\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        file_entry = fsntfs_volume.get_file_entry_by_path('\\\\$MFT')\n        self.assertIsNotNone(file_entry)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_root_directory(self):\n    \"\"\"Tests the get_root_directory function and root_directory property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        root_directory = fsntfs_volume.get_root_directory()\n        self.assertIsNotNone(root_directory)\n\n      finally:\n        fsntfs_volume.close()\n\n  def test_get_usn_change_journal(self):\n    \"\"\"Tests the get_usn_change_journal function and usn_change_journal property.\"\"\"\n    test_source = getattr(unittest, \"source\", None)\n    if not test_source:\n      raise unittest.SkipTest(\"missing source\")\n\n    fsntfs_volume = pyfsntfs.volume()\n\n    test_offset = getattr(unittest, \"offset\", None)\n\n    with DataRangeFileObject(\n        test_source, test_offset or 0, None) as file_object:\n\n      fsntfs_volume = pyfsntfs.volume()\n      fsntfs_volume.open_file_object(file_object)\n\n      try:\n        _ = fsntfs_volume.get_usn_change_journal()\n\n      finally:\n        fsntfs_volume.close()\n\n\nif __name__ == \"__main__\":\n  argument_parser = argparse.ArgumentParser()\n\n  argument_parser.add_argument(\n      \"-o\", \"--offset\", dest=\"offset\", action=\"store\", default=None,\n      type=int, help=\"offset of the source file.\")\n\n  argument_parser.add_argument(\n      \"source\", nargs=\"?\", action=\"store\", metavar=\"PATH\",\n      default=None, help=\"path of the source file.\")\n\n  options, unknown_options = argument_parser.parse_known_args()\n  unknown_options.insert(0, sys.argv[0])\n\n  setattr(unittest, \"offset\", options.offset)\n  setattr(unittest, \"source\", options.source)\n\n  unittest.main(argv=unknown_options, verbosity=2)\n"
  },
  {
    "path": "tests/runtests.py",
    "content": "#!/usr/bin/env python\n#\n# Script to run Python test scripts.\n#\n# Version: 20231024\n\nimport glob\nimport os\nimport sys\nimport unittest\n\n\ntest_profile = \".pyfsntfs\"\ninput_glob = \"*\"\noption_sets = [\"offset\"]\n\n\ndef ReadIgnoreList(test_profile):\n  \"\"\"Reads the test profile ignore file if it exists.\n\n  Args:\n    test_profile (str): test profile.\n\n  Returns:\n    set[str]: ignore list.\n  \"\"\"\n  ignore_file_path = os.path.join(\"tests\", \"input\", test_profile, \"ignore\")\n  if os.path.isfile(ignore_file_path):\n    with open(ignore_file_path, \"r\", encoding=\"utf-8\") as file_object:\n      return set([line.strip() for line in file_object.readlines()])\n\n  return set()\n\n\nif __name__ == \"__main__\":\n  print(f\"Using Python version {sys.version!s}\")\n\n  test_loader = unittest.TestLoader()\n  test_runner = unittest.TextTestRunner(verbosity=2)\n\n  test_scripts = test_loader.discover(\"tests\", pattern=\"*.py\")\n\n  ignore_list = ReadIgnoreList(test_profile)\n\n  test_set = None\n  source_file = None\n\n  for test_set in glob.glob(os.path.join(\"tests\", \"input\", \"*\")):\n    test_set = test_set.rsplit(os.path.sep, maxsplit=1)[-1]\n    if not test_set or test_set[0] == '.' or test_set in ignore_list:\n      continue\n\n    source_files = glob.glob(os.path.join(\n        \"tests\", \"input\", test_set, input_glob))\n    if source_files:\n      source_file = source_files[0]\n      break\n\n  setattr(unittest, \"source\", source_file)\n\n  if source_file:\n    for option_set in option_sets:\n      test_file = os.path.basename(source_file)\n      test_options_file_path = os.path.join(\n          \"tests\", \"input\", test_profile, test_set,\n          f\"{test_file:s}.{option_set:s}\")\n      if os.path.isfile(test_options_file_path):\n        with open(test_options_file_path, \"r\", encoding=\"utf-8\") as file_object:\n          lines = [line.strip() for line in file_object.readlines()]\n          if lines[0] == \"# libyal test data options\":\n            for line in lines[1:]:\n              key, value = line.split(\"=\", maxsplit=1)\n              if key == 'offset':\n                value = int(value)\n\n              setattr(unittest, key, value)\n\n  test_results = test_runner.run(test_scripts)\n  if not test_results.wasSuccessful():\n    sys.exit(1)\n"
  },
  {
    "path": "tests/runtests.sh",
    "content": "#!/bin/sh\n# Script to run tests\n#\n# Version: 20201121\n\nif test -f ${PWD}/libfsntfs/.libs/libfsntfs.1.dylib && test -f ./pyfsntfs/.libs/pyfsntfs.so;\nthen\n\tinstall_name_tool -change /usr/local/lib/libfsntfs.1.dylib ${PWD}/libfsntfs/.libs/libfsntfs.1.dylib ./pyfsntfs/.libs/pyfsntfs.so;\nfi\n\nmake check CHECK_WITH_STDERR=1;\nRESULT=$?;\n\nif test ${RESULT} -ne 0 && test -f tests/test-suite.log;\nthen\n\tcat tests/test-suite.log;\nfi\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/syncsharedlibs.sh",
    "content": "#!/bin/sh\n# Script that synchronizes the shared library dependencies\n#\n# Version: 20201121\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\n\nGIT_URL_PREFIX=\"https://github.com/libyal\";\nSHARED_LIBS=\"libcerror libcthreads libcdata libclocale libcnotify libcsplit libuna libcfile libcpath libbfio libfcache libfdata libfdatetime libfguid libfwnt libhmac\";\n\nUSE_HEAD=\"\";\n\nif test \"$1\" = \"--use-head\";\nthen\n\tUSE_HEAD=\"--use-head\";\nfi\n\nOLDIFS=$IFS;\nIFS=\" \";\n\nfor SHARED_LIB in ${SHARED_LIBS};\ndo\n\tGIT_URL=\"${GIT_URL_PREFIX}/${SHARED_LIB}.git\";\n\n\tgit clone --quiet ${GIT_URL} ${SHARED_LIB}-$$;\n\n\tif ! test -d ${SHARED_LIB}-$$;\n\tthen\n\t\techo \"Unable to git clone: ${GIT_URL}\";\n\n\t\tIFS=$OLDIFS;\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n\t(cd ${SHARED_LIB}-$$ && git fetch --quiet --all --tags --prune)\n\n\tLATEST_TAG=`cd ${SHARED_LIB}-$$ && git describe --tags --abbrev=0`;\n\n\tif test -n ${LATEST_TAG} && test -z ${USE_HEAD};\n\tthen\n\t\techo \"Synchronizing: ${SHARED_LIB} from ${GIT_URL} tag ${LATEST_TAG}\";\n\n\t\t(cd ${SHARED_LIB}-$$ && git checkout --quiet tags/${LATEST_TAG});\n\telse\n\t\techo \"Synchronizing: ${SHARED_LIB} from ${GIT_URL} HEAD\";\n\tfi\n\n\t(cd ${SHARED_LIB}-$$ && ./synclibs.sh ${USE_HEAD} && ./autogen.sh);\n\n\tCONFIGURE_OPTIONS=\"\";\n\n\t(cd ${SHARED_LIB}-$$ && ./configure --help | grep -- '--enable-wide-character-type' > /dev/null);\n\n\tif test $? -eq 0;\n\tthen\n\t\tCONFIGURE_OPTIONS=\"${CONFIGURE_OPTIONS} --enable-wide-character-type\";\n\tfi\n\n\t(cd ${SHARED_LIB}-$$ && ./configure --prefix=/usr ${CONFIGURE_OPTIONS} && make && sudo make install);\n\n\trm -rf ${SHARED_LIB}-$$;\ndone\n\nIFS=$OLDIFS;\n\nexit ${EXIT_SUCCESS};\n\n"
  },
  {
    "path": "tests/test_fsntfsinfo.ps1",
    "content": "# Info tool testing script\n#\n# Version: 20251224\n\n$ExitSuccess = 0\n$ExitFailure = 1\n$ExitIgnore = 77\n\n$Profiles = @(\"fsntfsinfo\", \"fsntfsinfo_fs\", \"fsntfsinfo_mft\", \"fsntfsinfo_usn\")\n$OptionsPerProfile = @(\"\", \"-H\", \"-Eall\", \"-U\")\n$OptionSets = \"offset\"\n\n$InputGlob = \"*\"\n\nFunction GetTestExecutablesDirectory\n{\n\t$TestExecutablesDirectory = \"\"\n\n\tForEach (${VSDirectory} in (\"msvscpp\", \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\", \"vs2017\", \"vs2019\", \"vs2022\"))\n\t{\n\t\tForEach (${VSConfiguration} in (\"Release\", \"VSDebug\"))\n\t\t{\n\t\t\tForEach (${VSPlatform} in (\"Win32\", \"x64\"))\n\t\t\t{\n\t\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\\${VSPlatform}\"\n\n\t\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t\t{\n\t\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\"\n\n\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t{\n\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t}\n\t\t}\n\t}\n\tReturn ${TestExecutablesDirectory}\n}\n\nFunction ReadIgnoreList\n{\n\tparam( [string]$TestProfileDirectory )\n\n\t$IgnoreFile = \"${TestProfileDirectory}\\ignore\"\n\t$IgnoreList = \"\"\n\n\tIf (Test-Path -Path ${IgnoreFile} -PathType Leaf)\n\t{\n\t\t$IgnoreList = Get-Content -Path ${IgnoreFile} | Where {$_ -notmatch '^#.*'}\n\t}\n\tReturn $IgnoreList\n}\n\n$TestExecutablesDirectory = GetTestExecutablesDirectory\n\nIf (-Not (Test-Path ${TestExecutablesDirectory}))\n{\n\tWrite-Host \"Missing test executables directory.\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n\n$TestExecutable = \"${TestExecutablesDirectory}\\fsntfsinfo.exe\"\n\nIf (-Not (Test-Path -Path \"input\"))\n{\n\tExit ${ExitIgnore}\n}\n$Result = ${ExitSuccess}\n\nFor ($ProfileIndex = 0; $ProfileIndex -le ($Profiles.length - 1); $ProfileIndex += 1)\n{\n\t$TestProfile = $Profiles[$ProfileIndex]\n\t$Options = $OptionsPerProfile[$ProfileIndex]\n\n\t$TestProfileDirectory = \"input\\.${TestProfile}\"\n\n\tIf (-Not (Test-Path -Path ${TestProfileDirectory} -PathType Container))\n\t{\n\t\tNew-Item -ItemType \"directory\" -Path ${TestProfileDirectory} | Out-Null\n\t}\n\t$IgnoreList = ReadIgnoreList ${TestProfileDirectory}\n\n\tForEach ($TestSetInputDirectory in Get-ChildItem -Path \"input\" -Exclude \".*\")\n\t{\n\t\tIf (-Not (Test-Path -Path ${TestSetInputDirectory} -PathType Container))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\tIf (${TestSetInputDirectory} -Contains ${IgnoreList})\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\t$TestSetName = ${TestSetInputDirectory}.Name\n\n\t\tIf (Test-Path -Path \"${TestProfileDirectory}\\${TestSetName}\\files\" -PathType Leaf)\n\t\t{\n\t\t\t$InputFiles = Get-Content -Path \"${TestProfileDirectory}\\${TestSetName}\\files\" | Where {$_ -ne \"\"}\n\t\t\t$InputFiles = $InputFiles -replace \"^\",\"${TestSetInputDirectory}\\\"\n\t\t}\n\t\tElse\n\t\t{\n\t\t\t$InputFiles = Get-ChildItem -Path ${TestSetInputDirectory} -Include ${InputGlob}\n\t\t}\n\t\tForEach ($InputFile in ${InputFiles})\n\t\t{\n\t\t\t$InputFileName = ${InputFile}.Name\n\n\t\t\t$TestedWithOptions = $False\n\n\t\t\t$TmpDir = \"tmp${PID}\"\n\n\t\t\tNew-Item -Name ${TmpDir} -ItemType \"directory\" | Out-Null\n\n\t\t\tPush-Location ${TmpDir}\n\n\t\t\tTry\n\t\t\t{\n\t\t\t\tForEach ($OptionSet in ${OptionSets} -split \" \")\n\t\t\t\t{\n\t\t\t\t\t$TestDataOptionFile = \"..\\${TestProfileDirectory}\\${TestSetName}\\${InputFileName}.${OptionSet}\"\n\n\t\t\t\t\tIf (-Not (Test-Path -Path \"${TestDataOptionFile}\" -PathType Leaf))\n\t\t\t\t\t{\n\t\t\t\t\t\tContinue\n\t\t\t\t\t}\n\t\t\t\t\t$OptionsHeader = Get-content -Path \"${TestDataOptionFile}\" -First 1\n\n\t\t\t\t\tIf (-Not (${OptionsHeader} -match \"^# libyal test data options\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tContinue\n\t\t\t\t\t}\n\t\t\t\t\t$InputOptions = Get-content -Path \"${TestDataOptionFile}\" | Select-Object -Skip 1\n\n\t\t\t\t\t$InputOptions = $InputOptions -replace \"^offset=\",\"-o\"\n\t\t\t\t\t$InputOptions = $InputOptions -replace \"^password=\",\"-p\"\n\t\t\t\t\t$InputOptions = $InputOptions -replace \"^recovery_password=\",\"-r\"\n\t\t\t\t\t$InputOptions = $InputOptions -replace \"^startup_key=\",\"-s\"\n\t\t\t\t\t$InputOptions = $InputOptions -replace \"^virtual_address=\",\"-v\"\n\n\t\t\t\t\t$TestLog = \"${InputFileName}-${OptionSet}.log\"\n\n\t\t\t\t\tInvoke-Expression \"..\\${TestExecutable} ${Options} ${InputOptions} ${InputFile} > ${TestLog}\"\n\t\t\t\t\t$Result = $LastExitCode\n\n\t\t\t\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t\t\t\t{\n\t\t\t\t\t\tBreak\n\t\t\t\t\t}\n\t\t\t\t\t$TestedWithOptions = $True\n\t\t\t\t}\n\t\t\t\tIf ((${Result} -eq ${ExitSuccess}) -And (-Not (${TestedWithOptions})))\n\t\t\t\t{\n\t\t\t\t\t$TestLog = \"${InputFileName}.log\"\n\n\t\t\t\t\tInvoke-Expression \"..\\${TestExecutable} ${Options} ${InputFile} > ${TestLog}\"\n\t\t\t\t\t$Result = $LastExitCode\n\t\t\t\t}\n\t\t\t\tIf (${Result} -eq ${ExitSuccess})\n\t\t\t\t{\n\t\t\t\t\t# Strip header with version.\n\t\t\t\t\t(Get-Content ${TestLog} | Select-Object -Skip 2) | Set-Content ${TestLog}\n\n\t\t\t\t\t$StoredTestLog = \"..\\${TestProfileDirectory}\\${TestSetName}\\${TestLog}\"\n\n\t\t\t\t\tIf (Test-Path -Path ${StoredTestLog} -PathType Leaf)\n\t\t\t\t\t{\n\t\t\t\t\t\t$Difference = Compare-Object -ReferenceObject (Get-Content -Path ${StoredTestLog}) -DifferenceObject (Get-Content -Path ${TestLog})\n\n\t\t\t\t\t\tIf (${Difference})\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$Result = ${ExitFailure}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tElse\n\t\t\t\t\t{\n\t\t\t\t\t\tMove-Item -Path ${TestLog} -Destination ${StoredTestLog}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tFinally\n\t\t\t{\n\t\t\t\tPop-Location\n\n\t\t\t\tRemove-Item ${TmpDir} -Force -Recurse\n\t\t\t}\n\t\t}\n\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t{\n\t\t\tBreak\n\t\t}\n\t}\n}\n\nExit ${Result}\n\n"
  },
  {
    "path": "tests/test_fsntfsinfo.sh",
    "content": "#!/usr/bin/env bash\n# Info tool testing script\n#\n# Version: 20240413\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nPROFILES=(\"fsntfsinfo\" \"fsntfsinfo_fs\" \"fsntfsinfo_mft\" \"fsntfsinfo_usn\");\nOPTIONS_PER_PROFILE=(\"\" \"-H\" \"-Eall\" \"-U\");\nOPTION_SETS=(\"offset\");\n\nINPUT_GLOB=\"*\";\n\nif test -n \"${SKIP_TOOLS_TESTS}\" || test -n \"${SKIP_TOOLS_END_TO_END_TESTS}\";\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_EXECUTABLE=\"../fsntfstools/fsntfsinfo\";\n\nif ! test -x \"${TEST_EXECUTABLE}\";\nthen\n\tTEST_EXECUTABLE=\"../fsntfstools/fsntfsinfo.exe\";\nfi\n\nif ! test -x \"${TEST_EXECUTABLE}\";\nthen\n\techo \"Missing test executable: ${TEST_EXECUTABLE}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nif ! test -d \"input\";\nthen\n\techo \"Test input directory not found.\";\n\n\texit ${EXIT_IGNORE};\nfi\nRESULT=`ls input/* | tr ' ' '\\n' | wc -l`;\n\nif test ${RESULT} -eq ${EXIT_SUCCESS};\nthen\n\techo \"No files or directories found in the test input directory\";\n\n\texit ${EXIT_IGNORE};\nfi\n\nfor PROFILE_INDEX in ${!PROFILES[*]};\ndo\n\tTEST_PROFILE=${PROFILES[${PROFILE_INDEX}]};\n\n\tTEST_PROFILE_DIRECTORY=$(get_test_profile_directory \"input\" \"${TEST_PROFILE}\");\n\n\tIGNORE_LIST=$(read_ignore_list \"${TEST_PROFILE_DIRECTORY}\");\n\n\tIFS=\" \" read -a PROFILE_OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]};\n\n\tRESULT=${EXIT_SUCCESS};\n\n\tfor TEST_SET_INPUT_DIRECTORY in input/*;\n\tdo\n\t\tif ! test -d \"${TEST_SET_INPUT_DIRECTORY}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tTEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`;\n\n\t\tif check_for_test_set_in_ignore_list \"${TEST_SET}\" \"${IGNORE_LIST}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tTEST_SET_DIRECTORY=$(get_test_set_directory \"${TEST_PROFILE_DIRECTORY}\" \"${TEST_SET_INPUT_DIRECTORY}\");\n\n\t\tRESULT=${EXIT_SUCCESS};\n\n\t\tif test -f \"${TEST_SET_DIRECTORY}/files\";\n\t\tthen\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed \"s?^?${TEST_SET_INPUT_DIRECTORY}/?\");\n\t\telse\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});\n\t\tfi\n\t\tfor INPUT_FILE in \"${INPUT_FILES[@]}\";\n\t\tdo\n\t\t\tTESTED_WITH_OPTIONS=0;\n\n\t\t\tfor OPTION_SET in ${OPTION_SETS[@]};\n\t\t\tdo\n\t\t\t\tTEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\tif test -f ${TEST_DATA_OPTION_FILE};\n\t\t\t\tthen\n\t\t\t\t\tTESTED_WITH_OPTIONS=1;\n\n\t\t\t\t\tIFS=\" \" read -a OPTIONS <<< $(read_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"fsntfsinfo\" \"with_stdout_reference\" \"${OPTION_SET}\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${PROFILE_OPTIONS[@]}\" \"${OPTIONS[@]}\";\n\t\t\t\t\tRESULT=$?;\n\n\t\t\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\t\t\tthen\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif test ${TESTED_WITH_OPTIONS} -eq 0;\n\t\t\tthen\n\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"fsntfsinfo\" \"with_stdout_reference\" \"\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${PROFILE_OPTIONS[@]}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\tbreak;\n\t\t\tfi\n\t\tdone\n\n\t\t# Ignore failures due to corrupted data.\n\t\tif test \"${TEST_SET}\" = \"corrupted\";\n\t\tthen\n\t\t\tRESULT=${EXIT_SUCCESS};\n\t\tfi\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tbreak;\n\t\tfi\n\tdone\ndone\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/test_fsntfsinfo_bodyfile.ps1",
    "content": "# Info tool testing script\n#\n# Version: 20230410\n\n$ExitSuccess = 0\n$ExitFailure = 1\n$ExitIgnore = 77\n\n$Profiles = @(\"fsntfsinfo_bodyfile_fs\", \"fsntfsinfo_bodyfile_mft\")\n$OptionsPerProfile = @(\"-Bbodyfile -H\", \"-Bbodyfile -Eall\")\n$OptionSets = \"offset\"\n\n$InputGlob = \"*\"\n\nFunction GetTestExecutablesDirectory\n{\n\t$TestExecutablesDirectory = \"\"\n\n\tForEach (${VSDirectory} in (\"msvscpp\", \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\", \"vs2017\", \"vs2019\", \"vs2022\"))\n\t{\n\t\tForEach (${VSConfiguration} in (\"Release\", \"VSDebug\"))\n\t\t{\n\t\t\tForEach (${VSPlatform} in (\"Win32\", \"x64\"))\n\t\t\t{\n\t\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\\${VSPlatform}\"\n\n\t\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t\t{\n\t\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\"\n\n\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t{\n\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t}\n\t\t}\n\t}\n\tReturn ${TestExecutablesDirectory}\n}\n\nFunction ReadIgnoreList\n{\n\tparam( [string]$TestProfileDirectory )\n\n\t$IgnoreFile = \"${TestProfileDirectory}\\ignore\"\n\t$IgnoreList = \"\"\n\n\tIf (Test-Path -Path ${IgnoreFile} -PathType \"Leaf\")\n\t{\n\t\t$IgnoreList = Get-Content -Path ${IgnoreFile} | Where {$_ -notmatch '^#.*'}\n\t}\n\tReturn $IgnoreList\n}\n\n$TestExecutablesDirectory = GetTestExecutablesDirectory\n\nIf (-Not (Test-Path ${TestExecutablesDirectory}))\n{\n\tWrite-Host \"Missing test executables directory.\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n\n$TestExecutable = \"${TestExecutablesDirectory}\\fsntfsinfo.exe\"\n\nIf (-Not (Test-Path -Path \"input\"))\n{\n\tExit ${ExitIgnore}\n}\n$Result = ${ExitSuccess}\n\nFor ($ProfileIndex = 0; $ProfileIndex -le ($Profiles.length - 1); $ProfileIndex += 1)\n{\n\t$TestProfile = $Profiles[$ProfileIndex]\n\t$Options = $OptionsPerProfile[$ProfileIndex]\n\n\t$TestProfileDirectory = \"input\\.${TestProfile}\"\n\n\tIf (-Not (Test-Path -Path ${TestProfileDirectory} -PathType \"Container\"))\n\t{\n\t\tNew-Item -ItemType \"directory\" -Path ${TestProfileDirectory} | Out-Null\n\t}\n\t$IgnoreList = ReadIgnoreList ${TestProfileDirectory}\n\n\t# Note that the trailing backtick is needed.\n\tGet-ChildItem -Path \"input\" -Exclude \".*\" | ForEach-Object `\n\t{\n\t\t$TestSetDirectory = $_\n\n\t\tIf (-Not (Test-Path -Path ${TestSetDirectory} -PathType Container))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\t$TestSetName = ${TestSetDirectory}.Name\n\n\t\tIf (${IgnoreList}.Contains(${TestSetName}))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\tIf (-Not (Test-Path -Path \"${TestProfileDirectory}\\${TestSetName}\" -PathType Container))\n\t\t{\n\t\t\tNew-Item -Name \"${TestProfileDirectory}\\${TestSetName}\" -ItemType \"directory\" | Out-Null\n\t\t}\n\t\tIf (Test-Path -Path \"${TestProfileDirectory}\\${TestSetName}\\files\" -PathType Container)\n\t\t{\n\t\t\t$InputFiles = Get-content -Path \"${TestProfileDirectory}\\${TestSetName}\\files\"\n\t\t}\n\t\tElse\n\t\t{\n\t\t\t$InputFiles = Get-ChildItem -Path \"${TestSetDirectory}\\${InputGlob}\"\n\t\t}\n\t\tForEach ($InputFile in ${InputFiles})\n\t\t{\n\t\t\t$InputFileName = ${InputFile}.Name\n\n\t\t\t$TestedWithOptions = $False\n\n\t\t\t$TmpDir = \"tmp${PID}\"\n\n\t\t\tNew-Item -Name ${TmpDir} -ItemType \"directory\" | Out-Null\n\n\t\t\tPush-Location ${TmpDir}\n\n\t\t\tTry\n\t\t\t{\n\t\t\t\tForEach ($OptionSet in ${OptionSets} -split \" \")\n\t\t\t\t{\n\t\t\t\t\t$TestDataOptionFile = \"..\\${TestProfileDirectory}\\${TestSetName}\\${InputFileName}.${OptionSet}\"\n\n\t\t\t\t\tIf (-Not (Test-Path -Path \"${TestDataOptionFile}\" -PathType \"Leaf\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tContinue\n\t\t\t\t\t}\n\t\t\t\t\t$InputOptions = Get-content -Path \"${TestDataOptionFile}\" -First 1\n\n\t\t\t\t\t$TestLog = \"${InputFileName}-${OptionSet}.log\"\n\n\t\t\t\t\tInvoke-Expression \"..\\${TestExecutable} ${Options} ${InputOptions} ${InputFile} > ${TestLog}\"\n\t\t\t\t\t$Result = $LastExitCode\n\n\t\t\t\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t\t\t\t{\n\t\t\t\t\t\tBreak\n\t\t\t\t\t}\n\t\t\t\t\t$TestedWithOptions = $True\n\t\t\t\t}\n\t\t\t\tIf ((${Result} -eq ${ExitSuccess}) -And (-Not (${TestedWithOptions})))\n\t\t\t\t{\n\t\t\t\t\t$TestLog = \"${InputFileName}.log\"\n\n\t\t\t\t\tInvoke-Expression \"..\\${TestExecutable} ${Options} ${InputFile} > ${TestLog}\"\n\t\t\t\t\t$Result = $LastExitCode\n\t\t\t\t}\n\t\t\t\tIf (${Result} -eq ${ExitSuccess})\n\t\t\t\t{\n\t\t\t\t\t$TestResults = \"bodyfile\"\n\t\t\t\t\t$StoredTestResults = \"..\\${TestProfileDirectory}\\${TestSetName}\\${InputFileName}-bodyfile\"\n\n\t\t\t\t\tIf (Test-Path -Path ${StoredTestResults} -PathType \"Leaf\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$Difference = Compare-Object -ReferenceObject (Get-Content -Path ${StoredTestResults}) -DifferenceObject (Get-Content -Path ${TestResults})\n\n\t\t\t\t\t\tIf (${Difference})\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$Result = ${ExitFailure}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tElse\n\t\t\t\t\t{\n\t\t\t\t\t\tMove-Item -Path ${TestResults} -Destination ${StoredTestResults}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tFinally\n\t\t\t{\n\t\t\t\tPop-Location\n\n\t\t\t\tRemove-Item ${TmpDir} -Force -Recurse\n\t\t\t}\n\t\t}\n\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t{\n\t\t\tBreak\n\t\t}\n\t}\n}\n\nExit ${Result}\n\n"
  },
  {
    "path": "tests/test_fsntfsinfo_bodyfile.sh",
    "content": "#!/usr/bin/env bash\n# Info tool testing script\n#\n# Version: 20240413\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nPROFILES=(\"fsntfsinfo_bodyfile_fs\" \"fsntfsinfo_bodyfile_mft\");\nOPTIONS_PER_PROFILE=(\"-Bbodyfile -H\" \"-Bbodyfile -Eall\");\nOPTION_SETS=(\"offset\");\n\nINPUT_GLOB=\"*\";\n\ntest_callback()\n{\n\tlocal TMPDIR=$1;\n\tlocal TEST_SET_DIRECTORY=$2;\n\tlocal TEST_OUTPUT=$3;\n\tlocal TEST_EXECUTABLE=$4;\n\tlocal TEST_INPUT=$5;\n\tshift 5;\n\tlocal ARGUMENTS=(\"$@\");\n\n\tTEST_EXECUTABLE=$( readlink_f \"${TEST_EXECUTABLE}\" );\n\tINPUT_FILE_FULL_PATH=$( readlink_f \"${INPUT_FILE}\" );\n\n\t(cd ${TMPDIR} && run_test_with_input_and_arguments \"${TEST_EXECUTABLE}\" \"${INPUT_FILE_FULL_PATH}\" ${ARGUMENTS[@]} >/dev/null);\n\tlocal RESULT=$?;\n\n\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\tthen\n\t\tlocal TEST_RESULTS=\"${TMPDIR}/bodyfile\";\n\t\tlocal STORED_TEST_RESULTS=\"${TEST_SET_DIRECTORY}/${TEST_OUTPUT}-bodyfile.gz\";\n\n\t\tif test -f \"${STORED_TEST_RESULTS}\";\n\t\tthen\n\t\t\t# Using zcat here since zdiff has issues on Mac OS X.\n\t\t\t# Note that zcat on Mac OS X requires the input from stdin.\n\t\t\tzcat < \"${STORED_TEST_RESULTS}\" | diff \"${TEST_RESULTS}\" -;\n\t\t\tRESULT=$?;\n\t\telse\n\t\t\tgzip ${TEST_RESULTS};\n\n\t\t\tmv \"${TEST_RESULTS}.gz\" \"${TEST_SET_DIRECTORY}/${TEST_OUTPUT}-bodyfile.gz\";\n\t\tfi\n\tfi\n\treturn ${RESULT};\n}\n\nif ! test -z ${SKIP_TOOLS_TESTS};\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_EXECUTABLE=\"../fsntfstools/fsntfsinfo\";\n\nif ! test -x \"${TEST_EXECUTABLE}\";\nthen\n\tTEST_EXECUTABLE=\"../fsntfstools/fsntfsinfo.exe\";\nfi\n\nif ! test -x \"${TEST_EXECUTABLE}\";\nthen\n\techo \"Missing test executable: ${TEST_EXECUTABLE}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nif ! test -d \"input\";\nthen\n\techo \"Test input directory not found.\";\n\n\texit ${EXIT_IGNORE};\nfi\nRESULT=`ls input/* | tr ' ' '\\n' | wc -l`;\n\nif test ${RESULT} -eq ${EXIT_SUCCESS};\nthen\n\techo \"No files or directories found in the test input directory\";\n\n\texit ${EXIT_IGNORE};\nfi\n\nfor PROFILE_INDEX in ${!PROFILES[*]};\ndo\n\tTEST_PROFILE=${PROFILES[${PROFILE_INDEX}]};\n\n\tTEST_PROFILE_DIRECTORY=$(get_test_profile_directory \"input\" \"${TEST_PROFILE}\");\n\n\tIGNORE_LIST=$(read_ignore_list \"${TEST_PROFILE_DIRECTORY}\");\n\n\tIFS=\" \" read -a PROFILE_OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]};\n\n\tRESULT=${EXIT_SUCCESS};\n\n\tfor TEST_SET_INPUT_DIRECTORY in input/*;\n\tdo\n\t\tif ! test -d \"${TEST_SET_INPUT_DIRECTORY}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tTEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`;\n\n\t\tif check_for_test_set_in_ignore_list \"${TEST_SET}\" \"${IGNORE_LIST}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tTEST_SET_DIRECTORY=$(get_test_set_directory \"${TEST_PROFILE_DIRECTORY}\" \"${TEST_SET_INPUT_DIRECTORY}\");\n\n\t\tRESULT=${EXIT_SUCCESS};\n\n\t\tif test -f \"${TEST_SET_DIRECTORY}/files\";\n\t\tthen\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed \"s?^?${TEST_SET_INPUT_DIRECTORY}/?\");\n\t\telse\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});\n\t\tfi\n\t\tfor INPUT_FILE in \"${INPUT_FILES[@]}\";\n\t\tdo\n\t\t\tTESTED_WITH_OPTIONS=0;\n\n\t\t\tfor OPTION_SET in ${OPTION_SETS[@]};\n\t\t\tdo\n\t\t\t\tTEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\tif test -f ${TEST_DATA_OPTION_FILE};\n\t\t\t\tthen\n\t\t\t\t\tTESTED_WITH_OPTIONS=1;\n\n\t\t\t\t\tIFS=\" \" read -a OPTIONS <<< $(read_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"fsntfsinfo\" \"with_callback\" \"${OPTION_SET}\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${PROFILE_OPTIONS[@]}\" \"${OPTIONS[@]}\";\n\t\t\t\t\tRESULT=$?;\n\n\t\t\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\t\t\tthen\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif test ${TESTED_WITH_OPTIONS} -eq 0;\n\t\t\tthen\n\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"fsntfsinfo\" \"with_callback\" \"\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${PROFILE_OPTIONS[@]}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\tbreak;\n\t\t\tfi\n\t\tdone\n\n\t\t# Ignore failures due to corrupted data.\n\t\tif test \"${TEST_SET}\" = \"corrupted\";\n\t\tthen\n\t\t\tRESULT=${EXIT_SUCCESS};\n\t\tfi\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tbreak;\n\t\tfi\n\tdone\ndone\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/test_library.ps1",
    "content": "# Tests library functions and types.\n#\n# Version: 20251224\n\n$ExitSuccess = 0\n$ExitFailure = 1\n$ExitIgnore = 77\n\n$LibraryTests = \"attribute attribute_list_entry bitmap_values buffer_data_handle cluster_block cluster_block_data cluster_block_stream cluster_block_vector compressed_block compressed_block_data_handle compressed_block_vector compressed_data_handle compression compression_unit_data_handle compression_unit_descriptor data_run data_stream directory_entries_tree directory_entry error extent file_entry file_name_attribute file_name_values file_system fixup_values index index_entry index_entry_header index_entry_vector index_node index_node_header index_root_header index_value io_handle logged_utility_stream_values mft mft_attribute mft_attribute_list mft_attribute_list_entry mft_entry mft_entry_header name notify object_identifier_values path_hint profiler reparse_point_attribute reparse_point_values sds_index_value security_descriptor_index security_descriptor_index_value security_descriptor_values standard_information_values txf_data_values usn_change_journal volume_header volume_information_attribute volume_information_values volume_name_attribute volume_name_values\"\n$LibraryTestsWithInput = \"mft_metadata_file support volume\"\n$OptionSets = \"offset\"\n\n$InputGlob = \"*\"\n\nFunction GetTestExecutablesDirectory\n{\n\t$TestExecutablesDirectory = \"\"\n\n\tForEach (${VSDirectory} in (\"msvscpp\", \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\", \"vs2017\", \"vs2019\", \"vs2022\"))\n\t{\n\t\tForEach (${VSConfiguration} in (\"Release\", \"VSDebug\"))\n\t\t{\n\t\t\tForEach (${VSPlatform} in (\"Win32\", \"x64\"))\n\t\t\t{\n\t\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\\${VSPlatform}\"\n\n\t\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t\t{\n\t\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\"\n\n\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t{\n\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t}\n\t\t}\n\t}\n\tReturn ${TestExecutablesDirectory}\n}\n\nFunction ReadIgnoreList\n{\n\tparam( [string]$TestProfileDirectory )\n\n\t$IgnoreFile = \"${TestProfileDirectory}\\ignore\"\n\t$IgnoreList = \"\"\n\n\tIf (Test-Path -Path ${IgnoreFile} -PathType Leaf)\n\t{\n\t\t$IgnoreList = Get-Content -Path ${IgnoreFile} | Where {$_ -notmatch '^#.*'}\n\t}\n\tReturn $IgnoreList\n}\n\nFunction RunTest\n{\n\tparam( [string]$TestType )\n\n\t$TestDescription = \"Testing: ${TestName}\"\n\t$TestExecutable = \"${TestExecutablesDirectory}\\fsntfs_test_${TestName}.exe\"\n\n\tIf (-Not (Test-Path -Path ${TestExecutable} -PathType Leaf))\n\t{\n\t\tWrite-Host \"${TestDescription} (\" -nonewline\n\t\tWrite-Host \"SKIP\" -foreground Cyan -nonewline\n\t\tWrite-Host \")\"\n\n\t\tReturn ${ExitIgnore}\n\t}\n\t$Output = Invoke-Expression ${TestExecutable}\n\t$Result = ${LastExitCode}\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host ${Output} -foreground Red\n\t}\n\tWrite-Host \"${TestDescription} (\" -nonewline\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host \"FAIL\" -foreground Red -nonewline\n\t}\n\tElse\n\t{\n\t\tWrite-Host \"PASS\" -foreground Green -nonewline\n\t}\n\tWrite-Host \")\"\n\n\tReturn ${Result}\n}\n\nFunction RunTestWithInput\n{\n\tparam( [string]$TestType )\n\n\t$TestDescription = \"Testing: ${TestName}\"\n\t$TestExecutable = \"${TestExecutablesDirectory}\\fsntfs_test_${TestName}.exe\"\n\n\tIf (-Not (Test-Path -Path ${TestExecutable} -PathType Leaf))\n\t{\n\t\tWrite-Host \"${TestDescription} (\" -nonewline\n\t\tWrite-Host \"SKIP\" -foreground Cyan -nonewline\n\t\tWrite-Host \")\"\n\n\t\tReturn ${ExitIgnore}\n\t}\n\t$TestProfileDirectory = \"input\\.libfsntfs\"\n\n\tIf (-Not (Test-Path -Path ${TestProfileDirectory} -PathType Container))\n\t{\n\t\tNew-Item -ItemType \"directory\" -Path ${TestProfileDirectory}\n\t}\n\t$IgnoreList = ReadIgnoreList ${TestProfileDirectory}\n\n\t$Result = ${ExitSuccess}\n\n\tForEach ($TestSetInputDirectory in Get-ChildItem -Path \"input\" -Exclude \".*\")\n\t{\n\t\tIf (-Not (Test-Path -Path ${TestSetInputDirectory} -PathType Container))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\tIf (${TestSetInputDirectory} -Contains ${IgnoreList})\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\t$TestSetName = ${TestSetInputDirectory}.Name\n\n\t\tIf (Test-Path -Path \"${TestProfileDirectory}\\${TestSetName}\\files\" -PathType Leaf)\n\t\t{\n\t\t\t$InputFiles = Get-Content -Path \"${TestProfileDirectory}\\${TestSetName}\\files\" | Where {$_ -ne \"\"}\n\t\t\t$InputFiles = $InputFiles -replace \"^\",\"${TestSetInputDirectory}\\\"\n\t\t}\n\t\tElse\n\t\t{\n\t\t\t$InputFiles = Get-ChildItem -Path ${TestSetInputDirectory} -Include ${InputGlob}\n\t\t}\n\t\tForEach ($InputFile in ${InputFiles})\n\t\t{\n\t\t\t$TestedWithOptions = $False\n\n\t\t\tForEach ($OptionSet in ${OptionSets} -split \" \")\n\t\t\t{\n\t\t\t\t$InputFileName = ${InputFile}.Name\n\t\t\t\t$TestDataOptionFile = \"${TestProfileDirectory}\\${TestSetName}\\${InputFileName}.${OptionSet}\"\n\n\t\t\t\tIf (-Not (Test-Path -Path \"${TestDataOptionFile}\" -PathType Leaf))\n\t\t\t\t{\n\t\t\t\t\tContinue\n\t\t\t\t}\n\t\t\t\t$OptionsHeader = Get-content -Path \"${TestDataOptionFile}\" -First 1\n\n\t\t\t\tIf (-Not (${OptionsHeader} -match \"^# libyal test data options\"))\n\t\t\t\t{\n\t\t\t\t\tContinue\n\t\t\t\t}\n\t\t\t\t$InputOptions = Get-content -Path \"${TestDataOptionFile}\" | Select-Object -Skip 1\n\n\t\t\t\t$InputOptions = $InputOptions -replace \"^offset=\",\"-o\"\n\t\t\t\t$InputOptions = $InputOptions -replace \"^password=\",\"-p\"\n\t\t\t\t$InputOptions = $InputOptions -replace \"^recovery_password=\",\"-r\"\n\t\t\t\t$InputOptions = $InputOptions -replace \"^startup_key=\",\"-s\"\n\t\t\t\t$InputOptions = $InputOptions -replace \"^virtual_address=\",\"-v\"\n\n\t\t\t\t$Output = Invoke-Expression \"${TestExecutable} ${InputOptions} ${InputFile}\"\n\t\t\t\t$Result = $LastExitCode\n\n\t\t\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t\t\t{\n\t\t\t\t\tBreak\n\t\t\t\t}\n\t\t\t\t$TestedWithOptions = $True\n\t\t\t}\n\t\t\tIf ((${Result} -eq ${ExitSuccess}) -And (-Not (${TestedWithOptions})))\n\t\t\t{\n\t\t\t\t$Output = Invoke-Expression \"${TestExecutable} ${InputFile}\"\n\t\t\t\t$Result = ${LastExitCode}\n\t\t\t}\n\t\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t\t{\n\t\t\t\tBreak\n\t\t\t}\n\t\t}\n\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t{\n\t\t\tBreak\n\t\t}\n\t}\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host ${Output} -foreground Red\n\t}\n\tWrite-Host \"${TestDescription} (\" -nonewline\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host \"FAIL\" -foreground Red -nonewline\n\t}\n\tElse\n\t{\n\t\tWrite-Host \"PASS\" -foreground Green -nonewline\n\t}\n\tWrite-Host \")\"\n\n\tReturn ${Result}\n}\n\n$TestExecutablesDirectory = GetTestExecutablesDirectory\n\nIf (-Not (Test-Path ${TestExecutablesDirectory}))\n{\n\tWrite-Host \"Missing test executables directory.\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n\n$Result = ${ExitIgnore}\n\nForeach (${TestName} in ${LibraryTests} -split \" \")\n{\n\t# Split will return an array of a single empty string when LibraryTests is empty.\n\tIf (-Not (${TestName}))\n\t{\n\t\tContinue\n\t}\n\t$Result = RunTest ${TestName}\n\n\tIf ((${Result} -ne ${ExitSuccess}) -And (${Result} -ne ${ExitIgnore}))\n\t{\n\t\tBreak\n\t}\n}\n\nForeach (${TestName} in ${LibraryTestsWithInput} -split \" \")\n{\n\t# Split will return an array of a single empty string when LibraryTestsWithInput is empty.\n\tIf (-Not (${TestName}))\n\t{\n\t\tContinue\n\t}\n\tIf (Test-Path -Path \"input\" -PathType Container)\n\t{\n\t\t$Result = RunTestWithInput ${TestName}\n\t}\n\tElse\n\t{\n\t\t$Result = RunTest ${TestName}\n\t}\n\tIf ((${Result} -ne ${ExitSuccess}) -And (${Result} -ne ${ExitIgnore}))\n\t{\n\t\tBreak\n\t}\n}\n\nExit ${Result}\n\n"
  },
  {
    "path": "tests/test_library.sh",
    "content": "#!/usr/bin/env bash\n# Tests library functions and types.\n#\n# Version: 20240413\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nLIBRARY_TESTS=\"attribute attribute_list_entry bitmap_values buffer_data_handle cluster_block cluster_block_data cluster_block_stream cluster_block_vector compressed_block compressed_block_data_handle compressed_block_vector compressed_data_handle compression compression_unit_data_handle compression_unit_descriptor data_run data_stream directory_entries_tree directory_entry error extent file_entry file_name_attribute file_name_values file_system fixup_values index index_entry index_entry_header index_entry_vector index_node index_node_header index_root_header index_value io_handle logged_utility_stream_values mft mft_attribute mft_attribute_list mft_attribute_list_entry mft_entry mft_entry_header name notify object_identifier_values path_hint profiler reparse_point_attribute reparse_point_values sds_index_value security_descriptor_index security_descriptor_index_value security_descriptor_values standard_information_values txf_data_values usn_change_journal volume_header volume_information_attribute volume_information_values volume_name_attribute volume_name_values\";\nLIBRARY_TESTS_WITH_INPUT=\"mft_metadata_file support volume\";\nOPTION_SETS=(\"offset\");\n\nINPUT_GLOB=\"*\";\n\nrun_test()\n{\n\tlocal TEST_NAME=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: ${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./fsntfs_test_${TEST_NAME}\";\n\n\tif ! test -x \"${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\t# TODO: add support for TEST_PROFILE and OPTION_SETS?\n\trun_test_with_arguments \"${TEST_DESCRIPTION}\" \"${TEST_EXECUTABLE}\";\n\tlocal RESULT=$?;\n\n\treturn ${RESULT};\n}\n\nrun_test_with_input()\n{\n\tlocal TEST_NAME=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: ${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./fsntfs_test_${TEST_NAME}\";\n\n\tif ! test -x \"${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\tif ! test -d \"input\";\n\tthen\n\t\techo \"Test input directory not found.\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\tlocal RESULT=`ls input/* | tr ' ' '\\n' | wc -l`;\n\n\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\tthen\n\t\techo \"No files or directories found in the test input directory\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\n\tlocal TEST_PROFILE_DIRECTORY=$(get_test_profile_directory \"input\" \"libfsntfs\");\n\n\tlocal IGNORE_LIST=$(read_ignore_list \"${TEST_PROFILE_DIRECTORY}\");\n\n\tRESULT=${EXIT_SUCCESS};\n\n\tfor TEST_SET_INPUT_DIRECTORY in input/*;\n\tdo\n\t\tif ! test -d \"${TEST_SET_INPUT_DIRECTORY}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tif check_for_directory_in_ignore_list \"${TEST_SET_INPUT_DIRECTORY}\" \"${IGNORE_LIST}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\n\t\tlocal TEST_SET_DIRECTORY=$(get_test_set_directory \"${TEST_PROFILE_DIRECTORY}\" \"${TEST_SET_INPUT_DIRECTORY}\");\n\n\t\tif test -f \"${TEST_SET_DIRECTORY}/files\";\n\t\tthen\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed \"s?^?${TEST_SET_INPUT_DIRECTORY}/?\");\n\t\telse\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});\n\t\tfi\n\t\tfor INPUT_FILE in \"${INPUT_FILES[@]}\";\n\t\tdo\n\t\t\tOPTION_INPUT_FILE=\"${INPUT_FILE}\";\n\n\t\t\tif test \"${OSTYPE}\" = \"msys\";\n\t\t\tthen\n\t\t\t\t# A test executable built with MinGW expects a Windows path.\n\t\t\t\tINPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\\\\\?g'`;\n\t\t\tfi\n\t\t\tlocal TESTED_WITH_OPTIONS=0;\n\n\t\t\tfor OPTION_SET in ${OPTION_SETS[@]};\n\t\t\tdo\n\t\t\t\tlocal TEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${OPTION_INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\tif test -f ${TEST_DATA_OPTION_FILE};\n\t\t\t\tthen\n\t\t\t\t\tTESTED_WITH_OPTIONS=1;\n\n\t\t\t\t\tIFS=\" \" read -a OPTIONS <<< $(read_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"${OPTION_SET}\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${OPTIONS[@]}\";\n\t\t\t\t\tRESULT=$?;\n\n\t\t\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\t\t\tthen\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif test ${TESTED_WITH_OPTIONS} -eq 0;\n\t\t\tthen\n\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\tbreak;\n\t\t\tfi\n\t\tdone\n\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tbreak;\n\t\tfi\n\tdone\n\n\treturn ${RESULT};\n}\n\nif test -n \"${SKIP_LIBRARY_TESTS}\";\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nRESULT=${EXIT_IGNORE};\n\nfor TEST_NAME in ${LIBRARY_TESTS};\ndo\n\trun_test \"${TEST_NAME}\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nif test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};\nthen\n\texit ${RESULT};\nfi\n\nfor TEST_NAME in ${LIBRARY_TESTS_WITH_INPUT};\ndo\n\tif test -d \"input\";\n\tthen\n\t\trun_test_with_input \"${TEST_NAME}\";\n\t\tRESULT=$?;\n\telse\n\t\trun_test \"${TEST_NAME}\";\n\t\tRESULT=$?;\n\tfi\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/test_manpage.sh",
    "content": "#!/usr/bin/env bash\n# Tests man pages.\n#\n# Version: 20240413\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nrun_test()\n{\n\tlocal INPUT_FILE=$1;\n\tlocal RESULT=0\n\n\tTEST_NAME=`basename ${INPUT_FILE}`;\n\techo -n \"Testing man with input: ${TEST_NAME}\";\n\n\tLC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z ${INPUT_FILE} > /dev/null 2> ${TMPDIR}/${TEST_NAME}.warnings;\n\tRESULT=$?;\n\n\t# For now line break warnings are ignored.\n\tif test -f ${TMPDIR}/${TEST_NAME}.warnings;\n\tthen\n\t\tsed \"/can't break line/ d\" -i ${TMPDIR}/${TEST_NAME}.warnings;\n\tfi\n\tif test -s ${TMPDIR}/${TEST_NAME}.warnings;\n\tthen\n\t\tRESULT=${EXIT_FAILURE};\n\tfi\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \" (FAIL)\";\n\telse\n\t\techo \" (PASS)\";\n\tfi\n\tif test -s ${TMPDIR}/${TEST_NAME}.warnings;\n\tthen\n\t\tcat ${TMPDIR}/${TEST_NAME}.warnings;\n\tfi\n\treturn ${RESULT};\n}\n\nif test \"${OSTYPE}\" = \"msys\";\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nassert_availability_binary man;\n\nRESULT=${EXIT_IGNORE};\n\nTMPDIR=\"tmp$$\";\n\nrm -rf ${TMPDIR};\nmkdir ${TMPDIR};\n\nMANUALS_PATH=\"../manuals\";\n\nif ! test -d ${MANUALS_PATH};\nthen\n\tMANUALS_PATH=\"manuals\";\nfi\n\nif ! test -d ${MANUALS_PATH};\nthen\n\techo \"Manuals directory not found.\";\n\n\texit ${EXIT_IGNORE};\nfi\n\nfor INPUT_FILE in ${MANUALS_PATH}/*.[13];\ndo\n\trun_test \"${INPUT_FILE}\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nrm -rf ${TMPDIR};\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/test_python_module.sh",
    "content": "#!/usr/bin/env bash\n# Tests Python module functions and types.\n#\n# Version: 20240417\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_NO_TESTS_RAN=5;\nEXIT_IGNORE=77;\n\nTEST_FUNCTIONS=\"support\";\nTEST_FUNCTIONS_WITH_INPUT=\"attribute file_entry volume\";\nOPTION_SETS=(\"offset\");\n\nTEST_TOOL_DIRECTORY=\".\";\nINPUT_GLOB=\"*\";\n\nLIBRARY_NAME=\"libfsntfs\";\nPYTHON_MODULE=\"pyfsntfs\";\n\ntest_python_function()\n{\n\tlocal TEST_FUNCTION=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing Python-bindings functions: ${TEST_FUNCTION}\";\n\tlocal TEST_SCRIPT=\"${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py\";\n\n\trun_test_with_arguments \"${TEST_DESCRIPTION}\" \"${TEST_SCRIPT}\";\n\tlocal RESULT=$?;\n\n\treturn ${RESULT};\n}\n\ntest_python_function_with_input()\n{\n\tlocal TEST_FUNCTION=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing Python-bindings functions: ${TEST_FUNCTION}\";\n\tlocal TEST_SCRIPT=\"${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py\";\n\n\tif ! test -d \"input\";\n\tthen\n\t\techo \"Test input directory not found.\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\tlocal RESULT=`ls input/* | tr ' ' '\\n' | wc -l`;\n\n\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\tthen\n\t\techo \"No files or directories found in the test input directory\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\n\tlocal TEST_PROFILE_DIRECTORY=$(get_test_profile_directory \"input\" \"${PYTHON_MODULE}\");\n\n\tlocal IGNORE_LIST=$(read_ignore_list \"${TEST_PROFILE_DIRECTORY}\");\n\n\tRESULT=${EXIT_SUCCESS};\n\n\tfor TEST_SET_INPUT_DIRECTORY in input/*;\n\tdo\n\t\tif ! test -d \"${TEST_SET_INPUT_DIRECTORY}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tif check_for_directory_in_ignore_list \"${TEST_SET_INPUT_DIRECTORY}\" \"${IGNORE_LIST}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\n\t\tlocal TEST_SET_DIRECTORY=$(get_test_set_directory \"${TEST_PROFILE_DIRECTORY}\" \"${TEST_SET_INPUT_DIRECTORY}\");\n\n\t\tif test -f \"${TEST_SET_DIRECTORY}/files\";\n\t\tthen\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed \"s?^?${TEST_SET_INPUT_DIRECTORY}/?\");\n\t\telse\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});\n\t\tfi\n\t\tfor INPUT_FILE in \"${INPUT_FILES[@]}\";\n\t\tdo\n\t\t\tlocal TESTED_WITH_OPTIONS=0;\n\n\t\t\tfor OPTION_SET in ${OPTION_SETS[@]};\n\t\t\tdo\n\t\t\t\tlocal TEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\tif test -f ${TEST_DATA_OPTION_FILE};\n\t\t\t\tthen\n\t\t\t\t\tTESTED_WITH_OPTIONS=1;\n\n\t\t\t\t\tIFS=\" \" read -a OPTIONS <<< $(read_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"${OPTION_SET}\" \"${TEST_SCRIPT}\" \"${INPUT_FILE}\" \"${OPTIONS[@]}\";\n\t\t\t\t\tRESULT=$?;\n\n\t\t\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\t\t\tthen\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif test ${TESTED_WITH_OPTIONS} -eq 0;\n\t\t\tthen\n\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"\" \"${TEST_SCRIPT}\" \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\tbreak;\n\t\t\tfi\n\t\tdone\n\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tbreak;\n\t\tfi\n\tdone\n\n\treturn ${RESULT};\n}\n\nif test -n \"${SKIP_PYTHON_TESTS}\";\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nPLATFORM=`uname -s | sed 's/-.*$//'`;\n\nif test \"${PLATFORM}\" = \"MINGW64_NT\" || test \"${PLATFORM}\" = \"MSYS_NT\";\nthen\n\tcp ../${LIBRARY_NAME}/.libs/*.dll ../${PYTHON_MODULE}/.libs/;\n\tcp ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.dll ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.pyd;\nfi\n\nRESULT=${EXIT_IGNORE};\n\nfor TEST_FUNCTION in ${TEST_FUNCTIONS};\ndo\n\ttest_python_function \"${TEST_FUNCTION}\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -eq ${EXIT_NO_TESTS_RAN};\n\tthen\n\t\tRESULT=${EXIT_IGNORE};\n\tfi\n\tif test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nif test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};\nthen\n\texit ${RESULT};\nfi\n\nfor TEST_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT};\ndo\n\tif test -d \"input\";\n\tthen\n\t\ttest_python_function_with_input \"${TEST_FUNCTION}\";\n\t\tRESULT=$?;\n\telse\n\t\ttest_python_function \"${TEST_FUNCTION}\";\n\t\tRESULT=$?;\n\tfi\n\tif test ${RESULT} -eq ${EXIT_NO_TESTS_RAN};\n\tthen\n\t\tRESULT=${EXIT_IGNORE};\n\tfi\n\tif test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tests/test_runner.sh",
    "content": "#!/usr/bin/env bash\n# Bash functions to run an executable for testing.\n#\n# Version: 20231119\n#\n# When CHECK_WITH_ASAN is set to a non-empty value the test executable\n# is run with asan, otherwise it is run without.\n#\n# When CHECK_WITH_GDB is set to a non-empty value the test executable\n# is run with gdb, otherwise it is run without.\n#\n# When CHECK_WITH_STDERR is set to a non-empty value the test executable\n# is run with error output to stderr.\n#\n# When CHECK_WITH_VALGRIND is set to a non-empty value the test executable\n# is run with valgrind, otherwise it is run without.\n#\n# PYTHON is used to determine the Python interpreter.\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\n# Checks the availability of a binary and exits if not available.\n#\n# Arguments:\n#   a string containing the name of the binary\n#\nassert_availability_binary()\n{\n\tlocal BINARY=$1;\n\n\twhich ${BINARY} > /dev/null 2>&1;\n\tif test $? -ne ${EXIT_SUCCESS};\n\tthen\n\t\techo \"Missing binary: ${BINARY}\";\n\t\techo \"\";\n\n\t\texit ${EXIT_FAILURE};\n\tfi\n}\n\n# Checks the availability of binaries and exits if not available.\n#\n# Globals:\n#   CHECK_WITH_GDB\n#   CHECK_WITH_VALGRIND\n#\nassert_availability_binaries()\n{\n\tassert_availability_binary cat;\n\tassert_availability_binary cut;\n\tassert_availability_binary diff;\n\tassert_availability_binary file;\n\tassert_availability_binary gzip;\n\tassert_availability_binary ls;\n\tassert_availability_binary readlink;\n\tassert_availability_binary sed;\n\tassert_availability_binary tr;\n\tassert_availability_binary uname;\n\tassert_availability_binary wc;\n\tassert_availability_binary zcat;\n\n\tif test -n \"${CHECK_WITH_GDB}\";\n\tthen\n\t\tassert_availability_binary gdb;\n\n\telif test -n \"${CHECK_WITH_VALGRIND}\";\n\tthen\n\t\tassert_availability_binary valgrind;\n\tfi\n}\n\n# Checks if the test set is in the ignore list.\n#\n# Arguments:\n#   a string containing the test set\n#   a string containing space separated ignore list\n#\n# Returns:\n#   an integer containing the exit status to indicate the input directory\n#   was found in the ignore list.\n#\ncheck_for_test_set_in_ignore_list()\n{\n\tlocal TEST_SET=$1;\n\tlocal IGNORE_LIST=$2;\n\n\tlocal IFS=\" \";\n\n\tfor LIST_ELEMENT in ${IGNORE_LIST};\n\tdo\n\t\tif test \"${LIST_ELEMENT}\" = \"${TEST_SET}\";\n\t\tthen\n\t\t\treturn ${EXIT_SUCCESS};\n\t\tfi\n\tdone\n\treturn ${EXIT_FAILURE};\n}\n\n# Checks if the input directory is in the ignore list.\n#\n# Arguments:\n#   a string containing the path of the test input directory\n#   a string containing space separated ignore list\n#\n# Returns:\n#   an integer containing the exit status to indicate the input directory\n#   was found in the ignore list.\n#\ncheck_for_directory_in_ignore_list()\n{\n\tlocal INPUT_DIRECTORY=$1;\n\tlocal IGNORE_LIST=$2;\n\n\tlocal INPUT_BASENAME=`basename ${INPUT_DIRECTORY}`;\n\n\tlocal IFS=\" \";\n\n\tfor LIST_ELEMENT in ${IGNORE_LIST};\n\tdo\n\t\tif test \"${LIST_ELEMENT}\" = \"${INPUT_BASENAME}\";\n\t\tthen\n\t\t\treturn ${EXIT_SUCCESS};\n\t\tfi\n\tdone\n\treturn ${EXIT_FAILURE};\n}\n\n# Searches for the binary variant of the executable in case the test executable\n# refers to a libtool shell script.\n#\n# Arguments:\n#   a string containing the path of the test executable\n#\n# Returns:\n#   a string containing the path of the binary variant of the test executable\n#\nfind_binary_executable()\n{\n\tlocal TEST_EXECUTABLE=$1;\n\n\tTEST_EXECUTABLE=$( readlink_f \"${TEST_EXECUTABLE}\" );\n\n\t# Note that the behavior of `file -bi` is not helpful on Mac OS X.\n\tlocal EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`;\n\n\t# Check if the test executable is a libtool shell script.\n\t# Linux: POSIX shell script, ASCII text executable, with very long lines\n\t# Mac OS X: POSIX shell script text executable\n\techo \"${EXECUTABLE_TYPE}\" | grep \"POSIX shell script\" > /dev/null 2>&1;\n\tRESULT=$?;\n\n\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\tthen\n\t\tlocal TEST_EXECUTABLE_BASENAME=`basename ${TEST_EXECUTABLE}`;\n\t\tlocal TEST_EXECUTABLE_DIRNAME=`dirname ${TEST_EXECUTABLE}`;\n\n\t\tTEST_EXECUTABLE=\"${TEST_EXECUTABLE_DIRNAME}/.libs/${TEST_EXECUTABLE_BASENAME}\";\n\n\t\tif test -x ${TEST_EXECUTABLE};\n\t\tthen\n\t\t\t# Note that the behavior of `file -bi` is not helpful on Mac OS X.\n\t\t\tEXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`;\n\n\t\t\t# Linux: ELF 64-bit LSB executable, x86-64, ...\n\t\t\t# Mac OS X: Mach-O 64-bit executable x86_64\n\t\t\techo \"${EXECUTABLE_TYPE}\" | grep \"executable\" > /dev/null 2>&1;\n\t\t\tRESULT=$?;\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\techo \"Invalid test executable: ${TEST_EXECUTABLE}\";\n\n\t\t\t\texit ${EXIT_FAILURE};\n\t\t\tfi\n\t\tfi\n\tfi\n\techo ${TEST_EXECUTABLE};\n}\n\n# Searches for the path to the binary variant of the library.\n#\n# Arguments:\n#   a string containing the path of the test executable\n#\n# Returns:\n#   a string containing the path of the binary variant of the library.\n#\nfind_binary_library_path()\n{\n\tlocal TEST_EXECUTABLE=$1;\n\tlocal LIBRARY_NAME=`dirname ${TEST_EXECUTABLE}`;\n\n\tlocal NAME=`basename ${LIBRARY_NAME}`;\n\n\tif test ${NAME} = \".libs\";\n\tthen\n\t\tLIBRARY_NAME=`dirname ${LIBRARY_NAME}`;\n\t\tNAME=`basename ${LIBRARY_NAME}`;\n\tfi\n\tif test ${NAME} = \"tests\";\n\tthen\n\t\tLIBRARY_NAME=`dirname ${LIBRARY_NAME}`;\n\t\tNAME=`basename ${LIBRARY_NAME}`;\n\tfi\n\techo ${LIBRARY_NAME} | grep 'tools' > /dev/null 2>&1;\n\n\tif test $? -eq ${EXIT_SUCCESS};\n\tthen\n\t\tLIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/\\(.*\\)tools$/lib\\1/'`;\n\telse\n\t\tLIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/^py//' | sed 's/^\\([^_]*\\)_test_.*$/lib\\1/'`;\n\tfi\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\n\tlocal LIBRARY_PATH=\"${TEST_EXECUTABLE}/${LIBRARY_NAME}/.libs\";\n\n\tif ! test -d \"${LIBRARY_PATH}\";\n\tthen\n\t\tLIBRARY_PATH=\"../${LIBRARY_NAME}/.libs\";\n\tfi\n\techo \"${LIBRARY_PATH}\";\n}\n\n# Searches for the path to the binary variant of the Python module\n#\n# Arguments:\n#   a string containing the path of the test executable\n#\n# Returns:\n#   a string containing the path of the binary variant of the Python module\n#\nfind_binary_python_module_path()\n{\n\tlocal TEST_EXECUTABLE=$1;\n\n\tlocal PYTHON_MODULE_NAME=`basename ${TEST_EXECUTABLE} | sed 's/^py\\(.*\\)_test_.*$/py\\1/'`;\n\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\tTEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`;\n\n\tlocal PYTHON_MODULE_PATH=\"${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}/.libs\";\n\n\tif ! test -d \"${PYTHON_MODULE_PATH}\";\n\tthen\n\t\tPYTHON_MODULE_PATH=\"../${PYTHON_MODULE_NAME}/.libs\";\n\tfi\n\techo \"${PYTHON_MODULE_PATH}\";\n}\n\n# Determines the test data option file.\n#\n# Arguments:\n#   a string containing the path of the test set directory\n#   a string containing the path of the test input file\n#   a string containing the name of the test data option set\n#\n# Returns:\n#   a string containing the test input files\n#\nget_test_data_option_file()\n{\n\tlocal TEST_SET_DIRECTORY=$1;\n\tlocal INPUT_FILE=$2;\n\tlocal OPTION_SET=$3;\n\n\tlocal INPUT_NAME=`basename \"${INPUT_FILE}\"`;\n\tlocal TEST_DATA_OPTION_FILE=\"${TEST_SET_DIRECTORY}/${INPUT_NAME}.${OPTION_SET}\";\n\n\techo \"${TEST_DATA_OPTION_FILE}\";\n}\n\n# Determines the test profile directory.\n# The directory is created if it does not exist.\n#\n# Arguments:\n#   a string containing the path of the test input directory\n#   a string containing the name of the test profile\n#\n# Returns:\n#   a string containing the path of the test profile directory\n#\nget_test_profile_directory()\n{\n\tlocal TEST_INPUT_DIRECTORY=$1;\n\tlocal TEST_PROFILE=$2;\n\n\tlocal TEST_PROFILE_DIRECTORY=\"${TEST_INPUT_DIRECTORY}/.${TEST_PROFILE}\";\n\n\tif ! test -d \"${TEST_PROFILE_DIRECTORY}\";\n\tthen\n\t\tmkdir \"${TEST_PROFILE_DIRECTORY}\";\n\tfi\n\techo \"${TEST_PROFILE_DIRECTORY}\";\n}\n\n# Determines the test set directory.\n# The directory is created if it does not exist.\n#\n# Arguments:\n#   a string containing the path of the test profile directory\n#   a string containing the path of the test set input directory\n#\n# Returns:\n#   a string containing the path of the test set directory\n#\nget_test_set_directory()\n{\n\tlocal TEST_PROFILE_DIRECTORY=$1;\n\tlocal TEST_SET_INPUT_DIRECTORY=$2;\n\n\tlocal TEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`;\n\tlocal TEST_SET_DIRECTORY=\"${TEST_PROFILE_DIRECTORY}/${TEST_SET}\";\n\n\tif ! test -d \"${TEST_SET_DIRECTORY}\";\n\tthen\n\t\tmkdir \"${TEST_SET_DIRECTORY}\";\n\tfi\n\techo \"${TEST_SET_DIRECTORY}\";\n}\n\n# Provides a cross-platform variant of \"readlink -f\"\n#\n# Arguments:\n#   a string containing a path\n#\n# Returns:\n#   a string containing the path with all symbolic links resolved\n#\nreadlink_f() {\n\tlocal TARGET=\"$1\"\n\n\tif test -f \"${TARGET}\";\n\tthen\n\t\twhile test -L \"${TARGET}\";\n\t\tdo\n\t\t\tTARGET=`readlink \"${TARGET}\"`;\n\t\tdone\n\tfi\n\tlocal BASENAME=`basename \"${TARGET}\"`;\n\tlocal DIRNAME=`dirname \"${TARGET}\"`;\n\n\tDIRNAME=`(cd \"${DIRNAME}\" && pwd -P)`;\n\n\techo \"${DIRNAME}/${BASENAME}\";\n}\n\n# Reads the test profile ignore file if it exists.\n#\n# Arguments:\n#   a string containing the path of the test profile directory\n#\n# Returns:\n#   a string containing a space separated ignore list\n#\nread_ignore_list()\n{\n\tlocal TEST_PROFILE_DIRECTORY=$1;\n\tlocal IGNORE_FILE=\"${TEST_PROFILE_DIRECTORY}/ignore\";\n\tlocal IGNORE_LIST=\"\";\n\n\tif test -f \"${IGNORE_FILE}\";\n\tthen\n\t\tIGNORE_LIST=`cat ${IGNORE_FILE} | sed '/^#/d' | tr '\\n' ' '`;\n\tfi\n\techo ${IGNORE_LIST};\n}\n\n# Reads a test data option file.\n#\n# Arguments:\n#   a string containing the path of the test set directory\n#   a string containing the path of the test input file\n#   a string containing the name of the test data option set\n#\n# Returns:\n#   a string containing the test data specific options\n#\nread_test_data_option_file()\n{\n\tlocal TEST_SET_DIRECTORY=$1;\n\tlocal INPUT_FILE=$2;\n\tlocal OPTION_SET=$3;\n\n\tlocal TEST_DATA_OPTION_FILE=\"${INPUT_FILE}.${OPTION_SET}\";\n\n\tif ! test -f \"${TEST_DATA_OPTION_FILE}\";\n\tthen\n\t\tTEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\tfi\n\n\tlocal OPTIONS_STRING=`head -n 1 \"${TEST_DATA_OPTION_FILE}\" | sed 's/[\\r\\n]*$//'`;\n\n\tif test \"${OPTIONS_STRING}\" = \"# libyal test data options\";\n\tthen\n\t\tOPTIONS_STRING=`tail -n +2 \"${TEST_DATA_OPTION_FILE}\" | sed 's/^offset=/-o/;s/^password=/-p/;s/^recovery_password=/-r/;s/^startup_key=/-s/;s/virtual_address=/-v/' | tr '\\n' ' '`;\n\tfi\n\techo \"${OPTIONS_STRING}\";\n}\n\n# Runs the test with optional arguments.\n#\n# Globals:\n#   CHECK_WITH_ASAN\n#   CHECK_WITH_GDB\n#   CHECK_WITH_STDERR\n#   CHECK_WITH_VALGRIND\n#\n# Arguments:\n#   a string containing the test description\n#   a string containing the path of the test executable\n#   an array containing the arguments for the test executable\n#\n# Returns:\n#   an integer containg the exit status of the test executable\n#\nrun_test_with_arguments()\n{\n\tlocal TEST_DESCRIPTION=$1;\n\tlocal TEST_EXECUTABLE=$2;\n\tshift 2;\n\tlocal ARGUMENTS=(\"$@\");\n\n\tif ! test -f \"${TEST_EXECUTABLE}\";\n\tthen\n\t\techo \"Missing test executable: ${TEST_EXECUTABLE}\";\n\t\techo \"\";\n\n\t\treturn ${EXIT_FAILURE};\n\tfi\n\tlocal PLATFORM=`uname -s | sed 's/-.*$//'`;\n\n\t# Note that the behavior of `file -bi` is not helpful on Mac OS X.\n\tlocal EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`;\n\n\t# Check if the test executable is a Python script.\n\t# Linux: Python script, ASCII text executable\n\t# Mac OS X: a python script text executable\n\techo \"${EXECUTABLE_TYPE}\" | grep -i \"python script\" > /dev/null 2>&1;\n\tlocal IS_PYTHON_SCRIPT=$?;\n\n\tif test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON};\n\tthen\n\t\tlocal PYTHON=`which python 2> /dev/null`;\n\n\t\tif ! test -x ${PYTHON};\n\t\tthen\n\t\t\techo \"Missing executable: ${PYTHON}\";\n\n\t\t\texit ${EXIT_FAILURE};\n\t\tfi\n\tfi\n\tlocal RESULT=0;\n\n\tif test -n \"${CHECK_WITH_ASAN}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tlocal LSAN_SUPPRESSIONS=\"lsan.suppressions\";\n\n\t\tif ! test -f ${LSAN_SUPPRESSIONS};\n\t\tthen\n\t\t\tLSAN_SUPPRESSIONS=\"../lsan.suppressions\";\n\t\tfi\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" DYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" DYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\telse\n\t\t\tlocal CONFIG_LOG=\"../config.log\";\n\n\t\t\tif ! test -f ${CONFIG_LOG};\n\t\t\tthen\n\t\t\t\tCONFIG_LOG=\"../../config.log\";\n\t\t\tfi\n\t\t\tlocal CC=`cat ${CONFIG_LOG} | grep -e \"^CC=\" | sed \"s/CC='\\\\(.*\\\\)'/\\1/\"`;\n\t\t\tlocal LIBASAN=\"\";\n\n\t\t\tif test -z ${CC} || test ${CC} != \"clang\";\n\t\t\tthen\n\t\t\t\tlocal LDCONFIG=`which ldconfig 2> /dev/null`;\n\n\t\t\t\tif test -z ${LDCONFIG} || ! test -x ${LDCONFIG};\n\t\t\t\tthen\n\t\t\t\t\tLDCONFIG=\"/sbin/ldconfig\";\n\t\t\t\tfi\n\t\t\t\tif test -z ${LDCONFIG} || ! test -x ${LDCONFIG};\n\t\t\t\tthen\n\t\t\t\t\techo \"Missing binary: ldconfig\";\n\t\t\t\t\techo \"\";\n\n\t\t\t\t\texit ${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\t\tLIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`;\n\n\t\t\t\tif ! test -f ${LIBASAN};\n\t\t\t\tthen\n\t\t\t\t\techo \"Missing library: ${BINARY}\";\n\t\t\t\t\techo \"\";\n\n\t\t\t\t\texit ${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" LD_PRELOAD=\"${LIBASAN}\" LD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" LD_PRELOAD=\"${LIBASAN}\" LD_LIBRARY_PATH=\"${LIBRARY_PATH}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\n\telif test -n \"${CHECK_WITH_GDB}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\n\telif test -n \"${CHECK_WITH_VALGRIND}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tlocal VALGRIND_LOG=\"valgrind.log-$$\";\n\t\tlocal VALGRIND_OPTIONS=(\"--tool=memcheck\" \"--leak-check=full\" \"--show-leak-kinds=definite,indirect,possible\" \"--track-origins=yes\" \"--log-file=${VALGRIND_LOG}\");\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\t\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tgrep \"All heap blocks were freed -- no leaks are possible\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\n\t\t\tif test $? -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\t# Ignore \"still reachable\"\n\t\t\t\t# Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost\n\n\t\t\t\tgrep \"definitely lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_DIRECTLY_LOST=$?;\n\n\t\t\t\tgrep \"indirectly lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_INDIRECTLY_LOST=$?;\n\n\t\t\t\tgrep \"possibly lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_POSSIBLY_LOST=$?;\n\n\t\t\t\tgrep \"suppressed: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_SUPPRESSED=$?;\n\n\t\t\t\tif test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS};\n\t\t\t\tthen\n\t\t\t\t\techo \"Memory leakage detected.\";\n\t\t\t\t\tcat ${VALGRIND_LOG};\n\n\t\t\t\t\tRESULT=${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t# Detect valgrind warnings.\n\t\t\tlocal NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`;\n\n\t\t\tif test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22;\n\t\t\tthen\n\t\t\t\techo \"Unsupported number of lines: ${NUMBER_OF_LINES}\";\n\t\t\t\tcat ${VALGRIND_LOG};\n\n\t\t\t\tRESULT=${EXIT_FAILURE};\n\t\t\tfi\n\t\tfi\n\t\trm -f ${VALGRIND_LOG};\n\n\telif test ${IS_PYTHON_SCRIPT} -eq 0;\n\tthen\n\t\tif ! test -f \"${TEST_EXECUTABLE}\";\n\t\tthen\n\t\t\techo \"Invalid test Python script: ${TEST_EXECUTABLE}\";\n\t\t\techo \"\";\n\n\t\t\treturn ${EXIT_FAILURE};\n\t\tfi\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]};\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\telse\n\t\tif ! test -x \"${TEST_EXECUTABLE}\";\n\t\tthen\n\t\t\techo \"Invalid test executable: ${TEST_EXECUTABLE}\";\n\t\t\techo \"\";\n\n\t\t\treturn ${EXIT_FAILURE};\n\t\tfi\n\n\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\tthen\n\t\t\t${TEST_EXECUTABLE} ${ARGUMENTS[@]};\n\t\t\tRESULT=$?;\n\t\telse\n\t\t\t${TEST_EXECUTABLE} ${ARGUMENTS[@]} 2> /dev/null;\n\t\t\tRESULT=$?;\n\t\tfi\n\tfi\n\tif test -n \"${TEST_DESCRIPTION}\";\n\tthen\n\t\techo -n \"${TEST_DESCRIPTION}\";\n\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\techo \" (FAIL)\";\n\t\telse\n\t\t\techo \" (PASS)\";\n\t\tfi\n\tfi\n\treturn ${RESULT};\n}\n\n# Runs the test with an input file and optional arguments.\n#\n# Globals:\n#   CHECK_WITH_ASAN\n#   CHECK_WITH_GDB\n#   CHECK_WITH_STDERR\n#   CHECK_WITH_VALGRIND\n#\n# Arguments:\n#   a string containing the path of the test executable\n#   a string containing the path of the test input file\n#   an array containing the arguments for the test executable\n#\n# Returns:\n#   an integer containg the exit status of the test executable\n#\nrun_test_with_input_and_arguments()\n{\n\tlocal TEST_EXECUTABLE=$1;\n\tlocal INPUT_FILE=$2;\n\tshift 2;\n\tlocal ARGUMENTS=(\"$@\");\n\n\tif ! test -f \"${TEST_EXECUTABLE}\";\n\tthen\n\t\techo \"Missing test executable: ${TEST_EXECUTABLE}\";\n\t\techo \"\";\n\n\t\treturn ${EXIT_FAILURE};\n\tfi\n\tlocal PLATFORM=`uname -s | sed 's/-.*$//'`;\n\n\t# Note that the behavior of `file -bi` is not helpful on Mac OS X.\n\tlocal EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`;\n\n\t# Check if the test executable is a Python script.\n\t# Linux: Python script, ASCII text executable\n\t# Mac OS X: a python script text executable\n\techo \"${EXECUTABLE_TYPE}\" | grep -i \"python script\" > /dev/null 2>&1;\n\tlocal IS_PYTHON_SCRIPT=$?;\n\n\tif test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON};\n\tthen\n\t\tlocal PYTHON=`which python 2> /dev/null`;\n\n\t\tif ! test -x ${PYTHON};\n\t\tthen\n\t\t\techo \"Missing executable: ${PYTHON}\";\n\n\t\t\texit ${EXIT_FAILURE};\n\t\tfi\n\tfi\n\tlocal RESULT=0;\n\n\tif test -n \"${CHECK_WITH_ASAN}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tlocal LSAN_SUPPRESSIONS=\"lsan.suppressions\";\n\n\t\tif ! test -f ${LSAN_SUPPRESSIONS};\n\t\tthen\n\t\t\tLSAN_SUPPRESSIONS=\"../lsan.suppressions\";\n\t\tfi\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\t# TODO DYLD_INSERT_LIBRARIES=/Library/Developer/CommandLineTools/usr/lib/clang/8.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" DYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" DYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\telse\n\t\t\tlocal CONFIG_LOG=\"../config.log\";\n\n\t\t\tif ! test -f ${CONFIG_LOG};\n\t\t\tthen\n\t\t\t\tCONFIG_LOG=\"../../config.log\";\n\t\t\tfi\n\t\t\tlocal CC=`cat ${CONFIG_LOG} | grep -e \"^CC=\" | sed \"s/CC='\\\\(.*\\\\)'/\\1/\"`;\n\t\t\tlocal LIBASAN=\"\";\n\n\t\t\tif test -z ${CC} || test ${CC} != \"clang\";\n\t\t\tthen\n\t\t\t\tlocal LDCONFIG=`which ldconfig 2> /dev/null`;\n\n\t\t\t\tif test -z ${LDCONFIG} || ! test -x ${LDCONFIG};\n\t\t\t\tthen\n\t\t\t\t\tLDCONFIG=\"/sbin/ldconfig\";\n\t\t\t\tfi\n\t\t\t\tif test -z ${LDCONFIG} || ! test -x ${LDCONFIG};\n\t\t\t\tthen\n\t\t\t\t\techo \"Missing binary: ldconfig\";\n\t\t\t\t\techo \"\";\n\n\t\t\t\t\texit ${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\t\tLIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`;\n\n\t\t\t\tif ! test -f ${LIBASAN};\n\t\t\t\tthen\n\t\t\t\t\techo \"Missing library: ${BINARY}\";\n\t\t\t\t\techo \"\";\n\n\t\t\t\t\texit ${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" LD_PRELOAD=\"${LIBASAN}\" LD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLSAN_OPTIONS=suppressions=\"${LSAN_SUPPRESSIONS}\" LD_PRELOAD=\"${LIBASAN}\" LD_LIBRARY_PATH=\"${LIBRARY_PATH}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\n\telif test -n \"${CHECK_WITH_GDB}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" gdb -ex \"set non-stop on\" -ex \"run\" -ex \"quit\" --args \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\n\telif test -n \"${CHECK_WITH_VALGRIND}\";\n\tthen\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tlocal VALGRIND_LOG=\"valgrind.log-$$\";\n\t\tlocal VALGRIND_OPTIONS=(\"--tool=memcheck\" \"--leak-check=full\" \"--show-leak-kinds=definite,indirect,possible\" \"--track-origins=yes\" \"--log-file=${VALGRIND_LOG}\");\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test ${IS_PYTHON_SCRIPT} -eq 0;\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" valgrind ${VALGRIND_OPTIONS[@]} \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\t\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tgrep \"All heap blocks were freed -- no leaks are possible\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\n\t\t\tif test $? -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\t# Ignore \"still reachable\"\n\t\t\t\t# Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost\n\n\t\t\t\tgrep \"definitely lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_DIRECTLY_LOST=$?;\n\n\t\t\t\tgrep \"indirectly lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_INDIRECTLY_LOST=$?;\n\n\t\t\t\tgrep \"possibly lost: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_POSSIBLY_LOST=$?;\n\n\t\t\t\tgrep \"suppressed: 0 bytes in 0 blocks\" ${VALGRIND_LOG} > /dev/null 2>&1;\n\t\t\t\tRESULT_SUPPRESSED=$?;\n\n\t\t\t\tif test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS};\n\t\t\t\tthen\n\t\t\t\t\techo \"Memory leakage detected.\";\n\t\t\t\t\tcat ${VALGRIND_LOG};\n\n\t\t\t\t\tRESULT=${EXIT_FAILURE};\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t# Detect valgrind warnings.\n\t\t\tlocal NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`;\n\n\t\t\tif test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22;\n\t\t\tthen\n\t\t\t\techo \"Unsupported number of lines: ${NUMBER_OF_LINES}\";\n\t\t\t\tcat ${VALGRIND_LOG};\n\n\t\t\t\tRESULT=${EXIT_FAILURE};\n\t\t\tfi\n\t\tfi\n\t\trm -f ${VALGRIND_LOG};\n\n\telif test ${IS_PYTHON_SCRIPT} -eq 0;\n\tthen\n\t\tif ! test -f \"${TEST_EXECUTABLE}\";\n\t\tthen\n\t\t\techo \"Invalid test Python script: ${TEST_EXECUTABLE}\";\n\t\t\techo \"\";\n\n\t\t\treturn ${EXIT_FAILURE};\n\t\tfi\n\t\tlocal TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );\n\t\tlocal LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );\n\t\tlocal PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} );\n\n\t\tif test \"${PLATFORM}\" = \"Darwin\";\n\t\tthen\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tDYLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\" 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telif test \"${PLATFORM}\" = \"CYGWIN_NT\";\n\t\tthen\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tPATH=\"${LIBRARY_PATH}:${PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\" 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\telse\n\t\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\t\tthen\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tLD_LIBRARY_PATH=\"${LIBRARY_PATH}\" PYTHONPATH=\"${PYTHON_MODULE_PATH}\" \"${PYTHON}\" \"${TEST_EXECUTABLE}\" ${ARGUMENTS[@]} \"${INPUT_FILE}\" 2> /dev/null;\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\t\tfi\n\telse\n\t\tif ! test -x \"${TEST_EXECUTABLE}\";\n\t\tthen\n\t\t\techo \"Invalid test executable: ${TEST_EXECUTABLE}\";\n\t\t\techo \"\";\n\n\t\t\treturn ${EXIT_FAILURE};\n\t\tfi\n\n\t\tif test -n \"${CHECK_WITH_STDERR}\";\n\t\tthen\n\t\t\t${TEST_EXECUTABLE} ${ARGUMENTS[@]} \"${INPUT_FILE}\";\n\t\t\tRESULT=$?;\n\t\telse\n\t\t\t${TEST_EXECUTABLE} ${ARGUMENTS[@]} \"${INPUT_FILE}\" 2> /dev/null;\n\t\t\tRESULT=$?;\n\t\tfi\n\tfi\n\treturn ${RESULT};\n}\n\n# Runs the test on the input file.\n#\n# Note that this function is not intended to be directly invoked\n# from outside the test runner script.\n#\n# Arguments:\n#   a string containing the path of the test set directory\n#   a string containing the description of the test\n#   a string containing the test mode\n#   a string containing the name of the test data option set\n#   a string containing the path of the test executable\n#   a string containing the path of the test input file\n#   an array containing the arguments for the test executable\n#\n# Returns:\n#   an integer containg the exit status of the test executable\n#\nrun_test_on_input_file()\n{\n\tlocal TEST_SET_DIRECTORY=$1;\n\tlocal TEST_DESCRIPTION=$2;\n\tlocal TEST_MODE=$3;\n\tlocal OPTION_SET=$4;\n\tlocal TEST_EXECUTABLE=$5;\n\tlocal INPUT_FILE=$6;\n\tshift 6;\n\tlocal ARGUMENTS=(\"$@\");\n\n\tlocal INPUT_NAME=`basename \"${INPUT_FILE}\"`;\n\tlocal TEST_OUTPUT=\"${INPUT_NAME}\";\n\n\tif test -n \"${OPTION_SET}\";\n\tthen\n\t\tTEST_OUTPUT=\"${INPUT_NAME}-${OPTION_SET}\";\n\tfi\n\n\tlocal TMPDIR=\"tmp$$\";\n\tlocal RESULT=0;\n\n\trm -rf ${TMPDIR};\n\tmkdir ${TMPDIR};\n\n\tif test \"${TEST_MODE}\" = \"with_callback\";\n\tthen\n\t\ttest_callback \"${TMPDIR}\" \"${TEST_SET_DIRECTORY}\" \"${TEST_OUTPUT}\" \"${TEST_EXECUTABLE}\" \"${TEST_INPUT}\" ${ARGUMENTS[@]};\n\t\tRESULT=$?;\n\n\telif test \"${TEST_MODE}\" = \"with_stdout_reference\";\n\tthen\n\t\tTEST_EXECUTABLE=$( readlink_f \"${TEST_EXECUTABLE}\" );\n\n\t\tif ! test -x ${TEST_EXECUTABLE};\n\t\tthen\n\t\t\techo \"Invalid test executable: ${TEST_EXECUTABLE}\";\n\t\t\techo \"\";\n\n\t\t\treturn ${EXIT_FAILURE};\n\t\tfi\n\t\tlocal INPUT_FILE_FULL_PATH=$( readlink_f \"${INPUT_FILE}\" );\n\t\tlocal TEST_LOG=\"${TEST_OUTPUT}.log\";\n\n\t\t(cd ${TMPDIR} && run_test_with_input_and_arguments \"${TEST_EXECUTABLE}\" \"${INPUT_FILE_FULL_PATH}\" ${ARGUMENTS[@]} > \"${TEST_LOG}\");\n\t\tRESULT=$?;\n\n\t\t# Compare output if test ran successfully.\n\t\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tlocal TEST_RESULTS=\"${TMPDIR}/${TEST_LOG}\";\n\t\t\tlocal STORED_TEST_RESULTS=\"${TEST_SET_DIRECTORY}/${TEST_LOG}.gz\";\n\n\t\t\t# Strip header with version.\n\t\t\tsed -i'~' '1,2d' \"${TEST_RESULTS}\";\n\n\t\t\tif test -f \"${STORED_TEST_RESULTS}\";\n\t\t\tthen\n\t\t\t\t# Using zcat here since zdiff has issues on Mac OS X.\n\t\t\t\t# Note that zcat on Mac OS X requires the input from stdin.\n\t\t\t\tzcat < \"${STORED_TEST_RESULTS}\" | diff \"${TEST_RESULTS}\" -;\n\t\t\t\tRESULT=$?;\n\t\t\telse\n\t\t\t\tgzip \"${TEST_RESULTS}\";\n\n\t\t\t\tmv \"${TEST_RESULTS}.gz\" ${TEST_SET_DIRECTORY};\n\t\t\tfi\n\t\tfi\n\n\telse\n\t\trun_test_with_input_and_arguments \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" ${ARGUMENTS[@]};\n\t\tRESULT=$?;\n\tfi\n\n\trm -rf ${TMPDIR};\n\n\tif test -n \"${TEST_DESCRIPTION}\";\n\tthen\n\t\tARGUMENTS=`echo \"${ARGUMENTS[*]}\" | tr '\\n' ' ' | sed 's/[ ]\\$//'`;\n\n\t\tif test -z \"${ARGUMENTS}\";\n\t\tthen\n\t\t\techo -n \"${TEST_DESCRIPTION} with input: ${INPUT_FILE}\";\n\t\telse\n\t\t\techo -n \"${TEST_DESCRIPTION} with options: '${ARGUMENTS}' and input: ${INPUT_FILE}\";\n\t\tfi\n\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\techo \" (FAIL)\";\n\t\telse\n\t\t\techo \" (PASS)\";\n\t\tfi\n\tfi\n\treturn ${RESULT};\n}\n\n"
  },
  {
    "path": "tests/test_tools.ps1",
    "content": "# Tests tools functions and types.\n#\n# Version: 20230410\n\n$ExitSuccess = 0\n$ExitFailure = 1\n$ExitIgnore = 77\n\n$ToolsTests = \"bodyfile digest_hash info_handle mount_path_string output path_string signal\"\n$ToolsTestsWithInput = \"\"\n\n$InputGlob = \"*\"\n\nFunction GetTestProfileDirectory\n{\n\tparam( [string]$TestInputDirectory, [string]$TestProfile )\n\n\t$TestProfileDirectory = \"${TestInputDirectory}\\.${TestProfile}\"\n\n\tIf (-Not (Test-Path -Path ${TestProfileDirectory} -PathType \"Container\"))\n\t{\n\t\tNew-Item -ItemType \"directory\" -Path ${TestProfileDirectory}\n\t}\n\tReturn ${TestProfileDirectory}\n}\n\nFunction GetTestSetDirectory\n{\n\tparam( [string]$TestProfileDirectory, [string]$TestSetInputDirectory )\n\n\t$TestSetDirectory = \"${TestProfileDirectory}\\${TestSetInputDirectory.Basename}\"\n\n\tIf (-Not (Test-Path -Path ${TestSetDirectory} -PathType \"Container\"))\n\t{\n\t\tNew-Item -ItemType \"directory\" -Path ${TestSetDirectory}\n\t}\n\tReturn ${TestSetDirectory}\n}\n\nFunction GetTestExecutablesDirectory\n{\n\t$TestExecutablesDirectory = \"\"\n\n\tForEach (${VSDirectory} in (\"msvscpp\", \"vs2008\", \"vs2010\", \"vs2012\", \"vs2013\", \"vs2015\", \"vs2017\", \"vs2019\", \"vs2022\"))\n\t{\n\t\tForEach (${VSConfiguration} in (\"Release\", \"VSDebug\"))\n\t\t{\n\t\t\tForEach (${VSPlatform} in (\"Win32\", \"x64\"))\n\t\t\t{\n\t\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\\${VSPlatform}\"\n\n\t\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t\t{\n\t\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$TestExecutablesDirectory = \"..\\${VSDirectory}\\${VSConfiguration}\"\n\n\t\t\tIf (Test-Path ${TestExecutablesDirectory})\n\t\t\t{\n\t\t\t\tReturn ${TestExecutablesDirectory}\n\t\t\t}\n\t\t}\n\t}\n\tReturn ${TestExecutablesDirectory}\n}\n\nFunction ReadIgnoreList\n{\n\tparam( [string]$TestProfileDirectory )\n\n\t$IgnoreFile = \"${TestProfileDirectory}\\ignore\"\n\t$IgnoreList = \"\"\n\n\tIf (Test-Path -Path ${IgnoreFile} -PathType \"Leaf\")\n\t{\n\t\t$IgnoreList = Get-Content -Path ${IgnoreFile} | Where {$_ -notmatch '^#.*'}\n\t}\n\tReturn $IgnoreList\n}\n\nFunction RunTest\n{\n\tparam( [string]$TestType )\n\n\t$TestDescription = \"Testing: ${TestName}\"\n\t$TestExecutable = \"${TestExecutablesDirectory}\\fsntfs_test_tools_${TestName}.exe\"\n\n\t$Output = Invoke-Expression ${TestExecutable}\n\t$Result = ${LastExitCode}\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host ${Output} -foreground Red\n\t}\n\tWrite-Host \"${TestDescription} \" -nonewline\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host \" (FAIL)\"\n\t}\n\tElse\n\t{\n\t\tWrite-Host \" (PASS)\"\n\t}\n\tReturn ${Result}\n}\n\nFunction RunTestWithInput\n{\n\tparam( [string]$TestType )\n\n\t$TestDescription = \"Testing: ${TestName}\"\n\t$TestExecutable = \"${TestExecutablesDirectory}\\fsntfs_test_tools_${TestName}.exe\"\n\n\t$TestProfileDirectory = GetTestProfileDirectory \"input\" \"fsntfstools\"\n\n\t$IgnoreList = ReadIgnoreList ${TestProfileDirectory}\n\n\t$Result = ${ExitSuccess}\n\n\tForEach ($TestSetInputDirectory in Get-ChildItem -Path \"input\" -Exclude \".*\")\n\t{\n\t\tIf (-Not (Test-Path -Path ${TestSetInputDirectory} -PathType \"Container\"))\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\tIf (${TestSetInputDirectory} -Contains ${IgnoreList})\n\t\t{\n\t\t\tContinue\n\t\t}\n\t\t$TestSetDirectory = GetTestSetDirectory ${TestProfileDirectory} ${TestSetInputDirectory}\n\n\t\tIf (Test-Path -Path \"${TestSetDirectory}\\files\" -PathType \"Leaf\")\n\t\t{\n\t\t\t$InputFiles = Get-Content -Path \"${TestSetDirectory}\\files\" | Where {$_ -ne \"\"}\n\t\t}\n\t\tElse\n\t\t{\n\t\t\t$InputFiles = Get-ChildItem -Path ${TestSetInputDirectory} -Include ${InputGlob}\n\t\t}\n\t\tForEach ($InputFile in ${InputFiles})\n\t\t{\n\t\t\t# TODO: add test option support\n\t\t\t$Output = Invoke-Expression ${TestExecutable}\n\t\t\t$Result = ${LastExitCode}\n\n\t\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t\t{\n\t\t\t\tBreak\n\t\t\t}\n\t\t}\n\t\tIf (${Result} -ne ${ExitSuccess})\n\t\t{\n\t\t\tBreak\n\t\t}\n\t}\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host ${Output} -foreground Red\n\t}\n\tWrite-Host \"${TestDescription} \" -nonewline\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tWrite-Host \" (FAIL)\"\n\t}\n\tElse\n\t{\n\t\tWrite-Host \" (PASS)\"\n\t}\n\tReturn ${Result}\n}\n\n$TestExecutablesDirectory = GetTestExecutablesDirectory\n\nIf (-Not (Test-Path ${TestExecutablesDirectory}))\n{\n\tWrite-Host \"Missing test executables directory.\" -foreground Red\n\n\tExit ${ExitFailure}\n}\n\n$Result = ${ExitIgnore}\n\nForeach (${TestName} in ${ToolsTests} -split \" \")\n{\n\t# Split will return an array of a single empty string when ToolsTests is empty.\n\tIf (-Not (${TestName}))\n\t{\n\t\tContinue\n\t}\n\t$Result = RunTest ${TestName}\n\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tBreak\n\t}\n}\n\nForeach (${TestName} in ${ToolsTestsWithInput} -split \" \")\n{\n\t# Split will return an array of a single empty string when ToolsTestsWithInput is empty.\n\tIf (-Not (${TestName}))\n\t{\n\t\tContinue\n\t}\n\tIf (Test-Path -Path \"input\" -PathType \"Container\")\n\t{\n\t\t$Result = RunTestWithInput ${TestName}\n\t}\n\tElse\n\t{\n\t\t$Result = RunTest ${TestName}\n\t}\n\tIf (${Result} -ne ${ExitSuccess})\n\t{\n\t\tBreak\n\t}\n}\n\nExit ${Result}\n\n"
  },
  {
    "path": "tests/test_tools.sh",
    "content": "#!/usr/bin/env bash\n# Tests tools functions and types.\n#\n# Version: 20240413\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nTOOLS_TESTS=\"bodyfile digest_hash info_handle mount_path_string output path_string signal\";\nTOOLS_TESTS_WITH_INPUT=\"\";\nOPTION_SETS=(\"offset\");\n\nINPUT_GLOB=\"*\";\n\nrun_test()\n{\n\tlocal TEST_NAME=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: ${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./fsntfs_test_tools_${TEST_NAME}\";\n\n\tif ! test -x \"${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\t# TODO: add support for TEST_PROFILE and OPTION_SETS?\n\trun_test_with_arguments \"${TEST_DESCRIPTION}\" \"${TEST_EXECUTABLE}\";\n\tlocal RESULT=$?;\n\n\treturn ${RESULT};\n}\n\nrun_test_with_input()\n{\n\tlocal TEST_NAME=$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: ${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./fsntfs_test_tools_${TEST_NAME}\";\n\n\tif ! test -x \"${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\tif ! test -d \"input\";\n\tthen\n\t\techo \"Test input directory not found.\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\tlocal RESULT=`ls input/* | tr ' ' '\\n' | wc -l`;\n\n\tif test ${RESULT} -eq ${EXIT_SUCCESS};\n\tthen\n\t\techo \"No files or directories found in the test input directory\";\n\n\t\treturn ${EXIT_IGNORE};\n\tfi\n\n\tlocal TEST_PROFILE_DIRECTORY=$(get_test_profile_directory \"input\" \"fsntfstools\");\n\n\tlocal IGNORE_LIST=$(read_ignore_list \"${TEST_PROFILE_DIRECTORY}\");\n\n\tRESULT=${EXIT_SUCCESS};\n\n\tfor TEST_SET_INPUT_DIRECTORY in input/*;\n\tdo\n\t\tif ! test -d \"${TEST_SET_INPUT_DIRECTORY}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\t\tif check_for_directory_in_ignore_list \"${TEST_SET_INPUT_DIRECTORY}\" \"${IGNORE_LIST}\";\n\t\tthen\n\t\t\tcontinue;\n\t\tfi\n\n\t\tlocal TEST_SET_DIRECTORY=$(get_test_set_directory \"${TEST_PROFILE_DIRECTORY}\" \"${TEST_SET_INPUT_DIRECTORY}\");\n\n\t\tif test -f \"${TEST_SET_DIRECTORY}/files\";\n\t\tthen\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed \"s?^?${TEST_SET_INPUT_DIRECTORY}/?\");\n\t\telse\n\t\t\tIFS=\"\" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});\n\t\tfi\n\t\tfor INPUT_FILE in \"${INPUT_FILES[@]}\";\n\t\tdo\n\t\t\tOPTION_INPUT_FILE=\"${INPUT_FILE}\";\n\n\t\t\tif test \"${OSTYPE}\" = \"msys\";\n\t\t\tthen\n\t\t\t\t# A test executable built with MinGW expects a Windows path.\n\t\t\t\tINPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\\\\\?g'`;\n\t\t\tfi\n\t\t\tlocal TESTED_WITH_OPTIONS=0;\n\n\t\t\tfor OPTION_SET in ${OPTION_SETS[@]};\n\t\t\tdo\n\t\t\t\tlocal TEST_DATA_OPTION_FILE=$(get_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${OPTION_INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\tif test -f ${TEST_DATA_OPTION_FILE};\n\t\t\t\tthen\n\t\t\t\t\tTESTED_WITH_OPTIONS=1;\n\n\t\t\t\t\tIFS=\" \" read -a OPTIONS <<< $(read_test_data_option_file \"${TEST_SET_DIRECTORY}\" \"${INPUT_FILE}\" \"${OPTION_SET}\");\n\n\t\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"${OPTION_SET}\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\" \"${OPTIONS[@]}\";\n\t\t\t\t\tRESULT=$?;\n\n\t\t\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\t\t\tthen\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif test ${TESTED_WITH_OPTIONS} -eq 0;\n\t\t\tthen\n\t\t\t\trun_test_on_input_file \"${TEST_SET_DIRECTORY}\" \"${TEST_DESCRIPTION}\" \"default\" \"\" \"${TEST_EXECUTABLE}\" \"${INPUT_FILE}\";\n\t\t\t\tRESULT=$?;\n\t\t\tfi\n\n\t\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\t\tthen\n\t\t\t\tbreak;\n\t\t\tfi\n\t\tdone\n\n\t\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\t\tthen\n\t\t\tbreak;\n\t\tfi\n\tdone\n\n\treturn ${RESULT};\n}\n\nif test -n \"${SKIP_TOOLS_TESTS}\";\nthen\n\texit ${EXIT_IGNORE};\nfi\n\nTEST_DIRECTORY=`dirname $0`;\n\nTEST_RUNNER=\"${TEST_DIRECTORY}/test_runner.sh\";\n\nif ! test -f \"${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: ${TEST_RUNNER}\";\n\n\texit ${EXIT_FAILURE};\nfi\n\nsource ${TEST_RUNNER};\n\nRESULT=${EXIT_IGNORE};\n\nfor TEST_NAME in ${TOOLS_TESTS};\ndo\n\trun_test \"${TEST_NAME}\";\n\tRESULT=$?;\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nif test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};\nthen\n\texit ${RESULT};\nfi\n\nfor TEST_NAME in ${TOOLS_TESTS_WITH_INPUT};\ndo\n\tif test -d \"input\";\n\tthen\n\t\trun_test_with_input \"${TEST_NAME}\";\n\t\tRESULT=$?;\n\telse\n\t\trun_test \"${TEST_NAME}\";\n\t\tRESULT=$?;\n\tfi\n\n\tif test ${RESULT} -ne ${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nexit ${RESULT};\n\n"
  },
  {
    "path": "tox.ini",
    "content": "[tox]\nenvlist = py3{10,11,12,13,14}\n\n[testenv]\nusedevelop = True\npip_pre = True\npassenv =\n  CFLAGS\n  CPPFLAGS\n  INCLUDE\n  LDFLAGS\n  LIB\ndeps =\n  build\n  setuptools >= 65\n  wheel\ncommands =\n  python -m build --no-isolation --outdir=dist --wheel\n  python -m pip install --no-index --find-links=dist libfsntfs-python\n  python tests/runtests.py\n"
  }
]